I am trying to use GeoMipTerrain to create a maze type terrain. The problem I am encountering is that when my script gets to the terrain.generate() command Panda just freezes until it expands past its memory allotment and terminates. I tried running PStats and it also hangs when I try the terrain.generate() command. I have tried several really simple heightmaps and none of them have changed this. I have also tried changing the settings to make the geometry easier to make (exact size heightmap, making blocks bigger, changing the LOD, etc.). I am running this on a pretty faster system with plenty of memory, does anyone have any idea what is going on? The code I am using is below.
class SceneBuilder(DirectObject):
def __init__(self):
self.terrain = GeoMipTerrain("Terrain")
self.terrain.setHeightfield(Filename("C:/heightmap.jpg"))
self.terrain.setBlockSize(128)
#terrain.setBruteforce(True)
self.terrain.getRoot().reparentTo(render)
self.terrain.getRoot().setSz(25)
self.terrain.setFactor(32)
self.terrain.setMinLevel(10)
def generate():
print "generating"
self.terrain.generate()
self.accept("space", generate)
s = SceneBuilder()
run()
Thanks in advance.