When trying to put a texture on a heightfieldtesselator-generated terrain i just get the main color but no details…
code that doesnt work like i want it to:
from pandac.PandaModules import HeightfieldTesselator, Filename
import direct.directbase.DirectStart
terrain = HeightfieldTesselator("myDynamicTerrain")
terrain.setHeightfield(Filename("res/desert/desertmap_heightfield.png"))
tex=loader.loadTexture('res/desert/desertmap_texture.png')
root = terrain.generate()
root.setTexture(tex)
root.reparentTo(render)
run()
code which works with geomip:
from pandac.PandaModules import Filename
from pandac.PandaModules import GeoMipTerrain
import direct.directbase.DirectStart
terrain = GeoMipTerrain("myDynamicTerrain")
terrain.setHeightfield(Filename("res/desert/desertmap_heightfieldhd.png"))
tex=loader.loadTexture('res/desert/desertmap_texture.png')
terrain.setBruteforce(True)
root=terrain.getRoot()
terrain.generate()
root.setTexture(tex)
root.flattenStrong()
root.setSz(255)
root.reparentTo(render)
run()
What am I doing wrong?