# Mesh Texture Mapping: Skin Coord to Texture Vector, how to make it ?

This topic is 3828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi ! Here is my question: I want to texture map a Quake model in my "software" 3d engine. In input, I've got my Model, with its vertices (x,y,z) in 3d space and for each vertices, its "2d skin coord" (s, t) Skin is a simple bitmap, let say 256x256 My pb, refert to this article on perpective texture mapping, http://www.geocities.com/siliconvalley/2151/tmap.html is to find for each triangle of my mesh the 2 'texture vectors' to compute my magic numbers. <IMG> http://www.geocities.com/siliconvalley/2151/tmap10.jpg aka Vector M and N in this example -- I've found articles on how compute texture vectors from vertices coord and face normal, but how to "align and scale" these vectors to skin coord ? No one use the skin coord information... -- In Hardware rendering, it's quite easy, you specify to the API the texture coord (like GLTextCoord2f()) and the pipeline do the thing... -- In 'quake engine' source code, J.Carmack wasn't doing perspective texture mapping on its mesh (only on walls), so he can't help me either... ;-) -- Thanks for your help and explaination -- Input: 1 triangle Vrtx1(x1,y1,z1) with SkinCoord(s1,t1) Vrtx2(x2,y2,z2) with SkinCoord(s2,t2) Vrtx3(x3,y3,z3) with SkinCoord(s3,t3) FaceNormal(nx,ny,nz) SkinTexture.width=256 SkinTexture.height=256

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 9
• 33
• 16
• 11
• 10
• ### Forum Statistics

• Total Topics
634122
• Total Posts
3015637
×