I realize a simple model of 2 colors (black horn with a yellow support) with Blender 3.0.0 which I export in * .0bj. When I open it with the 3D viewer I can see the colors appear. But, when I call it in Python (I use Pycharm 2021.3 and the 3D engine Panda3d 1.10.10) the model appears white. Moreover, it is no longer vertical but horizontal. See attached images.
from panda3d.core import loadPrcFile, AmbientLight
loadPrcFile("config/conf.prc")
from direct.showbase.ShowBase import ShowBase
class MyGame(ShowBase):
def __init__(self):
super().__init__()
pion = self.loader.loadModel("Models/Pion2.obj")
pion.setPos(0, 15, -1.5)
pion.reparentTo(self.render)
game = MyGame()
game.run()
Can you tell me how to get my 2 colors on my model with Panda3d ?