Materials (normal, specular etc )

Moderator: GZDoom Developers

Post Reply
Collegia Titanica
Posts: 83
Joined: Thu Jan 25, 2018 1:37 pm

Materials (normal, specular etc )

Post by Collegia Titanica »

As far as I know, when implementing md3 models into doom, the name of the material that the model/mesh is using needs to be the same as the texture name, skinspace in modeldef omitted.

However, with only 1 filenamespace,the other texture types are not implemented. Let's say you put the diffused texture's name as material name, but you also have normals and specular textures, since the material is named after the diffused texture, the rest of the data is unused.(Higher quality models could be implemented if this is solved)

I started this post because I saw something interesting in one of the latest commits/versions , which I don't fully understand, but It might(?) relate to this problem.
I'm not that Blender savy, nor do I think combining 3 texture types into one is easy, so a solution for this problem would greatly benefit any 3d modeling done for Doom.
Apologies if the links below somehow solve this, I need developer opinion on whether this is sort of solved/worked on.
Perhaps declaring normal map textures, specular ,Ambient occlusion, roughness etc in some special place, somehow relating to modeldef .. I don't know.

https://zdoom.org/Changelog/57e66555d/files
[*]Change the search paths for auto folders

https://zdoom.org/Changelog/05827ffcd/files
[*] Implement auto textures for materials
Talon1024
 
 
Posts: 374
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Materials (normal, specular etc )

Post by Talon1024 »

Check out the guide I wrote in the tutorials section. It shows you how to write GLDEFS material definitions for QZDoom.

AFAIK, the aforementioned commits just make it possible to automatically assign normal/AO/specular/metallic/roughness maps by putting images with the same name as the base texture in the right folders.

That is:
  • /brightmaps/auto or /materials/brightmaps/auto for brightmaps.
  • /materials/normalmaps/auto for normal maps.
  • /materials/specular/auto for specular maps.
  • /materials/metallic/auto for metal maps.
  • /materials/roughness/auto for roughness maps.
  • /materials/ao/auto for ambient occlusion maps.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Materials (normal, specular etc )

Post by Major Cooke »

Good work, lad! I like that!
Collegia Titanica
Posts: 83
Joined: Thu Jan 25, 2018 1:37 pm

Re: Materials (normal, specular etc )

Post by Collegia Titanica »

Wow, I can't test it right now but this must be it! Now that I have named the model's material to the same name as the diffused texture, all I need to do is name the specular and normal textures by the same name and put them in

Materials/normalmaps/auto
Materials/specular/auto

and it should work right ?
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Materials (normal, specular etc )

Post by Major Cooke »

Yup! That's the intended functionality. No more need to define GLDef variants just for inserting certain things, unless you want to tweak the settings a little.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Materials (normal, specular etc )

Post by Nash »

There's already an open branch for materials, and material auto folders are already added by dpJudas
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”