I'm downloading Terrarium maps from AWS S3 and I'm unable to generate a gray heightmap out of it. Does someone know the formula to translate the pixel RGB values into the grayscale (0, 255) heightmap?
The following image represents the area I'm working with
If I only use the RED pixel to generate image, I get this
You can see there some features of the mountains but it doesn't look like it should and the generated mesh looks almost flat in my 3d software.

