Jump to content
  • Advertisement

Archived

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

texture coordinates of point

This topic is 6549 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
Advertisement

This can be done using the planar mapping technique described
at:


http://www.flipcode.com/tutorials/tut_lightmaps.shtml
http://www.voodoospotlight.com/devknowledge/articles/lightmapping/lightmaps.html


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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!