How to use hdri along with simplepbr?

Just like the title.I need a sky in my project and I have to add environment lights in my scene.I noticed that a good environment light is vital to pbr-rendering.So,any demo and workflow please?

And…I just discovered that there is a leveleditor folder in direct folder.I am confused.Does panda3d have an editor?How to use it?

Ah, would this not be better suited to the “Scene Editor” thread?

In any case, my understanding is that the editor found there is old and unsupported, and overall deprecated.

So, in a technical sense, there is a level editor bundled with Panda–it’s just not likely to be a useful one, if I’m not much mistaken.

This has not been implemented yet.

1 Like

OK…Does the level editor from CMU still working?

thanks for your reply.
Is there any way to achieve my goal?
And…when will you support it?

I have nothing to do with this project. I myself am expecting several functions, a shadow for a point light source, image-based lighting and correcting a couple of errors from the list of reports.

Forward this question to @Moguri, he is the developer of this project.

I don’t know offhand, but I seem to vaguely recall that it doesn’t work any more. At the least I wouldn’t recommend relying on it.

There are however a few community-driven projects developing editors, I believe–if you look around the Showcase sub-forum here you might find something of use to you, perhaps.

I am not involved in any of the level editor projects, but I can say that, as mentioned, HDRi/IBL is still work-in-progress for simplepbr.

The current work is available on the ibl branch. Only IBL diffuse lighting is implemented; specular still needs to be done. I am pretty low on free time these days, so I do not know when it will be done, but PRs to help move things along are always welcome.

2 Likes

Thanks for your generous work.Please keep up doing.
Another question,How to use simplepbr with heightmap?
I’ve imported simplepbr and tried this

    terrain = GeoMipTerrain("worldTerrain")
    terrain.setHeightfield("heightmap.png")
    terrain.setColorMap("texturemap.png")  
    terrain.setBruteforce(True)            
    root = terrain.getRoot()               
    root.reparentTo(render)               
    root.setSz(60)                        
    terrain.generate()                     

And I just discovered that the terrain is dark.It seems that "terrain.setColorMap(“texturemap.png”) " didn’t work.

I think you need to adjust the material according to the pbr requirements, and also use this instruction to adjust your scene.

Potentially there may still be a problem with the name of the UV coordinates.

At the moment, there is a problem with the structuring of the material. Since there is no way to inform panda about the type of material that needs to be used for lighting techniques. If panda had a special call to change the type of shading, then these problems would not exist. Or a special type of class, something like MaterialPBR, I have repeatedly suggested to rdb to approve the idea as a roadmap for the development of panda.

OK…Is there any code demo please?

Note that setColorMap affects the vertex colors. A terrain behaves as any other object. You want to apply a texture instead, as well as a Material object, as any other object.

wow,Hello,rdb.
Thanks for your reply.
Well…Could you please just show me the code?As a noob,I really don’t know what you mean.
Why it just won’t work since

?
I’ve made a model with textures in blender.Then import to panda3d,it works fine.
Maybe you mean I need to make terrain in blender?

Create a Material object with the desired base color, roughness, metallic factors, and assign to the terrain. And assign a Texture object as well.

mat = Material("terrain")
mat.base_color = (1, 1, 1, 1)
mat.roughness = 1.0
mat.metallic = 0.0

tex = loader.loadTexture("texturemap.png")
terrain.getRoot().setMaterial(mat)
terrain.getRoot().setTexture(tex)

You can apply roughness/metalic/occlusion maps and emission maps via additional texture stages, if desired.

1 Like

Oh,It works!!!
Thank you~Thank you~Thank you~