Jump to content
The Dark Mod Forums

Need Help with 3D Modeling


Aosys
 Share

Recommended Posts

Hi all! After a hiatus from TDM (PhD program has been eating a lot of my time...) I've wanted to get back into the swing of things by trying my hand at some 3D modeling. I'm actually taking an Independent Study this semester with the express goal of generating some assets for the mod, and learning the 3D games pipeline along the way, but I'm hitting something of a snag.

 

Currently, I'm trying to clean up my old khopesh model in an attempt to get it in-game and fuctional. Thus far, I've got both the low and high poly versions, and was able to successfully bake my model normals in Substance Painter. However, I'm not quite certain how texturing would work, nor how to get the model set for export to the engine. I've tried some experimentation with only limited success (PBR textures work flawlessly and are easy to mask in; non-PBR hasn't really worked thus far). So I guess my question is, what steps do I need to take to get this model functional, and to streamline the creation of future models? I have access to Blender (I'm using 2.9x to model, then downgrading to 2.80 with Orbweaver's import-export scripts) and Substance Painter, as well as Photoshop.

  • Like 1
Link to comment
Share on other sites

The steps for non MD5 models are relatively simple:

create a model and make sure it is all in a single layer (when exporting)

be mindful of the scale diference between the 3d tool and the game,

one way to see the scale needed, is to create a cube in DR export has obj and import in blender. 

make sure the model is made of triangles no quads (you can work in quads then triangulate at export)

uvmap the model and make sure the uv's fall within the 0/1 window and don't overlap

create a diffuse texture (colors only no shading)

create a normal map

create a specular map (you can put color on it)

create or edit a .mtr material file and define your model material there.

make sure the material name, for the model surfaces, in blender, is the name of the material you have created inside the .mtr file

if you want to create, a shadow mesh or a collision mesh 

make sure the surfaces/models lay in the same layer as the main model (they overlap it)

apply to each model the invisible "texture/common/collision" or "texture/common/shadow" material names depending on the model function you want

(for collision models if making a physics enabled model a 'movable' in idtech 4 parlance, make sure the collision proxy has no more than 16 faces)

export as a single .ASE or .LWO

hope I didn't forget anything.

 

  • Like 3
Link to comment
Share on other sites

On 10/9/2021 at 9:47 PM, Aosys said:

I'm using 2.9x to model, then downgrading to 2.80 with Orbweaver's import-export scripts)

You don't need to do that. The scripts work fine with 2.93 — I always check and update them with new official Blender releases although I do not do any tests with alpha or beta builds.

I guess I should consider renaming the Git branch since it seems a few people assume that blender-2.80 means "Blender 2.80 exactly and no newer versions".

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

So an update on the khopesh: I finally got it working and in-engine, but I'm now encountering an issue with the normal map (I think). For some reason I'm still seeing a lot of polys not being smooth shaded, particularly in the handle:
 

https://imgur.com/a/tZ8MTqn

 

