Convert RGB heightmap to greyscale

Hi,
I’ve grabbed a raw file from an OpenSim world and opened it up in Photoshop. I’ve noticed that the heightmap opens up in RGB format, and Unity only works with greyscale. Anyone know of a way to convert the raw file to greyscale?
Thanks!

What do you want to do?

You could take the max of r,g,b at each pixel, or just use one channel, or use one of the rgb->gray formulas (google them), but these are usually about converting a color image to a gray image.

Shaders like Parallax use Heightmaps which are just 8 bits, but may be in the Alpha channel.

Heightmaps for terrains are usually 16-bit or float.

Is the image you have encoded in some way? Maybe you can post it. In other words, is it 16 or float spread across into the r,g,b components? Or some other kind of color-coded height?

Alright so I’ve got it. Use this: http://dubaron.com/terrainconvert/ and it will solve all your problems. When you import the heightmap Unity will get all the numbers done for you so you can just click “okay”.

Note: when I initially opened up the raw file from OpenSim in Photoshop it came out as a greyscale, but it was obviously wrong. When you open it up you need to make sure to set the size correctly, set 13 channels, and base 0 bytes. Oh and make sure to save it as Non-Interleaved.