I am new here and am currently learning how panda3d works, I am currently following a tutorial which asked me to create terrain through a height map and then later asked me to convert this height map into a bam file, the problem is that while I followed the tutorial as it was written even going as far as copy pasting the code directly into my IDE just to make sure that I am using the right code, here is the code that I have:
from direct.showbase.ShowBase import ShowBase # import the bits of panda
from panda3d.core import GeoMipTerrain # that we need
class MyApp(ShowBase): # our 'class'
def __init__(self):
ShowBase.__init__(self) # initialise
terrain = GeoMipTerrain("worldTerrain") # create a terrain
terrain.setHeightfield("heightmap.jpg") # set the height map
terrain.setColorMap("colourmap.jpg") # set the colour map
terrain.setBruteforce(True) # level of detail
root = terrain.getRoot() # capture root
root.reparentTo(render) # render from root
root.setSz(60) # maximum height
terrain.generate() # generate
root.writeBamFile("world.bam")
app = MyApp() # our 'object'
app.run() # away we go!
and here is the tutorial I am using: http://www.mygamefast.com/volume1/issue2/