Simplepbr rendering issues

Hi all,

I am trying to switch from Panda’s normal shaders to simplepbr, but I have run into some issues.
The image below is from using Panda’s auto shader, everything appears normally.

However, when I switch to simplepbr, I get this:

Note that the building on the left of the cube is a modified version to the ones in front of it, they are not the same model. Some of my models appear to be all black for some reason. Here is an image of the building closer to the light source:

I am almost certain that this has to do with the actual models themselves and for most of these I can re-export, however I am not sure why some quirk up, plus I cannot re-export the actual terrain, which is also coming up as black. All the simplepbr code I’ve done is simplepbr.init(use_normal_maps=True). (main.py @ GitHub - azizalbastaki/Voyager)

In addition to this, I also have another issue where at times I feel like the player model/level shake and vibrate, look at shaking.mov - Google Drive

[UPDATE]

I’ve used the setShaderAuto() for the terrain, still got the shaking problem.

I am considering making a tutorial on how I export models with textures applied from Blender 2.9, but I am not sure if “global texturing” is the recommended way of exporting textures for the Panda3D engine. I am not doing anything particularly unusual to get a result, my process is straightforward. The usual “.setTexture” method works normally, although without the precision of the PB options in Blender.

In a nutshell I just apply a texture with a single physically based node (the Blender material properties tab) to some geometry in Blender with a Cube type UV map which I explicitly apply in Blender with the UV tool. I then texture the geometry in Blender using the Shading window. The entire model is then exported via the Export tool in Blender as a .gltf file (with ‘import gltf’ at the top of the .py file of course, and the patch loader initialized).

This workflow is similar to any “layer-based workflow” you’d find in Illustrator, Photoshop, Inkscape, etc.

1 Like

I’ve been texturing directly from blender but I’ll try doing that, thanks :+1:

Great, I’m happy that might be helpful to you. I do set the textures in Blender though, it’s only here and there that I will actually use setTexture. Being able to call a transparency attribute on a specific Blender model part is also a useful convenience of this approach, IE to get transparent windows in a multi textured vehicle model.

1 Like