Jump to content
  • Advertisement
Sign in to follow this  
AndyEsser

Shadow Vertices

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

Hey, If i've got an array of all the vertex coordinates of an object is there an algorithm that i can use in order to determine which of the points are required when casting the appropriate shadow for the object. For example, if i'm using a cube the appropriate vertices would be the 8 corners. Any ideas? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Are you using Shadow Volumes? Check the 'Silhouette Determination' section.

If you have a vertex array with 36 vertecies for the cube and want to collaps that to 8 then the only way I know would be to compare each of the verticies to each other to get the unique ones.

Share this post


Link to post
Share on other sites
Quote:
Original post by nts
Are you using Shadow Volumes? Check the 'Silhouette Determination' section.

If you have a vertex array with 36 vertecies for the cube and want to collaps that to 8 then the only way I know would be to compare each of the verticies to each other to get the unique ones.

This is not too expensive as you only need to do it once at initialization.

But shadow volumes is the future, the easy way to do it is to have an extra data called EDGES, you then determine which edges edge 2 triangles of which one is backfacing the light and one is front facing.

Extrude this edge into infinity away from the light and you have a volume.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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