PDA

View Full Version : transforming bitmaps into 3D models



joey
12-19-2001, 11:20 PM
Hi,

I have a bitmap which is 44 by 55 pixels. The bitmaps that we see are in 2D format(flat, no depth). I need to display this bitmap into a 3D model format... eg. a bitmap picture of a face displayed as a 3D image.

What are the steps involved in doing so?
From what i know, i need to create an array to store these pixels and load them out again to display them in 3D format.
But how???
I'm new to this topic and would gladly appreciate any help.
Tutorials are also welcome...
Thanks.....

mikael_aronsson
12-19-2001, 11:53 PM
Hi !

Have a look at the FAQ at: http://www.opengl.org/developers/faqs/technical/texture.htm#text0010

That explains the basic steps, to get more details do a search on google for "opengl" "texture mapping" and "tutorial", you should get plenty of hits.

Mikael

Allan Walton
12-20-2001, 01:29 AM
Or alternatively you could load the image in, use glReadPixels() to get the pixel information and generate a height map from it. (i.e the closer to white the higher it is, the closer to black the lower it is) Then generate a grid using the height map as the z (or y) coordinates.

Doing this has the added benefit of being generic (you can use any image so you can experiment)

Hope this helps

Allan