Page 1 of 1

PBR materials on MD3 models?

Posted: Sun Aug 19, 2018 6:09 am
by PixelWAD
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.

Re: PBR materials on MD3 models?

Posted: Mon Aug 20, 2018 8:27 am
by R4L
It's supported. HAL 9000 has made weapons with PBR.

Re: PBR materials on MD3 models?

Posted: Mon Aug 20, 2018 10:18 am
by PixelWAD
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.

Re: PBR materials on MD3 models?

Posted: Mon Aug 20, 2018 1:10 pm
by HAL9000
PixelWAD 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.
Here you go, you can use this for testing purposes: Summon WeaponSSG
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?

Posted: Mon Aug 20, 2018 2:40 pm
by PixelWAD
Thanks. Our gldef was nearly the same, with the difference that you point out full texture model path, so did I this time:

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
}
However it does not work. Is it because I'm only using _N and _S as extra pbr textures? You have a full set.

Re: PBR materials on MD3 models?

Posted: Fri Aug 31, 2018 8:57 am
by PixelWAD
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?

Posted: Fri Aug 31, 2018 1:45 pm
by Enjay
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]

Re: PBR materials on MD3 models?

Posted: Fri Aug 31, 2018 2:17 pm
by PixelWAD
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?

Posted: Tue Sep 04, 2018 3:11 pm
by HAL9000
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]
Yeah,original textures are big, it will take time to load them, try to scale them down to idk 512, 256 or less...
This sample was made just for test purposes

Re: PBR materials on MD3 models?

Posted: Tue Sep 04, 2018 3:16 pm
by HAL9000
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
Just try to use mymodeldef and modify it for your models.

Also try this, edit your textures with mspaint(yes mspaint) and save it
Try now.

Re: PBR materials on MD3 models?

Posted: Tue Sep 04, 2018 3:17 pm
by Enjay
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?

Posted: Tue Sep 04, 2018 3:20 pm
by HAL9000
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.
Yes, they will look bad if scaled down manually.
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

Re: PBR materials on MD3 models?

Posted: Tue Sep 04, 2018 3:24 pm
by Enjay
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.