I’m new to Panda3D and I would like to build a “simple” flat infinite grid floor as simple and time-saving as possible. I already tried some things and created a fixed size grid but since my camera is constantly moving forward with undefined duration, it is a problem to create an infinite number of cards/tiles. Apparently, everything with more than 300 tiles is not possible with the code below (stolen from some topic here on panda3d.org). I also found the infinite terrain article referring to the setInstanceCount(n) method. This sounds quite complicated to me as a beginner though, since I only need a simple and flat grid texture. Does it make sense to use it for my purpose or are there any better/easier solutions? I also looked into the infinite-tunnel demo. Could this be a good solution for my problem? I’m not sure what’s the best and most efficient solution.
Thank you for any help!
def initGrid(self, dimX, dimY): self.levelroot = render.attachNewNode("Level Root") self.floorname = "models/floor.egg" self.levelfloor = [[0 for col in range(dimY)] for row in range(dimX)] for x in range(dimX): for y in range(dimY): self.levelfloor[x][y] = loader.loadModel(self.floorname) self.levelfloor[x][y].setPos(x,y-3,0) self.levelfloor[x][y].reparentTo(self.levelroot) self.levelroot.setScale(20)