I thought it might have to do with the lack of an alpha channel (Substance Painter initially didn't include one on the normal export), but manually adding one didn't really seem to help...

  • Like 1
Link to comment
Share on other sites

What format is the model in? ASE or LWO? 

Never used ASE but If LWO make sure the model or handle material has a smoothing angle of 180% (at lest that is how is done in Modo, the 3D tool I use), if the model has a single material and you don't want the full model to look smooth, then you can create hard edges by cutting and pasting manually (in blender I think is called extracting) the model faces you want flat, hope this makes sense to you. 

  • Like 1
Link to comment
Share on other sites

Alpha channel has nothing to do with smoothing, and will just waste space in your image file.

For smoothing problems, I would check that all of the face normals are pointing in the correct direction in your chosen modelling app, and make sure you choose the correct smoothing options on export (if any). For example with the Blender->LWO export script, you can choose full smoothing, no smoothing, or smoothing based on the material Autosmooth settings.

  • Thanks 1
Link to comment
Share on other sites

@OrbWeaver Your solution 100% worked, I'd forgotten to include smoothing in the LWO export. Thanks to both you and @HMart for the help, next step will be getting it set up as an entity, then starting on more models!

 

ursshEs.jpg

 

[Edit] So, a few questions. First, does TDM support ambient occlusion maps? Second, are there any A to Z-style tutorials for Blender->TDM modeling? If not, would it be useful for me to try putting one together?

Edited by Aosys
  • Like 2
Link to comment
Share on other sites

1 hour ago, Aosys said:

@OrbWeaver Your solution 100% worked, I'd forgotten to include smoothing in the LWO export. Thanks to both you and @HMart for the help, next step will be getting it set up as an entity, then starting on more models!

 

ursshEs.jpg

 

[Edit] So, a few questions. First, does TDM support ambient occlusion maps? Second, are there any A to Z-style tutorials for Blender->TDM modeling? If not, would it be useful for me to try putting one together?

Ambient Occlusion maps are typically blend filter stages of a diffuse texture


 

{

blend diffusemap

map /textures/darkmod/something

}

{

blend filter

map /textures/darkmod/something_ao

}

 

Though I believe there is a more modern technique of baking AO data into a normal map.

The last time I tried to find the article I couldn't locate it.

 

We have a few Blender wikis but I don't believe we have an A to Z one:

https://wiki.thedarkmod.com/index.php?title=Category:Model_Tutorials

 

Edit: Found the normal map AO reference:

http://wiki.polycount.com/wiki/Normal_Map

It won't work with TDM since we now use RGTC normal map compression. It would be cool if we could make these only respond to ambient lighting as suggested in the above reference.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Since AO primarily affects brightness, baking it into the diffuse map would be the simplest approach. You could do this as a separate material stage as per @nbohr1more's example, or you could bake it directly into the diffusemap itself (either within Blender via image compositing or in your image editing tool of choice). I've done this myself with model-based textures (e.g. making the grooves between stone tiles look darker using baked AO).

  • Like 2
Link to comment
Share on other sites

Got a second model in-game!

b3yk78e.jpg

 

With regards to the Khopesh, I'd like to get it functional as both a dynamic physics object and something that can be used as a weapon for enemy AI. To do that, would I simply copy-paste all the entity properties from something like the existing scimitar?

  • Like 1
Link to comment
Share on other sites

Hello Aosys! I just happened to run past your thread here as I've returned recently to the forums myself. I might be able to help you here with your Substance Painter setup, as I use it exclusively now. You wont get a one to one render preview in Painter, akin to that of the properties you'll see in-game. However you can get pretty close. 

I do use the non-pbr mode but once you've got the settings and layers optioned correctly, it'll work. Firstly, are you using current versions? This is important as shaders and various versions of Painter have broke in the past (especially since Adobe bought them). I normally bake my Ambient Occlusion into my diffuse texture. Until (or really if ever) we get PBR in game, this shouldn't be changing; however baking the AO really helps if you're wanting dramatic lighting for cheap.

If you can, try to multiply the AO over the diffuse texture in Photoshop and then save that to DDS. Personally I don't much like how powerful (and plastic like) specular effects are in TDM, so I usually will just end up with a final diffuse and normal texture. The only time I'd recommend blending the AO via mtr file is if you needed to preserve the UV's for the diffuse but had to multiply that over a tiling texture independently. Otherwise we can just cut down on the file consumption and go without the mask.

Also, Greebo just made a file converter to take FBX to LWO. I use MayaLT now, so if you have to pull anything in from FBX; that can now be handled directly. It also handles vertex paints and smoothing options! This was a big requested feature from me and I'm really excited to start using it here myself. Greebo made it to work with his Dark Radiant upgrade project but it's also directly accessible via a batch file! So what this means is we'll be able to just save FBX to a mirrored directory and then run the batch file and it'll convert/copy the new LWO files to your chosen models destination. 

If you want, I can show you how I've got my Substance Painter setup for TDM too. I could probably best do that via screenshare over Discord, so lemme know if you'd like to do that at some point.

  • Like 1

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...