3D model importer / modeldef generator

Any utility that assists in the creation of mods, assets, etc, go here. For example: Ultimate Doom Builder, Slade, WadSmoosh, Oblige, etc.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
GelleSzebasztian
Posts: 27
Joined: Fri Mar 08, 2019 5:11 pm
Graphics Processor: nVidia (Modern GZDoom)

3D model importer / modeldef generator

Post by GelleSzebasztian »

A simple way to add 3d models to your project

adding models with the tool

https://youtu.be/VWx5MZr1ovE

Adding PBR materials with the tool:
https://youtu.be/zYUX9KxLWKs



Sometimes you just want to do something simple, like adding static models fast, just to see how they look like.
But if you want to add a 3d model, you also have to add a decorate/zscript file and a modeldef. Life is not easy.

This tool generates zscript and modeldef for you

It is not super complicated of course, but when adding many many models, it gets boring to always keep doing this, and because I played many hours with Factorio, I know that automating stuff is great, so I created this little tool that helps you import models in less than a minute.

I created this with windows forms, c#, in visual studio.
I plan extending this to a zscript generator too. I decided to make this for myself, to make my workflow easier, but then why not share with others, maybe you'll also like it.

This tool is very simple, don't expect a lot

For now it only works with static models, you cannot do animations - despite it is there - for now, but I will update it as soon as I can. See the video about how to use it. It will be cooler really, just let me update it.

Download https://github.com/szeba99/Basic-GZDoom ... msApp5.exe
Windows 64 bit I guess.

EDIT: Now it is useful for importing PBR materials too.
EDIT2: Animations do work, just the link was wrong until now (2023.05.25)


Oops, I should've posted this in editing, right?
Last edited by GelleSzebasztian on Wed May 24, 2023 6:46 pm, edited 3 times in total.
Tezz
Posts: 1
Joined: Thu Apr 16, 2020 12:29 pm
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: 3D model importer / modeldef generator

Post by Tezz »

Thats fantastic, thank you for your efforts good sir.
User avatar
CBM
Posts: 373
Joined: Wed Oct 09, 2019 3:39 am
Graphics Processor: nVidia with Vulkan support
Location: The Shores of Hell

Re: 3D model importer / modeldef generator

Post by CBM »

I really like it, it is alot like my MD2ModelDef project (generates GZDoom data files for MD2 files, including animations)

If you can use any code from my project then feel free to do so
(you will need to load MD2 and MD3 models in to memory to read additional info like skin names etc..
MD2 contains names for each animation so no cfg file is needed for MD2 files)

btw. for MD3 files, some of them have an animation.cfg file that contains information on all animations (if it is a quake 3 player model)

and remember all animations, idle and pain are as important as walk, attack and death

xdeath (extreme death, usually used for when a monster is crushed or blown to pieces by a very powerfull weapon) would also be nice

link to my MD2ModelDef project:
viewtopic.php?f=232&t=66332&p=1124464&hilit=md2modeldef#p1124464

another cool addition would be if a monster could be made from a template, like..

doomimp
shotgunguy
etc..

that would require syncronization between the decorate file that would be not much more than something like : Actor AMonster : DoomImp {}
and the modeldef file

all decorate definitions for skulltag, doom, heretic, strife, hexen, doom 2 and more... are on the zdoom wiki

example...

https://zdoom.org/wiki/Classes:DoomImp

I have actually been thinking about making a MD3ModelDef tool using this library

https://github.com/codesuki/md3-loader
User avatar
GelleSzebasztian
Posts: 27
Joined: Fri Mar 08, 2019 5:11 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: 3D model importer / modeldef generator

Post by GelleSzebasztian »

CBM wrote: another cool addition would be if a monster could be made from a template, like..
That is kinda already done in the latest version. Now I am lazy for these but if you or anyone wants to contribute, the source code and the latest version is here:
https://github.com/szeba99/Basic-GZDoom ... g-gui-app/
RataUnderground
Posts: 2
Joined: Sat May 01, 2021 3:11 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: 3D model importer / modeldef generator

Post by RataUnderground »

Greetings. This tool would be really useful to me, but unfortunately I can't get the generated .pk3 file to work. Maybe I am doing something wrong?

The tool generates me this code for Modeldef:
Spoiler:
And this code for Zscript
Spoiler:
And this MAPINFO
Spoiler:
But when I try to use the .pk3 as a resource in UDB, I have this errors:
Spoiler:

I have the feeling I'm making a very obvious and stupid mistake, but i can't make it work.
boris
Posts: 769
Joined: Tue Jul 15, 2003 3:37 pm

Re: 3D model importer / modeldef generator

Post by boris »

RataUnderground wrote:But when I try to use the .pk3 as a resource in UDB, I have this errors:
Spoiler:

I have the feeling I'm making a very obvious and stupid mistake, but i can't make it work.
Add gzdoom.pk3 as a resource (but exclude it from testing).
RataUnderground
Posts: 2
Joined: Sat May 01, 2021 3:11 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: 3D model importer / modeldef generator

Post by RataUnderground »

Thank you Boris : )

Although now I get the following error
Unable to find sprite lump "3DMDA" used by actor "Stone1": 11001. Forgot to include required resources?
The thing can be placed in the map with UDB, but it didn't display in the visual mode, nor in the testing.
Spoiler:
So ... I have to write the sprite lump for this to display the model?
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: 3D model importer / modeldef generator

Post by ramon.dexter »

Exactly. The exclamation mark is correct, because, after all, the sprite is the main thing. Modeldef only substitutes a model for a sprite. When there is no sprite, it cannot aubstitute.
User avatar
GelleSzebasztian
Posts: 27
Joined: Fri Mar 08, 2019 5:11 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: 3D model importer / modeldef generator

Post by GelleSzebasztian »

Please use the latest version from Github, not the drive link. You can use the windows exe build from the build folder:
https://github.com/szeba99/Basic-GZDoom ... msApp5.exe

This odd thing with "3DMD" has already been replaced long ago by a dummy sprites lump that I stole from Nash some time ago with dummy sprites such as 0000, etc.
Also this latest version supports animations kinda.


And let me recommend you another tool made by me:
https://www.youtube.com/watch?v=RqmUQJuu4Ps
https://github.com/szeba99/doom-3d-drag-n-drop

I always use this recently, when adding static models. (but this one doesn't generate mapinfo for now)
Recently I switched to linux, and I don't know how could I continue developing this C# Windows Forms tool, surely it is possible, but I am lazy to find it out how. Instead I try to use Python to create things.

Return to “Creation, Conversion, and Editing”