Sign in to follow this  
chuckybeast

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this