Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mr.Rocket

Simple PBR Demo

Recommended Posts

Hi,

 

I've created a simple demo in pk3 format, map included, which shows how PBR can be setup.

I haven't seen much on the side of really useable downloadable examples, so here ya go.

I zipped it up so I could upload it here.

 

screeny.png.f48792a2e41c38a899bfeddbb203ec6e.png

 

Requires the latest GZDoom or QZDoom to run.. 

Just extract it and then drag n' drop the pk3 on to your GZDoom or QZDoom exe, or load it up in GZDB, or dissect it, or modify it to your liking.

That's why I made it, hopefully it will help someone.

 

mr_PBR_Demo.zip 

 

PBR Skulls FTW!

 

Added a mix of PRB and animated brightmaps:

 

screeny2.png.0ccebbfd8fadcedd1c725e94f316e4b8.png

 

mr_PBR_Demo2.zip

 

Yay PRB brightmap checker board!

 

 

 

Cheers

 

 

Edited by Mr.Rocket

Share this post


Link to post

That's cool, but I personally prefer everything for Gzdoom, simply because it runs on Android.

Are there plans to add PBT go GZ?

Share this post


Link to post

QZDoom is just a testbed for some experimental GZDoom features, and currently there is nothing that QZD can do that GZD cannot. Note that PBR was implemented directly in GZDoom, it has never been at any point exclusive to QZD. (On the other hand, it has been exclusive to GZD. There it's QZD that had to play catch-up.)

 

However, as far as GZD on Android goes, that depends on what version is currently bundled in Delta Touch, so I don't know if it's up-to-date enough to handle PBR.

Share this post


Link to post

Ok yeah it seems I was running GZDoom 3.2x before which apparently PBR wasn't compatible with yet. ~ it wouldn't know what the keyword material was.

Updated the post to run the latest version, as I'm not sure the exact version(s) when PBR was adopted to GZ or QZ.

Evidently it was sometime after the 3.2x build though.

 

 

Thanks

Share this post


Link to post

Ah ok thanks for the look up Gez!

 

Oh and ah ha!

Texture tex_heightmap

I'll have to test this out.

 

 

 

Edited by Mr.Rocket

Share this post


Link to post

Hi, 

 

I updated the OP with PBR+animated brightmaps also.

View the scripts of how I had to go about doing them.

 

Thanks

Share this post


Link to post
34 minutes ago, ChrisVR said:

Which settings in options I need on to get it to work?

 

If you have the latest version of GZDoom and a modern enough GPU to display them, I believe the only thing you need to ensure is turned on is dynamic lights.

 

Share this post


Link to post
1 hour ago, ChrisVR said:

Apparently my GTX680 is not enough. :(

 

I play these two example files with GZDoom 3.6pre-2 on a GTX660 with no problems.

Nvidia driver 388.13

Share this post


Link to post

I'm on 388.71, release date 12/20/2017

There seems to be no PBR at all...


GTX 680, Windows 7. Maybe that is the problem?

Share this post


Link to post

I tried Duke HRP Polymer with PBR textures and it just works, 3D effect is really strong, however, all the sample PBR for Doom are just really flat. I'm running gz 3.5.0.

Share this post


Link to post

Are you sure that you are starting with the OpenGL renderer

Wkmb1w7.png

 

and not with the software renderer?

bHfmCw0.png

 

Done with gzdoom-3-5-0-x64

 

Edited by Kappes Buur

Share this post


Link to post

Yes, i browsed through all options and none of them looked like with depth. Maybe a single screenshot is misleading, but in my game is just a flat scrolling wall. The skulls don't seem to have any depth. I'll post a screenshot later

Share this post


Link to post

Okay, I've got my textures to work, they are glossy and do reflect light source. But they are completly flat. There is no parallax at all, only an illusion. Is this going to get enhanced in the future?

 

Also, can you apply PBR to MD3 models? How?

Share this post


Link to post
12 hours ago, ChrisVR said:

Also, can you apply PBR to MD3 models? How?

 

Yes it's possible though I have forgotten the exact method. I could dig it up (I made a test model recently) but I'm too lazy so someone else will have to show you how to. But it's possible to do.

Share this post


Link to post

Looking forward to. I tried to do it the same way as wall textures but i see no effect applied

Share this post


Link to post

I've not got around to testing PBR with models yet, but if your model is already showing up in game as-is; You should be able to just apply PBR textures to the given material that the model is already displaying.

 

It is after all just that, an applied material.

 

 

Share this post


Link to post

here is my code

// RPG FPP PBR
material texture 2544_rpg_d
{
 normal             models/firstperson/2544_rpg_n.png
 specular           models/firstperson/2544_rpg_s.png 
 specularlevel      8 // default 0.7
 glossiness         16 // default 8
}

and it does not seem to have any effect on model in game

i have even defined these model textures in textures.txt file, i even tried moving _d texture to folder textures - nothing worked

Share this post


Link to post

Here is some code I had from my PBR test cube. I should point out though that this is a old file and that I barely even remember what this means since I haven't messed around with PBR for a while. Still perhaps it's useful for you:

 

material texture "models/cube/cube.png" {
    
    normal "materials/cube/cube_n.png"
    metallic "materials/cube/cube_m.png"
    roughness "materials/cube/cube_r.png"
    ao "materials/cube/cube_a.png"   
    
        
    // Note when creating textures: PBR Specular = inverted Roughness and vice versa      
    
    //specular "materials/testcube/testcube_s.png"
    //glossiness 10
    //specularlevel 10

}


material texture "models/cube/cube.png" {
    brightmap "materials/cube/cube_bm.png"
}

Share this post


Link to post

so I need to take the _S texture, and invert its colors to save it as _R?

could it possibly matter if my PBR textures are sitting together in models folder?

Share this post


Link to post
4 minutes ago, ChrisVR said:

so I need to take the _S texture, and invert its colors to save it as _R?

could it possibly matter if my PBR textures are sitting together in models folder?

 

How are you organizing your PBR materials? There are actually 2 ways to do this. The first is by using auto-load folders and the second more complex method of using a GLdef lump.

 

But like I said I haven't messed with PBR texturing for a while because I have been busy with other things and so I have kinda forgotten exactly how this works. Odds are you are going to have to wait for someone else to explain the details more since I have simply forgotten them :/

Share this post


Link to post

i made gldef file with #include to my other file materials.gl. In there I have the code.

I keep my model textures together with MD3 file, so for example models/firstperson/model.md3 / model.png model_s.png

Share this post


Link to post

I'd imagine you probably do, but do you have a dynamic light next to your model? you won't see PBR textures in Gzdoom otherwise.

 

Share this post


Link to post

Yes, it's on. My custom wall textures display just fine but when i try to do it with md3 model, it does not..

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×