Jump to content
  • Advertisement

Archived

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

InFerN0

OpenGL OpenGL Texture alignment in HL

This topic is 6442 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

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

Share this post


Link to post
Share on other sites

  • 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!