I’m trying to import a custom model into Panda3D by modelling and/or importing in Blender and turning them into .bam files with blend2bam. Here’s how my model looks in Blender with the texture settings I’m using:
I save the .blend file to my project folder and convert it to a .bam file (in the same folder) using blend2bam, using only the required arguments (src and dst).
Here’s the result:
This is in an empty project, the entire game’s code is this:
from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor
class App(ShowBase):
def __init__(self):
super().__init__(self)
self.player = Actor("assets/models/player.bam")
self.player.reparent_to(render)
self.player.set_y(20)
app = App()
app.run()
It seems to not load the texture at all. Furthermore, if I set the texture manually with set_texture, it looks like this:
So the model doesn’t seem to hold texture information, but even after setting it manually it doesn’t get mapped properly.
It looks like blend2bam doesn’t work with newer versions of Blender. I was using version 3.3.1 in that screenshot, but using the 2.83 LTS version worked. My guess is it also works with 2.9 since that’s what it says on blend2bam’s GitHub page, but I haven’t tested that.