Trying to achieve most authentic view of glb models as possible in SimplePbr

Hi, i am trying to achieve most authentic view of glb models as possible in SimplePbr
the problem is glowing details not match original.
the code:

from direct.showbase.ShowBase import ShowBase
from panda3d.core import DirectionalLight, Vec4, Vec3, TextureStage
import simplepbr

class MyApp(ShowBase):
def init(self):

    ShowBase.__init__(self)
    simplepbr.init(use_330=True, enable_shadows=True, use_normal_maps=True)
    self.set_background_color(0.1, 0.1, 0.2, 1)  # Dark blue-gray background

    cube = self.loader.loadModel("leather_shoes.glb")
    cube.set_scale(1, 1, 1)        # Larger size for visibility
    cube.set_pos(0, 0, 0)          # Positioned above ground
    cube.reparent_to(self.render)

    sun = DirectionalLight("sun")
    sun.set_color(Vec4(1.0, 0.95, 0.9, 1) * 9.5)  # Warm white light, slightly intensified
    sun_node = self.render.attach_new_node(sun)
    sun_node.set_pos(10, -10, 20)  # High and to the side
    sun_node.look_at(0, 0, 0)      # Pointing towards the origin
    sun.set_shadow_caster(True, 1024, 1024)  # 1024x1024 shadow map

    lens = sun.get_lens()
    lens.set_film_size(20, 20)     # Size of the shadow frustum
    lens.set_near_far(1, 100)      # Near and far planes for depth precision

    self.render.set_light(sun_node)

    self.camera.set_pos(15, -15, 10)
    self.camera.look_at(0, 0, 0)

app = MyApp()
app.run()

how it look in Online viewer

And this is how it look in Panda3d

model:

Summary

Leather shoes - Download Free 3D model by kenprol [c2a5343] - Sketchfab

Could be completely off the mark as a noob.

But either your environment/camera lighting settings are off or are material chosen and it’s bloom effect.

Also to compare 1 to 2 their is something casting a shadow in image 1 which is going to affect lightening.

Stumbled over this recently and explains somethings trying to express.

Using Photometry to Render Real-World Light Sources Consistently - Alex Lee

Complete advice form a noob, remember that.

It does look as though either bloom is missing, or the light isn’t strong enough to produce a bloom.

So, just to check: are your lights appropriately bright? What happens if you increase their power (above a value of 1)?

And in addition to the post above mine, this post suggests that it might be worthwhile experimenting with simplepbr’s “exposure” value.

as you can see in code only direct light used and it have * 9.5 intensity,
and no point light used (which can give some foggy look)
i partially solve this with

    filters=CommonFilters(self.win, self.cam)
    filters.setBloom(size="large")

But now i have another problem, i want to apply simplePbr setting separately on each model
for example two cube in scene but one have env map,other not,
one have glowing elements (using setBloom), other not. I used SimplePbr pipeline but it’s not actually works, it set settings on both cubes.

And thanks for link it’s quite useful.

Ah, you’re right–I wasn’t looking at the code, for which I apologise!

I’m glad that you’ve found a workaround–although I do wonder why you’re not seeing bloom using just simplepbr…

Did you try that “exposure” setting that I mentioned? Did it have any effect…?

I think that the problem here is that the “bloom” effect is a post-processing effect: it takes place after all of the objects have been rendered, affecting the entire window.

So, I would suggest instead adjusting the objects so that they don’t have the conditions that produce the effects that you don’t want: that an object that doesn’t show the environment map not be reflective, that an object that doesn’t bloom have dimmer lighting applied–or something to that effect. It might take some experimentation.

With regards to bloom specifically, I suspect that it would help a lot to get simplepbr’s “bloom” effect working, without the “CommonFilters” effect…

yes, almost the same but a bit brighter.
Yes i tried separate bloom from one cube with two cameras and it’s more or less work
aside a problems with two camera moving.
I would be happy with any glow effect really, but it seems there is no glow without bloom in Panda3d?

Fair enough!

That’s… not quite what I meant, I believe. ^^;

What I’m saying is that things like bloom and environment reflections only show up under certain conditions, I believe. Environment reflections, for one, should be controlled by the properties of the material applied to the object, I would think. Thus, if you change those conditions for one object or another, you should be able to control these effects.

(Bloom via the “CommonFilters” mechanism might be a greater issue, as I don’t know whether it makes use of HDR.

It would likely be more useful to get bloom working in simplepbr and to drop “CommonFilters” for this purpose, as I believe that it does make use of HDR.)

I don’t know offhand whether it produces bloom, but you can try applying an emission map to your object.

(I don’t have an example to hand, but you can try searching the forum for more on this.)

No luck with this too, one and only working solution is two camera setup one with bloom effect one without.

I don’t want to sound like a bore, but there is no information in the description that bloom post processing is supported.

https://blender.stackexchange.com/questions/206743/what-is-the-difference-between-using-emission-and-bloom-effect

I am aware of that, that is exactly why i’m doing this, trying to do bloom in simplepbr.
I tried your tron example and it’s actually looks fine from one side but from other side it’s transparent (or actually overlapping) because of render2d.

I remember experimenting with post-processing, but I don’t remember the details anymore, direct (not deferred) rendering has a problem, there is no access to intermediate buffers to implement some effects correctly. It looks like you need to create an additional passageway for some bloom effects, and combine it with the simplepbr output.

As for experimenting with tron, as far as I remember, I then used a stencil buffer to remove the influence on the entire scene and I did some things wrong then.

I think before rendering in simplepbr, you need to create several necessary passes yourself using these instructions.

1 Like

Hmm, you’re right–and looking at the post to which I linked earlier, it says that simplepbr handles HDR, but doesn’t mention bloom, in fact.

So fair enough, and my mistake!

In which case, while it may be more, well, complex, it might be worth looking at complexpbr, which from what I see does support bloom. (A bloom effect is visible in certain screenshots, and the example code includes demonstration of how to set it up.)