I appear to have a problem with Panda3D, being extremely new, when rendering multiple cubes with a given cubemap.The code I used appears fairly succesful but creates a series of cube attaining textures that appear to diverge to the bottomright vertex:
from direct.showbase.ShowBase import*
from panda3d.core import*
import random
class myapp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.cube=self.loader.loadModel("cube.egg")
self.tex = loader.loadCubeMap('face_#.jpg')
self.cube.setTexture(self.tex)
for i in range(50):
self.placeholder = self.render.attachNewNode("Placeholder")
self.placeholder.setPos(random.randint(1,100), random.randint(1,100),random.randint(1,100))
self.cube.instanceTo(self.placeholder)
self.cube.reparentTo(self.render)
app=myapp()
app.run()
Which creates the latterly mentioned odd-looking cubes: