Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Reading a height map

This topic is 5732 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I read the pixel colour of the various points I want in a height map for use with rendering a landscape. Do I load the .bmp as if it were a texture or will this load it into the video cards memory when really I dont want to use this image as a texture?? Is there any good tutorials in doing this. I have no problem once I know the colour value of generating the terrain I''m juse more interested in getting the colour value of an x,y position on an image. Thanks

Share this post

Link to post
Share on other sites
There is no need to load the heightmap into videomem, as long as you don't want to use the GPU to use the heightmap directly (as texture, bumpmap, displacementmap,...). I'd rather copy the image information directly to a buffer and read the color-values from there. after generating the vertex-data, you can dealloc the buffer, as you'll most likely won't need it any longer.

Look here for an OpenGL-tutorial: Lesson 34

Yesterday we still stood at the verge of the abyss,
today we're a step onward!

Don't klick me!!!

[edited by - Vaporisator on November 6, 2002 7:46:45 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!