Jump to content
  • Advertisement
Sign in to follow this  
chuckybeast

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

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

If you intended to correct an error in the post then please contact us.

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!