I seem to have a problem in rendering a cubemap image onto a cube in panda3d.It appears that al my images seem to diverge to the bottom right vertex to create an colourful but unfortunately unwanted design:
The code by which I created the cubes and tried to render the cubemap:
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()