Blender .egg model (converted using YABEE) not showing up in Panda Viewer

I’ve just created a model of Mars following this tutorial:

It has no animations, just spheres wrapped in textures in the form of colour maps and normal maps.

I used YABEE to export the file from .blend to .egg but when I run pview Mars.egg, nothing shows up.

Even if I load the model into a simple program like this:

self.mars = self.loader.loadModel("models_and_textures/Mars")
self.mars.reparentTo(self.render)

nothing shows up.

Any ideas on what may be going wrong?

A few things occur to me offhand:

First, just to check: did you have the model selected in Blender when you exported it?

Second, in PView, try pressing “c”–if the model appears, then it’s likely placed somewhere away from the scene’s origin, and had been simply not in front of the camera.

Hmm… And finally, when you run PView, do you see any errors in the console/terminal?

Okay so this time, I exported it with everything selected (the model has 3 concentric spheres and I wasn’t sure how to select them so I selected everything, including the camera and lamp).

Now the model shows up in PView, but it is just a white sphere against a grey background.
Also, pview returns no errors.

I’m guessing it might be to do with the textures, although I have pretty much no knowledge of the workings of Blender.

Ah, but that’s progress, at least. :slight_smile:

As to the textures, if they were simply applied by selecting them in the UV/Image editor, then indeed, I don’t think that YABEE observes those. If this is the case, then instead apply them via materials applied to each object–YABEE should then export them happily. (Presuming that none of YABEE’s settings have been changed to prevent it doing so, at least.)

Oh definitely, progress is always promising!

I believe the textures were applied via individual materials in the compositing section, using nodes and layers.

But I’ll take a look at the settings and documentation for YABEE just in case there’s something I missed.

Ohhh–I don’t know whether YABEE observes Blender’s node-system. It might be safer to use old-fashioned materials if it’s not working with a node-based setup.

There is a misconception that the engine can display shaders one to one.

At that time, several texture maps were required, they are mentioned here https://www.panda3d.org/manual/?title=Texturing.

You need to prepare these cards manually for each slot.

Well I’ve just looked at some of the export options and I set the Tex. Processing to Bake (I have no idea what that means but I figured it might help with the textures).

This time, the model shows up as a black sphere on a grey background, rather than a white sphere.

I don’t know if that’s getting closer to the solution, but if YABEE doesn’t work with nodes then I guess there’s no point.

Ah yes, I just found the section in the YABEE guide that says it doesn’t have full support for Blender’s node system. Instead, there is a special node designed specifically to work with YABEE. But it would take me too long to learn Blender and figure out how to use it. I would be better off using an already existing model.

Thanks for the information @Thaumaturge!

1 Like

Fair enough–I’m sorry to read that Blender and YABEE didn’t work out for you!

1 Like

That’s alright, I’m sure I’ll figure something else out :slightly_smiling_face:

1 Like

As a heads up, Blender 2.8’s builtin glTF export has some minimal support for material nodes, and panda3d-gltf adds glTF support to Panda. There is also blend2bam, which will use the builtin glTF exporter when using Blender 2.8.

However, you may run into other problems when using these tools. For example, exporting from Blender 2.8 only supports PBR materials, which Panda can accept, but there is no builtin/auto shader for PBR materials.

Thanks for the heads up!

Eventually I found a free model from clara.io and downloaded the .obj file. When I loaded that into my program, it worked :grin: