3D Models
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
3D Models
So I've been wanting to try something in the mod I have been working on; I want to try and use 3D models, instead of 2d sprites, as first-person "sprites" like what was found in Hunter's Moon (or what appeared to be 3d models). My overall goal would be to create something visually in the vein of the original Quake. While I know that 3d models are supported, but I'm not sure how to implement this. How would I go about doing this?
- Kappes Buur
-
- Posts: 4188
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: 3D Models
Models are supported only in GZDoom Hardware Renderer.
Use either Doom (Hexen) format or UDMF
Use the pk3 file hiearchy, eg
I'll include a simple example, however, if you want to see models in action then check out
Enjay's Gene-Tech
Use either Doom (Hexen) format or UDMF
Use the pk3 file hiearchy, eg
Code: Select all
maps
Models
Decorate.txt
ModelDef.txt
Enjay's Gene-Tech
- Attachments
-
Model.pk3
- example pwad for Model
- (172.43 KiB) Downloaded 373 times
Re: 3D Models
My main goal is to try and implement 3d models for the first person view instead of using 2d sprites, but nothing extremely fancy; just to have the models in the center, like DOOM and Quake (though more Quake > Doom). Enjay's mod that Kappes linked is preciesly what I am looking for. However, I'm still alittle confused as to how I would add them into the first person view when creating the weapons.Jaxxoon R wrote:What do you want to know?
Thank you for the little demo, it was helpful in understanding how static models are integrated. Also, thank you for bringing Enjay's mod to my attention.Kappes Buur wrote:Models are supported only in GZDoom Hardware Renderer.
Use either Doom (Hexen) format or UDMF
Use the pk3 file hiearchy, eg
I'll include a simple example, however, if you want to see models in action then check outCode: Select all
maps Models Decorate.txt ModelDef.txt
Enjay's Gene-Tech
Also, does anyone know a method of converting COLLADA files (.dae) to the GZDoom-supported model files (.md2 or .md3)? No longer an issue.
Last edited by Exosphere on Wed Sep 06, 2017 12:46 pm, edited 2 times in total.
- R4L
- Global Moderator
- Posts: 426
- Joined: Fri Mar 03, 2017 9:53 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11 Pro
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: 3D Models
IIRC, nash started a thread about making models to use for guns, and included a blender plug-in for converting models to .md3 format. Also, you might want to look into Noesis for model conversion. It's definitely a nifty program.
EDIT: Here you go.
EDIT: Here you go.
Re: 3D Models
Thank you for showing me Noesis, R4L! Very handy!R4L wrote:IIRC, nash started a thread about making models to use for guns, and included a blender plug-in for converting models to .md3 format. Also, you might want to look into Noesis for model conversion. It's definitely a nifty program.
EDIT: Here you go.

