Skip to main content
gamedev.net
🔒 Locked

Shadow Vertices

Started by AndyEsser Jul 5, 2006 at 7:19 AM 1 replies 800+ views
Original Post
AndyEsser
AndyEsser
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
nts
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.

dawidjoubert
dawidjoubert
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.
----------------------------http://djoubert.co.uk

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.