PBR textures not working at all

Need help running various source ports? Did your computer break? Ask here.

Moderators: GZDoom Developers, LZDoom Developers, UZDoom Developers

Forum rules
Please be as descriptive as possible in your posts (list your hardware and operating system, the version of the source port you are using, any mods you are running and how they're being loaded, etc.)
This will help others to give you a solution!
Post Reply
User avatar
Joven0culto
Posts: 15
Joined: Thu Aug 22, 2024 4:08 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

PBR textures not working at all

Post by Joven0culto »

I have no idea what I'm doing wrong, but I've already tried several different ways for both PBR textures and specular textures, and nothing works.

For now, I'm trying to configure a single PBR texture, and this is my GLDEFS

Code: Select all

material Texture "TEX001A"
{
	normal "MATERIALS/NORMALMAPS/TEX001AN"
	metallic "MATERIALS/METALLIC/TEX001M"
	roughness "MATERIALS/ROUGHNESS/TEX001R"
	ao "MATERIALS/AO/TEX001AO"
}
I´m using GZDoom 4.14.2
User avatar
RoadRunner
Posts: 19
Joined: Tue Apr 14, 2020 10:59 am
Graphics Processor: nVidia with Vulkan support

Re: PBR textures not working at all

Post by RoadRunner »

You need to include the file extension of the map files in the path. You also do not need the quotes around the material definition.

Presuming that you're using PNG files, your GLDEFS example should look like this : -

Code: Select all

material Texture TEX001A
{
	normal "MATERIALS/NORMALMAPS/TEX001AN.png"
	metallic "MATERIALS/METALLIC/TEX001M.png"
	roughness "MATERIALS/ROUGHNESS/TEX001R.png"
	ao "MATERIALS/AO/TEX001AO.png"
}
Also, be aware of any typos. Are those filenames definitely all correct? I ask because your map file names are not consistent with the "material name + the letter for the map type" pattern you have chosen across all entries. If anything is wrong with ANY of the texture definitions or if even a single file cannot be found on disk exactly as defined, the game will ignore the whole material definition completely and you'll just get a normal texture in game.

I would define the maps as below and make sure the filenames on disk match up: -

Code: Select all

material Texture TEX001A
{
	normal "MATERIALS/NORMALMAPS/TEX001AN.png"
	metallic "MATERIALS/METALLIC/TEX001AM.png"
	roughness "MATERIALS/ROUGHNESS/TEX001AR.png"
	ao "MATERIALS/AO/TEX001AAO.png"
}
User avatar
Joven0culto
Posts: 15
Joined: Thu Aug 22, 2024 4:08 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: PBR textures not working at all

Post by Joven0culto »

nah, it didn' t work, this thing is driving me nuts

Anyway, here's a pk3 in case anyone wants to check it out:
https://drive.google.com/file/d/1oAGuBf ... drive_link
User avatar
RoadRunner
Posts: 19
Joined: Tue Apr 14, 2020 10:59 am
Graphics Processor: nVidia with Vulkan support

Re: PBR textures not working at all

Post by RoadRunner »

Looks like you have got several things confused inside that archive. The texture files themselves do not have any file extensions and the folder structure looks to have been flattened out (meaning certain folders are in the wrong locations.) Also, the TEXTURES file was being confused with the TEXTURES folder - I couldn't even extract the archive initially until I did those two separately because you cannot have a file and folder with exactly the same name exist in the same location. Finally, you're using modern high-resolution images as your textures, so they need to be in the HIRES\TEXTURES or HIRES\FLATS folders rather than the normal structure.

Try the link below. I can load into Doom with just this PK3 in my config, run map01, and the textures appear correctly, with tex001a.png having the PBR maps applied to it as expected.

https://drive.google.com/file/d/1Bbk9Rf ... sp=sharing
User avatar
Joven0culto
Posts: 15
Joined: Thu Aug 22, 2024 4:08 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: PBR textures not working at all

Post by Joven0culto »

It's curious, since in none of my previous projects has there been any problem with anything that now seems to be exactly what is causing the error. I have never had to maintain the image extensions for them to work correctly, nor the location of the textures folder with respect to the texture definition file. Even though they are “high-resolution” textures, they have always worked fine without having to put them in the HIRES folder, which really annoys me because I always did it according to the official documentation, and it's wrong. How was I supposed to know this?

And you know what's funny? It still doesn't work. I've tried a clean version of GZDoom 4.14.2 and UZDoom 4.14.3, and nothing. For some cosmic reason, I just can't use PBR textures.

And by the way, thanks anyway for the help, as I'm learning new things from this, but I think the PBR thing is going to go out the window.
User avatar
RoadRunner
Posts: 19
Joined: Tue Apr 14, 2020 10:59 am
Graphics Processor: nVidia with Vulkan support

Re: PBR textures not working at all

Post by RoadRunner »

Yeah, it's very weird as I've been using PBR materials since GZDoom version 4.10 and they have always worked fine for me by following the steps I outlined. I have a multi-gigabyte texture mod I created for all 4 main Doom WADs that has everything done with PBR materials so have a fair bit of experience with them. Whilst the documentation for the engine is OK, it is more of a Wiki than proper documentation and can sometimes be lacking in detail. For my money, I reviewed dozens of other people's mods and worked out the structure myself using a combination of those, the Wiki site, and trial and error, and it seems to work fairly well, but I'm no authority so may have some things not quite right. I just know what's worked for me. That PK3 I made for you works perfectly on my installation, so I'm at a loss as to why it doesn't work with yours.

How are you confirming whether it's actually doing PBR in game? When I ran your textures up on my end, I did notice that the effect is very minimal and I had to compare with the texture on the oppposite wall to actually see the effect at all. I did this by firing a rocket or plasma gun right next to the wall texture to see it react like a PBR material would. This is a normal issue with GZDoom's PBR implementation as sector lighting doesn't trigger the effect because it's not a proper light source and their PBR implementation is quite weak, especially for metals, unless you add some sort of environment shader to the pipeline. A better way to test it would be to turn the sector lighting right down and then add a dynamic light source (like one of the flickering Doom torch sprites) next to the wall so you can see it working with more contrast.

It could be something to do with how you have your GZDoom client set up, perhaps? Maybe download someone else's PBR materials that are confirmed working by plenty of others and then try those with a clean install of the client?

I just made a video of me testing it so you can see what it looks like in engine: - https://youtu.be/-TJwkRmWkP4 I did have to play with the materials a little to get it to look this obvious however. The metallicity texture had to be inverted as yours was the wrong way around and the roughness map was also redone to make the effect stand out more.

Does this look any better on your side? https://drive.google.com/file/d/1OTE9lO ... sp=sharing
User avatar
phantombeta
Posts: 2198
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: PBR textures not working at all

Post by phantombeta »

Joven0culto wrote: Sun Nov 30, 2025 1:09 pmI have never had to maintain the image extensions for them to work correctly
You only need extensions for full paths. "Vanilla style" 8-characters names don't need the extension and paths put into them.
nor the location of the textures folder with respect to the texture definition file.
This doesn't actually matter for GZDoom, the issue they had is exclusive to the OS itself- you can't have a folder and a file with the same exact name in Windows. GZDoom doesn't care, though, so this is fine.
Even though they are “high-resolution” textures, they have always worked fine without having to put them in the HIRES folder, which really annoys me because I always did it according to the official documentation, and it's wrong.
The documentation and the way you did it are correct ways to do hires textures. The HIRES folder is for automatically replacing low-res textures with hires ones, like for hires texture packs, but you don't have to use it. (And to use the HIRES folder, you need a version of the texture with the "normal" world scale/resolution in the normal textures folder, with the hires version in the HIRES folder)

The PK3s work fine for me. You need a fairly bright light source like the plasma for it to be noticeable, though, rockets and the other coloured lights make dimmer specular highlights. It's also easiest to see at glancing angles, where you can see the elongated tails of the specular highlights.
As said above, keep in mind sector lighting doesn't get affected by PBR, only dynamic lights do. This is because sector lighting has no direction. It's a type of ambient light, and the lighting effects from PBR are directional, so PBR can't work with it.
Also keep in mind PBR doesn't work properly with "standard" dynamic lights, you need the "attenuated" lights for it to work properly.
Post Reply

Return to “Technical Issues”