Hi,
I imported the glb file, it looks very nice. What I want to do is to place one more texture on the object, but the object always black. Did I missing any setting?
Left side is the original one and right side is after setTexture():
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
simplepbr.init()
dlight = DirectionalLight('my dlight')
dlnp = self.render.attachNewNode(dlight)
self.frame = self.loader.loadModel("scene/frame.glb")
self.frame.setPos(0,1,1)
self.frame.setScale(0.5, 0.5, 0.5)
self.frame.setHpr(0,0,0)
self.frame.reparentTo(self.render)
self.frame.setLight(dlnp)
self.frame2 = self.loader.loadModel("scene/frame.glb")
self.frame2.setPos(1.5,1,1)
self.frame2.setScale(0.5, 0.5, 0.5)
self.frame2.setHpr(0,0,0)
self.frame2.reparentTo(self.render)
self.frame2.setLight(dlnp)
art = self.loader.loadTexture('scene/art/star.png')
ts = TextureStage('ts')
self.frame.setTexture(ts, art)
app = MyApp()
app.run()