3D Models

Archive of the old editing forum
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.
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

3D Models

Post by Exosphere »

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?
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

Re: 3D Models

Post by Jaxxoon R »

What do you want to know?
User avatar
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

Post by Kappes Buur »

Models are supported only in GZDoom Hardware Renderer.
Use either Doom (Hexen) format or UDMF
Use the pk3 file hiearchy, eg

Code: Select all

maps
Models
Decorate.txt
ModelDef.txt
I'll include a simple example, however, if you want to see models in action then check out
Enjay's Gene-Tech
Attachments
Model.pk3
example pwad for Model
(172.43 KiB) Downloaded 373 times
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: 3D Models

Post by Exosphere »

Jaxxoon R wrote:What do you want to know?
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.
Kappes Buur wrote:Models are supported only in GZDoom Hardware Renderer.
Use either Doom (Hexen) format or UDMF
Use the pk3 file hiearchy, eg

Code: Select all

maps
Models
Decorate.txt
ModelDef.txt
I'll include a simple example, however, if you want to see models in action then check out
Enjay's Gene-Tech
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.

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.
User avatar
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

Post by R4L »

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.
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: 3D Models

Post by Exosphere »

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.
Thank you for showing me Noesis, R4L! Very handy! :D
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: 3D Models

Post by Exosphere »

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?
User avatar
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

Post by Kappes Buur »

Now that MaxED rarely visits this forum, Enjay and Nash are the resident experts for models.
Enjay had this to say some years ago
User avatar
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

Post by R4L »

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.
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: 3D Models

Post by Exosphere »

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?
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: 3D Models

Post by Nash »

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!
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: 3D Models

Post by Exosphere »

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?
User avatar
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

Post by R4L »

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.
User avatar
Exosphere
Posts: 168
Joined: Sun Jun 11, 2017 11:42 am
Location: New England, US

Re: 3D Models

Post by Exosphere »

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.
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.

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)
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: 3D Models

Post by kodi »

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)
Locked

Return to “Editing (Archive)”