#### Archived

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

This topic is 6033 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm going to implement shadows in my engine using stencil shadow volumes as soon as I found a way to render the faces of the shadow volumes. I haven't searched on Internet a technique to render them now, so what I am going to say may be wrong or not optimized at all. I'd just like you to point what is wrong in my method. So here we are! We want to extrude a shadow volume for every triangle of a scene. So we need the face of the triangle, the back face of the triangle projected far away and 3 faces linking the front and back faces. The front and back faces are simple triangles, these are easily created. The front one is the same as the triangle face, the back one is created with vertices of the triangle extruded using the light to vertex vector (the face is also flip in order to be back facing). But building the 3 polygons describing the shadow volume between the front and back faces isn't so trivial. We need two triangle for each polygon. Given a triangle edge we could do this: For building the first triangle: we take two of the already existing vertices as they are, and another one with the same position as one of the vertices of the edge but we flip his normal. Then we project away only the vertices whose normals are back facing the light. This gives us a half of the final polygon. For the second triangle: we only take one vertex as it is, for the two others we take once each vertex describing the edge and we flip their normals. Then we project away only the vertices whose normals are back facing the light. We now have the final polygon for one edge, we do the same process for the two other edges to get the last polygons needed. In order to do this process, we need to create 8 triangles for every triangle in our scene. Now that I think about it, the number of extra triangles needed seems pretty big... I hope you will try to correct or to enhance my method. Thanks! [edited by - Alload on June 5, 2002 11:48:35 AM]

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
13
5. 5
frob
12

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633669
• Total Posts
3013255
×