create a shadow volume

Blitz3D Forums/Blitz3D Programming/create a shadow volume

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I am working on this right now. Here is my approach:

-Create a list of the normal of every triangle in the mesh. There is an equation to get the normal or plane equation from the 3 points of a triangle.

-Create a list of every edge in the mesh, consisting of an indice a and an indice b. For each triangle, check for an existing edge between the points ab, bc, and ca. Test using vertex positions, since you might have concurrent edges that use different vertices. You also need a list of which two triangle this edges falls between.

-Create a list of dotproducts between your light vector and your triangle normal. This tells you whether a triangle faces towards the light or away.

-Look for edges between a triangle that faces the light, and one that faces away. These are your outline edges.

www.planetquake.com/q3empire/files/papers/Realtime_Shadowcasting.pdf
Wow. What a bunch of crap hyperbole. This paper is laughable.