Brent Fogarty

07-06-2001, 08:52 PM

I have a scene full of triangles that I want to generate TexCoords for and I thought of using Planar texture maping but I'm unsure how to generate the u_axis and v_axis vectors.

Below is the equations for generating TexCoords for Quake2 maps (from flipcode).

u = x * u_axis.x + y * u_axis.y + z * u_axis.z + u_offset

v = x * v_axis.x + y * v_axis.y + z * v_axis.z + v_offset

If the above equations work all I need to know is how to get u_axis and v_axis.

Any help would be greatly appreciated

Below is the equations for generating TexCoords for Quake2 maps (from flipcode).

u = x * u_axis.x + y * u_axis.y + z * u_axis.z + u_offset

v = x * v_axis.x + y * v_axis.y + z * v_axis.z + v_offset

If the above equations work all I need to know is how to get u_axis and v_axis.

Any help would be greatly appreciated