Archived

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.

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 on other sites

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

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5

• 14
• 10
• 23
• 9
• 32
• Forum Statistics

• Total Topics
632630
• Total Posts
3007525
• Who's Online (See full list)

There are no registered users currently online

×