I am a new user of Panda3d. My first project is learning to create terrain with a heightmap and colormap.
The issue I’m running in to is that the colormap seems to be inverting along the y axis.
I’ve googled and searched the best I knew how, but couldn’t answer my own question. Any help would be greatly appreciated!
I’ve included a screenshot of the two input images and the panda-rendered result. The result (right image) has what appears to be the the correct heightmap orientation, but a colormap with y-axis inverted. The peak that is circled in yellow is properly represented in 3d space, but the corresponding colors are in the wrong place.
Left: input heightmap,
Middle: input colormap,
Right: panda3d rendered (heightmap correct orientation, colormap inverted along y axis)
from direct.showbase.ShowBase import ShowBase from panda3d.core import GeoMipTerrain class MyApp(ShowBase): def __init__(self): ShowBase.__init__(self) terrain = GeoMipTerrain("worldTerrain") terrain.setHeightfield("heightmap.png") terrain.setColorMap("colormap.png") terrain.setBruteforce(True) root = terrain.getRoot() root.reparentTo(render) root.setSz(60) terrain.generate() app = MyApp() app.run()