Unable port a simple white sphere from Blender to Panda3D

I am trying to port a simple white sphere made in Blender 2.80 to Panda3D but it looks like this (It is a dark blue because its overtop the blue table–if I change the table to red I get a dark red sphere):

Even though in blender it looks like this:

Here are the steps I took:

Then I add a material, keeping default settings:

I save and export the .blend file using blend2bam:

blend2bam models/blender/sphere2.blend models/sphere.bam --blender-dir /Applications/Blender.app/Contents/MacOS/

Then I load in the .bam file:

ball_node = loader.loadModel(model_paths['sphere'])

I also tried this Blender 2.80 compatible https://github.com/kergalym/YABEE and got this result on the same .blend file:

I’m sure I’m doing something silly. Could someone please point me in the right direction? Ideally I would like to blend2bam but I don’t care if it works.

Thanks for your time. Cheers.

Since I haven’t gotten any response yet, I thought maybe I would amend what I was asking. What workflows do you guys use that can create the white sphere I’m after? I.e. blender version, specific checkboxes when creating a material in Blender, what exporter you use, etc.

Which version of Panda3D are you using?

Could you post the .bam file?


Sure. Here is both the .bam file created with blend2bam, and the .egg file created with YABEE.

sphere_blend2bam.bam (402.9 KB)

sphere_yabee.egg (1.4 MB)

Thanks for taking a look :slight_smile:

I’m pretty new to Panda3d myself, but I have an idea: how are you setting the table color? I see you’re reparenting the ball to the table. If you then do something like table.set_color() it will tint all the children node that color as well. Try adding the ball to render directly to see if you get the color to show correctly.

Hey! So the color of the table is actually defined by a texture. If I do not load the texture, here is what the sphere_blend2bam.bam spheres look like:


And here is what the sphere_yabee.bam looks like:


That looks like it could be right…

If I add the texture back, but reparent the balls to render, I get this:

You were right!

Is there a way I can keep those as children of the table but have them not affected when I mess with the table texture?

But now if I make the sphere like this:

I still get white spheres in panda3d… Is anyone able to load this egg file into panda and have it look like reflective and pink?

sphere_yabee.egg (1.4 MB)

Thank you! I’m glad I was able to help.

So, I sometimes watch Godot tutorials just to learn more about game dev (still love Panda3D, not planning to switch!). Godot uses a very similar node tree kind of setup. I’ve noticed people will create an empty nodepath at the top, then parent their geometry under that. So, they’re node organization looks more like:

NodePath 'TopLevel'
   |--- 'Table'
   |--- 'sphere'

Then you can adjust Table and it doesn’t affect the spheres. If you add the following lines to your code, before you init showbase:

load_prc_file_data("","want-directtools #t'")
load_prc_file_data("","want-tk #t")

Then this debug window will pop-up with your program when you run it. It has an actual tree view of your nodes. That really helped me in understanding nodepath organization.

This plagues me as well. I opened up your egg file in notepad, and noticed the base rgb was like (0.8,0.8,0.8), so definitely not pink. I have the same problem with all my models. I can’t seem to get materials out of blender correctly at all.

Thanks for your help. If I make any progress on that front I’ll post here, please do the same. What panda and blender versions are you using? I’m blender 2.80 and panda 1.10.6

Is it still an issue if you use panda3d-simplepbr to render the object?

Ya… At least with the most basic integration, adding simplepbr.init() to ShowBase

I’m a newby, but i wonder if lighting is part of the problem.
By default, Blender inserts a camera and light into the collection. I find these to not be
helpful in lighting models in my scene. I delete Blender’s
light and camera from the collection, and instead provide lighting in
When I leave Blender’s default light in the collection, my Panda3d also renders a dull
sphere. When I light it with global lighting from the Panda3d environment, the sphere looks
as it should.