Complexpbr -- A Module for PBR IBL, SSAO, SSR, AA, Vertex Displacement and More in Panda3D

Regarding the specular intensity, I think that it’s likely worth trying that separation, and seeing what you get.

(Noting that at the least one could set the two values in tandem, if one so desired.)

As to how artists are setting their “roughness” values, indeed, that is tricky to guess at I fear! But it’s also something that I suspect may vary from one artist to another, so I wonder whether it’s feasible to handle this well without some form of parameterisation.

As to contrast, I don’t suppose that you can just turn up the intensity of your lights, can you? :stuck_out_tongue:

(Well, I might suggest experimenting with reducing the intensity of your ambient lights, perhaps.)

One more thing that occurred to me, if I may: I’d suggest giving your ambient lights a slight blue tint. That can, I think, give a scene a bit of depth and sense of realism.

Here’s an attempt to implement your proposed changes. I added an additional shader input (with a default of 0.0) to modify the specular contribution. The following three screenshots show the “specular_factor” at 1.0, which should be the “natural” specular contribution before it’s modified by the model-level ‘ao’. I also dimmed the ambient contribution, and made it slightly bluish.

Here are two similar shots with the “specular_factor” at a value of 10.0 showing a somewhat exaggerated specular contribution:

Do these look better than the originals to your eye, and if so, do the exaggerated specular shots look better still?

2 Likes

They do look improved, I do think! :slight_smile:

Specifically, I think that the first set of new images look the best–the exaggerated specular contribution looks, well, exaggerated.

I might play with the exact value of your specular parameter–maybe tweak it downwards a bit–but overall I do think that this looks better! :slight_smile:

Hmm… Question: Would it be possible to have the blue contribution of the ambient light be primarily felt in the darker regions? Or might it be perhaps a good idea to make the main light slightly orange- or yellow- ish to compensate? (That is, to the end that the well-lit areas are no longer tinted blue, while the shadows are.)

Thanks for the helpful tech-art suggestions here. Here are two shots with “orange in the highlights and blue in the shadows”, I believe.

Somewhat less orange, but brighter:

I have also updated the complexpbr repo with the specular adjustment feature, and have added a usage example in the README.

(EDIT) I’ve updated the original post with the following based on Thaumaturge’s suggestions. I do believe these are an improvement, and brought to light (pun intended) the need to add an additional parameter for specular modification.

3 Likes

Ooh yes, much better! :slight_smile:

(I’d go with the light-colour of the second set and the brightness of the first, myself.)

Also, the suggestions are my pleasure, and I’m glad if I’ve helped! :slight_smile:

1 Like

It’s looking awesome! :grin: Thanks for experimenting with it Simulan, it’s super cool to see what complexpbr can do.

I think if you added some irradiance to the pipeline it’d be the cherry on top so to speak. GTR: Irradiance - Google Slides

2 Likes

I would very much like to use complexpbr because it looks great and is easy to use. However, my workflow is very much egg file based, so for me its not so easy to use. I also don’t know enough of gltf. If I would start to learn to work with complexpbr by using it in the Roaming Ralph sample, there’s only a black screen at the moment, probably because the models in there are egg instead of gltf, right? So is there an easy way to convert these to gltf? Can I simply do that in the latest version of Blender? Are there other conversion tools that you know of?

1 Like

Thanks for the question, and glad to see you’re interested in using complexpbr.

I would suggest trying egg2bam first as documented here: Converting Egg to Bam — Panda3D Manual

Regarding working between .egg and metal-rough texturing, it’s possible and we’ve demonstrated it before in a project (though not with complexpbr specifically). But, I’d really recommend working on newer Blender versions if you are expecting full support out of complexpbr.

To be clear, complexpbr supports both .bam and .gltf files, assuming you’ve correctly exported them with a tool such as the Blender glTF exporter and/or gltf2bam (which is a CLI tool included in panda3d-gltf). You’ll need to package into .bam anyway if you plan to make a Panda3D distributable.

