Render game scene with Panda 3D

Today we will continue to explore Panda 3D, after a day of searching online for the method to export the whole mesh created with Blender which can then be used in Panda 3D’s game I have found two of them. 1) Exporting the mesh in the Direct (x) format 2) Using YABEE to export the mesh in the egg file format. I have tried both and the result is still the same, the mesh has been rendered on the game scene but without any texture on it. What could have possibly gone wrong? Maybe if I light up the game scene then the texture will appear? I have not decided yet whether do I want to use Panda 3D or another game engine to create the next python 3D game.

Anyway, Panda 3D has it’s own game graphic so if we use it’s game graphic instead then there is no problem rendering the graphic on the scene.

This is the program on their website which will render the game graphic on the game scene.

from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
    def __init__(self):
        # Load the environment model.
        self.scene = self.loader.loadModel("models/environment")
        # Reparent the model to render.
        # Apply scale and position transforms on the model.
        self.scene.setScale(1.5, 1.5, 1.5)
        self.scene.setPos(3, 42, 0)
app = MyApp()

You will see below scene if you run the above program.

I am working on the other pygame project besides trying out Panda 3D and in the next chapter we will continue to develop that other pygame project since there is no further breakthrough in this Panda 3D game graphic stuff, if you know the method to export the mesh together with texture in Blender do let me know about it. Thank in advance.

2 thoughts on “Render game scene with Panda 3D”

Leave a Reply

Your email address will not be published. Required fields are marked *