Skip to main content
GameDev.net gamedev.net
🔒 Locked

Reading a height map

Started by gommo Nov 6, 2002 at 4:40 AM 1 replies 800+ views
Original Post
gommo
gommo
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
NE1
NE1
I would like to know the answer to this one too...
Vaporisator
Vaporisator
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]
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.