Hey, I saw your tests with the helmet but never got around to replying - it looks very great! I was especially impressed with how quick you got it set up, it really does seem like the pipeline you’re putting together is pretty powerful/flexible!

Thanks for doing the test!

1 Like

Yes, I understand. However, I make my environments with a database designer that I made whichexports a big *.egg file with an environment that can cover large areas, so for the most part (except for specific 3d models) I don’t use blender. And to make all these environments from scratch in Blender would take months of work. Maybe I can find a way to read these egg files into Blender and then convert to metal-rough texturing and save as gtlf files.

I think that it might be worth clarifying that the problem with Roaming Ralph is, I imagine at least, not that it uses .egg files–I doubt that .egg files lack in any relevant way.

Rather, the problem is that those specific models happen to lack certain important textures involved in the PBR process. Textures that a .egg file can potentially have, I imagine–but that Roaming Ralph doesn’t have. Without those textures, the rendering presumably lacks important data (at a guess, normals, metallicity, roughness, and probably others besides), and so it doesn’t come out as desired.

Now, I don’t know Complexpbr very well myself, so the following is merely an informed guess, but you might be able to jury-rig Roaming Ralph to work with Complexpbr by creating simple stand-ins for all of the relevant textures and applying them to the root “render”-node. (Noting first what each texture is expected to hold; simple black likely won’t produce the desired output.) At the least it seems worth trying!

The egg models in roaming ralph do have normals, but only 1 texture. It would be great to know how adding additional textures or maybe doing something with the materials can be enough to be able to use them in complexPbr. Or maybe by changing the models during loading via python to add textures or material properties.

The models have normals, but I imagine that they don’t have normal map textures.

I imagine Roaming Ralph would need to be remade (kinda like Sponza was, iirc) to utilize PBR textures. Roaming Ralph as it exists now doesn’t really make sense in the context of what complexpbr expects as input to compute things like the IBL contributions, including the aforementioned texture maps.

One would need to actually make the appropriate textures for PBR. You can mix scene shaders a bit. One way is by setting complexpbr only on a specific node, like here to render the bridge but not Ralph:

IE

complexpbr.apply_shader(bridge_model)  # just shade one PBR model not the whole scene
1 Like

Version 0.5.2 Update:

  • Added TBN logic to the screenspace_init() normal procedures to theoretically improve the accuracy of the screenspace effects. The core functions affected are getViewPos(), getNormalMatrix(), transformNormalToViewSpace(), and getViewNormal() in min_f.frag .

  • Usability improvements including no longer having to copy the output_brdf_lut.png file. complexpbr will generate a dummy LUT for you, and also offers a new optional “lut_fill” input to complexpbr.apply_shader() This feature is automatic, so if you provide the output_brdf_lut.png file in your program directory like normal, it will default to that .png image ignoring the lut_fill input.

Comparison image between versions 0.5.1 (on the left) and 0.5.2 (on the right) default screenspace_init() settings:

And 0.5.2 with default settings after copying the provided output_brdf_lut.png (now optional).

3 Likes

Thanks for such a fantastic project, I wonder under what license your project addressed. and are there any tutorials which can help Nebiews to use your project in our application?

1 Like

Thanks for saying so! My pleasure.

It is BSD-3.

Not yet, but I plan on making an update to a different program soon that can double as a “setting up complexpbr” type tutorial.

2 Likes

7/6/23 Lumberyard Bistro (Amazon Lumberyard Bistro | NVIDIA Developer)

Via a graphics programmer friend, I have heard that both Godot and UE5 have a hard time with this scene. With Panda3D and complexpbr however, this bistro scene could be used at a playable framerate.

5 Likes

Really well done on that! :slight_smile:

1 Like

These would fit nicely on the landing page of panda3d, I think. Would be nice to see an update there, the current pictures are probably 4 years old, I think… and this scene looks a lot more like a scene from a game than the current pictures…

2 Likes