PDA

View Full Version : setting grayscale bitmaps to 3D



kschroed
12-01-2000, 11:07 PM
I have a 16 bit grayscale bitmap (some scientific data) and want to set the pixel intensity to the third dimension in an OpenGL buffer with a color lookup. But this should not be just a collection of 3d-pixels rather than a smooth 'landscape'. Any idea how to connect the pixels?

Thank You

Moz
12-02-2000, 04:31 AM
I would think you could use quad strips and scan two adjacent lines of your bitamp at the same time to draw the strip. You could also preprocess your data to create vertex arrays in order to speed-up the drawing.

Antonio
12-03-2000, 02:41 PM
Check out my tutorial on terrains. It shows how to get a height map from an image (TGA).
http://www.fatech.com/tech/opengl/terrain

Antonio