PBR materials on MD3 models?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
PBR materials on MD3 models?
Is it possible to apply PBR materials definition (via gldefs?) for 3D models?
I tried to follow the same steps as for defining wall textures as PBR. Those do work, but if I replace the path to the one for my MD3 model, it does not seem to have any effect in the game.
i have also tried to move them manually into textures/specular/normal and applying them to TEXTURES.txt so the engine can recognize them, but it does not work.
So either I'm doing something wrong, or MD3 PBR is not supported yet.
I tried to follow the same steps as for defining wall textures as PBR. Those do work, but if I replace the path to the one for my MD3 model, it does not seem to have any effect in the game.
i have also tried to move them manually into textures/specular/normal and applying them to TEXTURES.txt so the engine can recognize them, but it does not work.
So either I'm doing something wrong, or MD3 PBR is not supported yet.
- R4L
- Global Moderator
- Posts: 404
- 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: PBR materials on MD3 models?
It's supported. HAL 9000 has made weapons with PBR.
Re: PBR materials on MD3 models?
Can you link me to his files so i van have a look?
Using the same way as for wall textures didn't work for me.
Using the same way as for wall textures didn't work for me.
Re: PBR materials on MD3 models?
Here you go, you can use this for testing purposes: Summon WeaponSSGPixelWAD wrote:Can you link me to his files so i van have a look?
Using the same way as for wall textures didn't work for me.
https://www.dropbox.com/s/d73rqwb816bq0 ... E.rar?dl=0
You can also combine PBR with Hardware shaders
Gif from another discussion
Spoiler:
Re: PBR materials on MD3 models?
Thanks. Our gldef was nearly the same, with the difference that you point out full texture model path, so did I this time:
However it does not work. Is it because I'm only using _N and _S as extra pbr textures? You have a full set.
Code: Select all
// RPG FPP PBR
material texture "models/firstperson/2544_rpg_d.png"
{
normal models/firstperson/2544_rpg_n.png
specular models/firstperson/2544_rpg_s.png
specularlevel 8 // default 0.7
glossiness 16 // default 8
}
// FPP DUKE HAND PBR
material texture "models/firstperson/duke_hand_d.png"
{
normal models/firstperson/duke_hand_n.png
specular models/firstperson/duke_hand_s.png
specularlevel 8 // default 0.7
glossiness 16 // default 8
}
Re: PBR materials on MD3 models?
A week passed by and i still want able to get it to work. My walls and flats work with pbr, but not a single md3. Sample above does work
Re: PBR materials on MD3 models?
Dunno if it makes any difference but have you tried putting quote marks around all of your file paths, not just the material texture one?
[edit] As an aside, I assume it's because all the images are big and all loading at the same time but with the demo file, when I type "give weaponssg" at the console, the game freezes for something like 15 seconds until the weapon appears and the game then plays normally from that point on. And that's on an i7 machine with an SSD and a 1080. [/edit]
[edit] As an aside, I assume it's because all the images are big and all loading at the same time but with the demo file, when I type "give weaponssg" at the console, the game freezes for something like 15 seconds until the weapon appears and the game then plays normally from that point on. And that's on an i7 machine with an SSD and a 1080. [/edit]
Re: PBR materials on MD3 models?
My game freezes for a little when trying the sample above as well, but my own sample just doesn't work with pbr. I'll try your suggestion but i think i have already tried that
Re: PBR materials on MD3 models?
Yeah,original textures are big, it will take time to load them, try to scale them down to idk 512, 256 or less...Enjay wrote:Dunno if it makes any difference but have you tried putting quote marks around all of your file paths, not just the material texture one?
[edit] As an aside, I assume it's because all the images are big and all loading at the same time but with the demo file, when I type "give weaponssg" at the console, the game freezes for something like 15 seconds until the weapon appears and the game then plays normally from that point on. And that's on an i7 machine with an SSD and a 1080. [/edit]
This sample was made just for test purposes
Re: PBR materials on MD3 models?
Just try to use mymodeldef and modify it for your models.PixelWAD wrote:A week passed by and i still want able to get it to work. My walls and flats work with pbr, but not a single md3. Sample above does work
Also try this, edit your textures with mspaint(yes mspaint) and save it
Try now.
Last edited by HAL9000 on Tue Sep 04, 2018 3:18 pm, edited 1 time in total.
Re: PBR materials on MD3 models?
I actually tried scaling them right down to 128x128 shortly after I posted. They loaded instantly but, obviously, the visuals took a big hit. However, the result wasn't as bad looking as I expected.
Re: PBR materials on MD3 models?
Yes, they will look bad if scaled down manually.Enjay wrote:I actually tried scaling them right down to 128x128 shortly after I posted. They loaded instantly but, obviously, the visuals took a big hit. However, the result wasn't as bad looking as I expected.
To make them look good, I would have to export/render them from substance in 128x128 (or any other smaller res.)
Original substance was 4k/texture iirc, and it was not meant to be used in GZD
https://sketchfab.com/models/2fec5ea4c7 ... 4a0dfc27d4
Last edited by HAL9000 on Tue Sep 04, 2018 3:26 pm, edited 1 time in total.
Re: PBR materials on MD3 models?
Understood. I knew they wouldn't look great scaled down. It was more of an exercise in checking the loading time and it made a difference (quarter of a minute to effectively instant is a big improvement). I guess if someone was using something like this in an actual mod, they would have to find an acceptable compromise between load time and appearance.