Materials (PBR, Specular, Normal maps)
Moderators: GZDoom Developers, Raze Developers
Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
-
-
- Posts: 3145
- Joined: Sat May 28, 2016 1:01 pm
Re: Materials (PBR, Specular, Normal maps)
At the time I figured that the best mapping to Doom would be to assume that light level = classic ambient light = environmental light. This works okay the diffuse component of a material, but breaks down for specular.
What we maybe could do is to redefine what normal dynlights mean in PBR. Currently I'm treating them exactly as attenuated lights - that is, they are both physical point lights. But I could change it so that normal lights act as stand-in for the environmental light. I'm not too keen on applying the AO map on all light sources as then you might as well just remove the map and bake AO into the albedo texture.
What we maybe could do is to redefine what normal dynlights mean in PBR. Currently I'm treating them exactly as attenuated lights - that is, they are both physical point lights. But I could change it so that normal lights act as stand-in for the environmental light. I'm not too keen on applying the AO map on all light sources as then you might as well just remove the map and bake AO into the albedo texture.
-
- Posts: 310
- Joined: Fri Sep 21, 2007 1:08 am
- Location: Poland - Bytom
Re: Materials (PBR, Specular, Normal maps)
Ok, that's the solution I'm used so far. Anyway even on this stage of design this is huge step forward for the engine. I know that all this hires pbr stuff stand off lowres sprites, but first - I don't care, second - as you mention before this is nice solution for peaple making total conversions.
-
- Posts: 109
- Joined: Sun Jan 14, 2018 12:14 pm
Re: Materials (PBR, Specular, Normal maps)
Any idea if there will ever be support for fbx models to replace the outdated MD3 ones? Doomsday has it already so I assume it's possible.
-
-
- Posts: 3145
- Joined: Sat May 28, 2016 1:01 pm
Re: Materials (PBR, Specular, Normal maps)
Direct FBX support? No, that will never be supported. A few good reasons why:hardcore_gamer wrote:Any idea if there will ever be support for fbx models to replace the outdated MD3 ones? Doomsday has it already so I assume it's possible.
1) It's a proprietary format that can only be read reliably via Autodesk's FBX SDK.
2) The FBX SDK is cussingly slow and templated to hell. It literally increased the executable size by several megabytes in the last project I used it in.
3) Autodesk is usually 6+ months behind Visual Studio on releases. If you rely on it, you can't switch compiler until they release new builds.
4) The FBX format is an exchange format, which means the vertices and such can't be loaded directly into OpenGL buffers. They need to be processed. For example, the normal smoothing groups require the application to analyze which vertices have to be split into multiples vertices before OpenGL can use them.
That said, GZDoom could use a good FBX import tool that converts such files to a format more suitable for engine consumption.
-
- Posts: 109
- Joined: Sun Jan 14, 2018 12:14 pm
Re: Materials (PBR, Specular, Normal maps)
Well having some kind of modern 3D model format would be nice. MD3 is too limited.dpJudas wrote:Direct FBX support? No, that will never be supported. A few good reasons why:hardcore_gamer wrote:Any idea if there will ever be support for fbx models to replace the outdated MD3 ones? Doomsday has it already so I assume it's possible.
1) It's a proprietary format that can only be read reliably via Autodesk's FBX SDK.
2) The FBX SDK is cussingly slow and templated to hell. It literally increased the executable size by several megabytes in the last project I used it in.
3) Autodesk is usually 6+ months behind Visual Studio on releases. If you rely on it, you can't switch compiler until they release new builds.
4) The FBX format is an exchange format, which means the vertices and such can't be loaded directly into OpenGL buffers. They need to be processed. For example, the normal smoothing groups require the application to analyze which vertices have to be split into multiples vertices before OpenGL can use them.
That said, GZDoom could use a good FBX import tool that converts such files to a format more suitable for engine consumption.
-
- Posts: 486
- Joined: Tue Nov 29, 2005 2:15 pm
- Graphics Processor: nVidia with Vulkan support
Re: Materials (PBR, Specular, Normal maps)
I recommend SMD format. It's an easily understandable text-based format, that's supported by a lot of major tools (3DS Max, Maya, Milkshape, Blender, XSI Mod Tool, etc), and is what GoldSRC and Source Engine use before compilation into .MDL. It's supported by Cube 2: Sauerbraten, so if you want to get an idea of how to implement it, there's a good place to look. SMDs are of two types, the "Reference", which is the model itself, and "Sequence" which holds the bone animations.
-
- Posts: 46
- Joined: Thu Mar 29, 2018 1:48 pm
- Graphics Processor: nVidia with Vulkan support
- Location: EU
Re: Materials (PBR, Specular, Normal maps)
I see in the example map, that you used specularlevel for a material that uses metallic and roughness. By mistake or should that have an influence?
Than I don't really see any difference between glossiness 0, 0.1, 1.0, 10, 1000.... ?
(AO and normalmap are given with auto, which seems to work fine)
Than I don't really see any difference between glossiness 0, 0.1, 1.0, 10, 1000.... ?
Code: Select all
material flat WOOD8
{
roughness "materials/Grau90.png"
metallic "materials/Grau50.png"
glossiness 10
specularlevel 10
}
-
-
- Posts: 3145
- Joined: Sat May 28, 2016 1:01 pm
Re: Materials (PBR, Specular, Normal maps)
glossiness and specularlevel only has an effect on diffuse+specular materials. For PBR the specularity is indirectly specified via the roughness and metallic textures.
-
- Posts: 310
- Joined: Fri Sep 21, 2007 1:08 am
- Location: Poland - Bytom
Re: Materials (PBR, Specular, Normal maps)
Is there any way to use pbr materials for texture which used "warp" argument in animdefs?
-
-
- Posts: 3145
- Joined: Sat May 28, 2016 1:01 pm
Re: Materials (PBR, Specular, Normal maps)
Not currently, no.
-
- Posts: 310
- Joined: Fri Sep 21, 2007 1:08 am
- Location: Poland - Bytom
Re: Materials (PBR, Specular, Normal maps)
Ok, thanks.
-
-
- Posts: 3145
- Joined: Sat May 28, 2016 1:01 pm
Re: Materials (PBR, Specular, Normal maps)
By the way, any chance of getting my hands on those PBR textures for E1M1 you've been doing over at DW? I would like to do some tests with environment maps at some point and your textures are a lot better than the ones I currently use.
-
- Posts: 310
- Joined: Fri Sep 21, 2007 1:08 am
- Location: Poland - Bytom
Re: Materials (PBR, Specular, Normal maps)
Of course, no problem - but all of them need some strong polishing (most of materials are on test stage).
-
- Posts: 310
- Joined: Fri Sep 21, 2007 1:08 am
- Location: Poland - Bytom
Re: Materials (PBR, Specular, Normal maps)
You have blocked pm's
-
-
- Posts: 3145
- Joined: Sat May 28, 2016 1:01 pm
Re: Materials (PBR, Specular, Normal maps)
Oops, yes. Should be possible to pm me now.