Hi, I have not yet delved into modeling and want to know how to get started.
To start: How to create a cube, add textures to the 6 sides, set the offset/origin, and save that into something that can be imported in GZDoom.
And if there's a way to save the model in a way that I can reuse it with different textures that's a plus.
And I can apply materials to those texture files the same as other textures for flats and walls, right?
Can anyone tell me how to do that or point me to a tutorial? Thanks
Simple model help
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Simple model help
Let me start at step 1 - what modeler program should I use? Blender? I jst want to create a cube, so don't need anything fancy. If I could create a model by hand in a text file I'd be fine with that.
-
- Posts: 1562
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Simple model help
Blender, definitely blender.
How to make a cube, how to texture it - youtube is full of videos. Just type blender modelling basics and watch.
How to make a cube, how to texture it - youtube is full of videos. Just type blender modelling basics and watch.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Simple model help
OK, got it going. This was way easier than I thought it was going to be, don't know why I was stressing.
For anyone else wondering how to do it, it's prett easy:
Open blender, create a cube (or whatever) apply a texture image as a material, adjust the UV coordinates as you want, then save it as Waveform OBJ
Here's the thing - OBJ is a text format, so you don't even need Blender. If you know what you want to make you can make it by hand in a text editor.
After that create a modeldef file to link the model to an actor's sprite frames.
I'm not sure why there are posts saying to convert the obj to md3 - why is md3 prefered? Is that for animation and other features I'm not using?
The issues I'm seeing so far:
The model is too short, I have to use "scale 1.0 1.0 1.2" in the modeldef to get it the right size. Is that normal or am I doing somethiing wrong?
How to apply materials to model skin?
For anyone else wondering how to do it, it's prett easy:
Open blender, create a cube (or whatever) apply a texture image as a material, adjust the UV coordinates as you want, then save it as Waveform OBJ
Here's the thing - OBJ is a text format, so you don't even need Blender. If you know what you want to make you can make it by hand in a text editor.
After that create a modeldef file to link the model to an actor's sprite frames.
I'm not sure why there are posts saying to convert the obj to md3 - why is md3 prefered? Is that for animation and other features I'm not using?
The issues I'm seeing so far:
The model is too short, I have to use "scale 1.0 1.0 1.2" in the modeldef to get it the right size. Is that normal or am I doing somethiing wrong?
How to apply materials to model skin?
-
- Posts: 1562
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Simple model help
Yes, md3 is much more effective format, which also allows animations. I personally prefer it, because it greatly reduces file size.
Edit: materials are applied to the texture the same way as you apply it to texture.
Edit: materials are applied to the texture the same way as you apply it to texture.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Simple model help
ok, I figured out the skin materials thing.
In the GLDEFS you usually start a material def with "Material Texture [texture name]"
But in the case of model skins you put the full path to the skin file, like "Material "models/MyModel01/skins/MySkin01.png"" and the rest is as usual
In the GLDEFS you usually start a material def with "Material Texture [texture name]"
But in the case of model skins you put the full path to the skin file, like "Material "models/MyModel01/skins/MySkin01.png"" and the rest is as usual
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Simple model help
Other things I've learned:
You don't have to provide a skin file, you can specify a texture name and it will be used along with it's material definition, brightmap, and animation, so you don't have to redefine all that again for the skin file.
The wiki MODELDEF page says that SurfaceSkin can only be used on MD3 models, but it works on OBJ models, as the wiki OBJ page says.
You don't have to provide a skin file, you can specify a texture name and it will be used along with it's material definition, brightmap, and animation, so you don't have to redefine all that again for the skin file.
The wiki MODELDEF page says that SurfaceSkin can only be used on MD3 models, but it works on OBJ models, as the wiki OBJ page says.
-
- Posts: 1562
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Simple model help
Well, to add: if you set the name of the material in blender the same as the filename of the texture file, you don't need to specifically define the textures as skins in modeldef. This is useful when the model uses more than one texture, but I'm not sur if this approach will allow multi-textured materials.
-
- Posts: 537
- Joined: Wed Dec 22, 2021 7:02 pm
- Graphics Processor: Intel (Modern GZDoom)
- Location: Medellin, Colombia
Re: Simple model help
Yes, I found that also, name the materials in Blender or whatever to be the same names as your textures (and doesn't have to be an actual texture file, could be a texture defined in TEXTURES lump)ramon.dexter wrote: ↑Sat Nov 04, 2023 10:32 am Well, to add: if you set the name of the material in blender the same as the filename of the texture file, you don't need to specifically define the textures as skins in modeldef. This is useful when the model uses more than one texture, but I'm not sur if this approach will allow multi-textured materials.
And if that texture has a material definition (like brightmap and normalmap and all that), then the material is used when shading the model, so I think that's a yes to your multi-texture material comment.
One annoying thing in Blender is you have to set all your objects to link materials as you go. Otherwise if for example you create an object with a material called PineWood to reference a gzdoom texture of that name, then you create another object in the same scene and give it that same material, it automatically renames the other one to PineWood.001 and then it doesn't work in GZDoom. So, yeah, remember to link your material between objects.
-
- Posts: 42
- Joined: Sat Mar 19, 2022 11:59 am
- Graphics Processor: Intel (Modern GZDoom)
Re: Simple model help
If a cube is all you need, you can use ultimate Doom builder and export it as obj, then import the model as an actor. UDB creates the modeldef and the zscript.