• Advertisement

Archived

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

Determining silhouette for meshes

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

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement