OpenGL Texture alignment in HL

Started by
0 comments, last by InFerN0 23 years, 5 months ago
how does Half-Life get the textures to rotate and scale? InFerN0 Not all who wander are lost...
InFerN0Not all who wander are lost...
Advertisement
Half-life uses the same system as the quake series of games for texture alignment. What you have is a formula for calculating u and v, given the x,y,z coordinate of the point, the x,y,z of the texture axis and the u and v offsets. The formula looks like this:

u = x*uAxisX + y*uAxisY + z*uAxisZ + uOffset;
v = x*vAxisX + y*vAxisY + z*vAxisZ + vOffset;

The u and v axis are calculated for you by the half-life map editor you use (ie. worldcraft) and you just load them in.

PreManDrake

This topic is closed to new replies.

Advertisement