How can I get exact heights in a terrain using a height map?

Please help me understand what is going on here, or how I can better achieve this …

I made a 16 bit raw height map in photoshop, 1025 square; imported it onto a terrain with a resolution of 1024 square and height set to 100.

The height map consists of 10 hexes on a black background, each hex has a different solid grey representing a gradient in brightness from 0-100 in steps of 10. To do this I set the brightness in the colour palette up by 10% for each hex.

With the height of the terrain set to 100, I would have thought that each hex would be 10m higher than the last, but placing cubes into the scene shows that they are all wrong except 0 and 100. :slight_smile:

I attached 2 images to demonstrate, one is a clip of the height map and the other shows the results in Unity with the red cubes showing the desired heights. Is this some kind of gamma ramp/colour management somewhere in the pipeline or something, if so how do I avoid it?

cheers!


In the unlikely chance that anyone else has the same issue, I found the problem - using the Photoshop brightness percentage in the colour picker to make heights is not accurate. :slight_smile:

Instead, in 16 bit grayscale mode set the “K” percentage via the slider in the “Color” window (F6 key in CS5).