Determining silhouette for meshes

Started by
4 comments, last by nini 19 years, 10 months ago
Hi , i have a newbie question , how to determine silhouette edges from a mesh for shadow volumes ??? If we have triangle strips or triangles fan the method differs or not ? i''ve read on nvidia paper that for a closed mesh , the number of edges is (nTriangles*3) / 2, i don''t see why ?? i''ve tried to draw something on paper and this don''t work... i try to understand so be indulgent if you find my question quite easy... thanks a lot for your answers, best regards.
Advertisement
what nVidia said about the closed shadow voulume is old mathematical formulas. I think these formulas are for euler.
another important formula is euler formula used to chek manifoldness ( manifoldness means that each edge shares two triangles only). this formula is V-E+F=2 where v is the number of vertecies, E is number of edges and f is number of faces.
you can find methods of finding silhoute in the paper called " the theory of stencil shadow volume" on gamedev,but no need for finding the silhoute. you can generate the shadow volume in a vertex shader and this is a better method. there''s a sample for generating the shadow volume on booyah.com
does i understand ?

in this Vertex Shader what is done is only the determination of how triangles is facing the light direction or not
if so , we project this triangles by projecting his vertex ?

by the way thanks for the link
yes, this is what the vertex shader does. the vertex shader enables you to generate the shadow voulume without locking of buffers to copy the shadow volume to it, and enable you to generate the shadow volume on the GPU not the CPU.
IS it a good idea to place a degenerate quad along each edge, and then let the vertex shader extrude only the quads that satisfy some property (i.e. lie on the silhouette edge)?

I read this technique in a couple of places, it seems that it would take work off the CPU, but at the same time add a huge number of polys to the model.
¿We Create World?
this technique is used in ati''s shadow volume sample.but I don''t know a benefit for it over the ordinary method for generating the shadow volume using a vertex shader,and it makes the poly count increases of course.

This topic is closed to new replies.

Advertisement