A Journey of the Panda3D

I don’t know why am I still working on Panda 3D despite the failure to export the Blender mesh to the Panda 3D engine but anyway here is a quick update for the development of the Panda3D’s game.

Yesterday after the Panda 3D engine had failed again to render the blender 3D mesh together with its texture on the game scene, I had made another search for the solution on Google but again came up short and just when I was about to give up all the hope and instead concentrated on the other pygame project, a reader name pinguin had left a comment under one of mine Panda 3D’s posts and told me that he had created an example which shows me that it is possible to export the mesh together with its texture with the YABEE extension and I can download his example on this Github’s page: https://github.com/pinguin999/panda3ddemo.

Although the above example still could not help me to solve the mesh problem but due to his effort to encourage me to keep on working on the problem I had decided to stick with Panda3D and continue to develop the next python game using the Panda 3D framework. After a few more searches on the web by myself for the above-mentioned solution, I found nothing new but instead I had found out someone had actually written an ebook about this Panda 3D game development subject which you all can download or read it through this link.

I think I will eventually figure it out the ‘mesh export’ solution by myself after I had decided to spend my time on this issue and get the job done yesterday. Oh well, thank you all again in advance for all those suggestions that you people will provide in the comment box below this post, although it might not work I am really thankful for all of your support.

While the 3D mesh issue is still ongoing here is another short program from Panda 3D website which will render an animated panda if you run it.

from math import pi, sin, cos
 
from direct.showbase.ShowBase import ShowBase
from direct.task import Task
from direct.actor.Actor import Actor
 
class MyApp(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)
 
        # Load the environment model.
        self.scene = self.loader.loadModel("models/environment")
        # Reparent the model to render.
        self.scene.reparentTo(self.render)
        # Apply scale and position transforms on the model.
        self.scene.setScale(0.25, 0.25, 0.25)
        self.scene.setPos(-8, 42, 0)
 
        # Add the spinCameraTask procedure to the task manager.
        self.taskMgr.add(self.spinCameraTask, "SpinCameraTask")
 
        # Load and transform the panda actor.
        self.pandaActor = Actor("models/panda-model",
                                {"walk": "models/panda-walk4"})
        self.pandaActor.setScale(0.005, 0.005, 0.005)
        self.pandaActor.reparentTo(self.render)
        # Loop its animation.
        self.pandaActor.loop("walk")
 
    # Define a procedure to move the camera.
    def spinCameraTask(self, task):
        angleDegrees = task.time * 6.0
        angleRadians = angleDegrees * (pi / 180.0)
        self.camera.setPos(20 * sin(angleRadians), -20.0 * cos(angleRadians), 3)
        self.camera.setHpr(angleDegrees, 0, 0)
        return Task.cont
 
app = MyApp()
app.run()
http://islandstropicalman.tumblr.com/post/182156611123/panda3d-in-action

If you search on the internet you will not find that many articles that are related to the Panda 3D framework. Panda 3D is a great 3D rendering engine and since not that many people are talking about it I would like to create a whole new game with it and leave the coding detail on this website. But first of all, I need to find a solution to export the Blender mesh in the egg format together with its texture before we can go even further. If any of you have come out with the above solution then do leave your comment below this post. Back to work!

  • Pinguin

    Hi I updated the docs in the repo. There is now a readme with the steps how to reproduce my belder cube.

    • Way Chooses

      Alright, will take a look