Texture Mapping Help Required

Started by
3 comments, last by ursfriend 18 years, 8 months ago
Hi I want to map the 2D human face image as a texture on 3d head model in Managed DirectX. I am working in C#. Can Anyone help me on this problem?? I have already tried TextureLoader.FromFile(...) Method but it didnt work. This method put some dark shade on 3d model and nothing else. I want to map the image from file on 3d model. How this would be done??? thnx
Advertisement
This needs to be done at model creation time. Your artist needs to map the 2D texture to the 3D head model in whatever modeling package was used to create the model.

neneboricua
But my software requires that the texture maps to 3d model
dynamically i.e., at run time. It takes different images as
input and maps their texture on generic 3d model which is
given in advance. plz guide me in this manner
Are you doing something like allowing the user to choose what face to use for their character? If the shape is always the same and you just want a different texture, you simply map out the UVs in a modeling program, as the previous post said, and change the texture as needed. The different face textures will need to line up though, if you know what I mean, so that the UVs make sense for every face texture.

Matt Hughson
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
thnx for ur response...Actually I want to do 3d Reconstruction of human head
So I have to map different texture each time I use different face picture. Before this I also deform the vertices of mesh according to the given face.

I have tried setting individual Texture Coordinates(tu, tv). I did this as follows......Load the mesh(.x file). Then Lock the mesh by 'LockVertexBuffer' method, access its vertices as 'CustomVertex.PositionNormalTextured' and then set its Texture Coordinates but it doesnt work for me and gives dark shade on the model.

This topic is closed to new replies.

Advertisement