2vision2
2vision2

Reputation: 5023

How to do texture mapping in openglES? ( Mapping 2D face into a 3D mesh )

I need to convert a 2D face image to a 3D image. For this I thought of using texture mapping with openglES. I tried a lot googling to find some samples I couldnt get any. Can some one guide me to do this?

Input: 2D image Output : 3D image

Platform : ios

Upvotes: 0

Views: 705

Answers (1)

Sung
Sung

Reputation: 1066

As you know, OpenGL is using 3D or 2D vertices that has a few attributes such as position, normal value, color, texture coordinate. So you should set these values first and you can render. In ES 2.0 clearly you have to give these values to Vertice Shader and then you have to transfer two values texture coordinate , normal value to Fragment Shader and then in Fragment Shader, you can control these values with sampler texture for rendering your face object.

If you work In IOS, It's going to be very help .

Explanation :

http://ofps.oreilly.com/titles/9780596804824/chtextures.html

Source Code :

http://www.developers-life.com/iphone-3d-samples.html

Upvotes: 2

Related Questions