Jump to content
  • Advertisement


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


texture coordinates of point

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

Hi All, It''s about lightmap generation for indoor engine. Some triangles in my scene has opacity maps and I want to calculate correct shadows dropped by such triangles. (shadows dropped by tree leafs for example) So, after I detect that ray of light intersect triangle I need to calculate alpha value for intersection point. I know world coordinates of all points and texcoordinates of triangle vertices. How can I calculate texcoodinates of intersection point? Thanks Vladimir

Share this post

Link to post
Share on other sites

This can be done using the planar mapping technique described


Basically what you do is determine the major axis the polygon
lies in (by figuring out the largest component of the normal)
and then project it onto one of six word-aligned cube faces.
Then, the texture coordinate you seek can be determined by
projecting the other two normal components onto the plane.
This description is probably not clear...so go read the articles
in the links and hopefully it''ll make sense

Dan Ginsburg
OpenGL Software Engineer, ATI Research

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!