Re: 3D Models
So while everything that was linked to me has been helpful, especially Noesis and Enjay's mod, however, I'm still slightly fuzzy on how exactly I integrate the models themselves into the DECORATE code. How would I call the model during the FIRE, SELECT, DESELECT, etc. functions? When defining a model, what would I put for the Frame definition? Are there any mod examples that just have one 3d weapon that could examine?
- Kappes Buur
-
- Posts: 4188
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: 3D Models
Now that MaxED rarely visits this forum, Enjay and Nash are the resident experts for models.
Enjay had this to say some years ago
Enjay had this to say some years ago
- R4L
- Global Moderator
- Posts: 426
- Joined: Fri Mar 03, 2017 9:53 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11 Pro
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: 3D Models
Here's a link to a gunship I imported into the Metroid Dreadnought mod: https://drive.google.com/open?id=0B8Egi ... 0JzQXAxeG8
You can open that up in SLADE and view how I achieved it, but basically there is a folder called Models that has a folder called buttship. Inside that folder is a skins folder where the skins for the model are located. There is also the .md3 file for the model itself. Back at the base of the .pk3, there are three DEFINITION lumps: TEXTURES, DECORATE, and MODELDEF. Use the wiki too, as that helps a lot. Good luck!
EDIT: I realize you were talking about states... I believe you would just call the model's frame index. Also, this might help you out too if you find that your model is displaying incorrect textures.
You can open that up in SLADE and view how I achieved it, but basically there is a folder called Models that has a folder called buttship. Inside that folder is a skins folder where the skins for the model are located. There is also the .md3 file for the model itself. Back at the base of the .pk3, there are three DEFINITION lumps: TEXTURES, DECORATE, and MODELDEF. Use the wiki too, as that helps a lot. Good luck!
EDIT: I realize you were talking about states... I believe you would just call the model's frame index. Also, this might help you out too if you find that your model is displaying incorrect textures.
Re: 3D Models
Brief Update:
I was able to successfully convert my models to md3 (using the Blender GZDoom converter script) and bring them into my mod. I am able to summon the weapon (with its 3D model) in-game. However, several new issues have appeared.
1. The HUD completely disappeared. It vanished when I added the model to the pk3 and changed the weapon sprites to use the model.
Nevermind. I just found out it was a result of me messing with the hud settings.
2. I am unable to pick up the weapon itself.
3. I think the UV maps might be messed up. They feel very disorganized and its going to make texturing extremely hard. Attached is the pistol UV map, colored orange. http://imgur.com/a/CE8zC
Any thoughts?
I was able to successfully convert my models to md3 (using the Blender GZDoom converter script) and bring them into my mod. I am able to summon the weapon (with its 3D model) in-game. However, several new issues have appeared.
1. The HUD completely disappeared. It vanished when I added the model to the pk3 and changed the weapon sprites to use the model.
Nevermind. I just found out it was a result of me messing with the hud settings.
2. I am unable to pick up the weapon itself.
3. I think the UV maps might be messed up. They feel very disorganized and its going to make texturing extremely hard. Attached is the pistol UV map, colored orange. http://imgur.com/a/CE8zC
Any thoughts?
Re: 3D Models
That UV looks like it was unwrapped with lightmap unpack or something which is the "fast automatic way" but not good artistically... I suggest you unwrap it manually. It's not too complicated, it involves you marking lines as seams to tell the unwrapper where to "cut" the model. Go to Youtube and look for "unwrap gun blender" and sort the results by shortest duration or something... there are plenty of tutorials that will explain it better than I can!
With a proper, manual unwrap, you can then also utilize Blender's 3D texture painting to lay down the base colours before bringing it into Photoshop or whatever for further detailing. I personally use a mixed workflow utilizing both 3D painting and Photoshop, whatever I need to get the job done!
With a proper, manual unwrap, you can then also utilize Blender's 3D texture painting to lay down the base colours before bringing it into Photoshop or whatever for further detailing. I personally use a mixed workflow utilizing both 3D painting and Photoshop, whatever I need to get the job done!
Re: 3D Models
Another Update:
I've been working with Blender for a few days now and been getting a much better hang of manual UV Mapping, but I think that even with manual seams, it still can appear fairly disorganized with a lot of unrecognizable pieces, or pieces that are bent when they should be straight. Does anyone have any tips when manually mapping meshes in Blender?
Also, I still haven't figured out how to make the weapons appear in first person when I am holding them. Even though Enjay's Gene-Tech mod was helpful to see how the first person models are utilized, they still don't appear properly for me, even when I add the code word for word. Does anyone have an ideas/solutions?
I've been working with Blender for a few days now and been getting a much better hang of manual UV Mapping, but I think that even with manual seams, it still can appear fairly disorganized with a lot of unrecognizable pieces, or pieces that are bent when they should be straight. Does anyone have any tips when manually mapping meshes in Blender?
Also, I still haven't figured out how to make the weapons appear in first person when I am holding them. Even though Enjay's Gene-Tech mod was helpful to see how the first person models are utilized, they still don't appear properly for me, even when I add the code word for word. Does anyone have an ideas/solutions?
- R4L
- Global Moderator
- Posts: 426
- Joined: Fri Mar 03, 2017 9:53 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11 Pro
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
- Contact:
Re: 3D Models
You got about as far as I did. I had an Arm Cannon model for Samus that was just textured with colors. I unwrapped them all and saved them to .pngs to use in blender as material, but it made the faces have edges that stood out on the model; a real eye sore. I'm sure I did something wrong there...
I even imported the model into my .pk3 and made it so it could be picked up and equipped, but could not get it to appear on screen. All I can say is use Nash's gun template included with his plug-in and see if that works.
I even imported the model into my .pk3 and made it so it could be picked up and equipped, but could not get it to appear on screen. All I can say is use Nash's gun template included with his plug-in and see if that works.
Re: 3D Models
Unfortunately, the gun template does not work. It doesnt render, nor does it act like a weapon, despite being present in the player's inventory. I did contact Nash about it and said he might work on it if he had the time.R4L wrote:You got about as far as I did. I had an Arm Cannon model for Samus that was just textured with colors. I unwrapped them all and saved them to .pngs to use in blender as material, but it made the faces have edges that stood out on the model; a real eye sore. I'm sure I did something wrong there...
I even imported the model into my .pk3 and made it so it could be picked up and equipped, but could not get it to appear on screen. All I can say is use Nash's gun template included with his plug-in and see if that works.
How did you do your mapping? Did you do "press U -> Unwrap"? I also use blender and that method is terrible without adding manual seams. I only recently got one of my weapons down to less than 10 mesh islands.
I also did message Enjay about my issues, though he has yet to get back to me yet. (but he might already have enough on his plate)
Re: 3D Models
It could be an issue of scale (default blender working size is tiny in gzdoom) or rotation (the gun points into the screen and is thus behind the camera rather than in front of it)