Finally, the mesh has been exported to Panda3D

These two days I am really busy working on the new video editing project and I also had suffered a flu yesterday, therefore, I have missed out a few posts on this website. I promise you that starting from now on this site will continue to progress and I will write as many posts per week as possible. We will create two projects at the same time, the pygame’s project and the Panda 3D project. Talking about Panda 3D, I would like to thank Mr. Pinguin for providing such a piece of valuable information which helps me to solve the mesh exporting issue which I had mentioned about in the previous post. After I have run the project again with the below code and with a new mesh here is what I get.

from math import pi, sin, cos
from direct.showbase.ShowBase import ShowBase
from direct.task import Task
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.0, 1.0, 1.0)
        self.scene.setPos(-8, 40, 0)
app = MyApp()
The mesh created with Blender

Here is the link to the solution I am talking about.

Below are the steps we need to take to export the mesh in the egg format in Blender.

  1. Start Blender with default cude.
  2. At the top switch from Default to UV Editing
  3. With mouse in right window. Press Tab to go into edit mode.
  4. With mouse in right window. Press U for Unwrap an than choose a mode for unwapping. (Smar Unwarp for example)
  5. In the left window press +New next to the image symbol. Choose a color or UV Grid in Generator Type.
  6. Image* -> Pack Image (Not Pack as PNG!)
  7. On the top go back to Default
  8. In the right bar go into the Texture Tab (Small red white Icon)
  9. Select Image or Movie in the Type drop down.
  10. In Image Sub Tab click the Icon left to the +New button. And select the Image.
  11. In Mapping change Generated to UV and select Map UVMap
  12. Save Blender File
  13. Export with YABEE

One more thing you need to keep in mind is that the above solution will not work in the Blender Cycle mode. If anyone has any idea on how to export the mesh in Blender Cycle do let me know and I would be happy to give you a link back to your solution page.

I am just playing around with the above-mentioned solution today and will seriously look into it tomorrow, stay tuned!