Colormap is inverting along the y axis


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):
        terrain = GeoMipTerrain("worldTerrain")
        root = terrain.getRoot()

app = MyApp()

input images:

Hi and welcome to the Panda3D community :slight_smile: !

This particular issue seems to have been discussed some time ago in this topic.

Hopefully the info given there can help you.

1 Like

Thank you so much! This looks like the solution I need.