Archived

This topic is now archived and is closed to further replies.

JoshKlint

Worldcraft .map texture axes

Recommended Posts

Each plane in a .map file looks like this: ( 2320 -224 288 ) ( 2448 -224 288 ) ( 2448 -288 288 ) 1R_THICKPAN03 [ 1 0 0 -16 ] [ 0 -1 0 32 ] 0 1 1 The [bracketed] values are said to be the u and v texture axes and shift: [ 1 0 0 -16 ] [ 0 -1 0 32 ] Obiovusly, -16 is the u shift and 32 is the v shift. I don''t understand the "texture axes" though. I can do an alright job of UV mapping the planes by transforming each vertice''s position to the orientation of the plane, and using their x and y values along that plane to get the U and V coords. I can''t yet compensate for rotated textures or shifted textures, and the key lies in the texture axes. Can anyone explain?

Share this post


Link to post
Share on other sites
I suspect the first 3 values in the bracket are i,j,k values of a unit vector pointing in the direction the top of the texture is pointed? just a guess...

Share this post


Link to post
Share on other sites
Also try projecting the i,j,k values onto a vector parallel to the plane being textured. The resulting vector could be your texture orientation.

Share this post


Link to post
Share on other sites