[gameprogrammer] shadow volumes

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Thu, 19 Mar 2009 19:41:38 -0700

Heya,

I'm trying to code some shadow volume code (ie this
http://en.wikipedia.org/wiki/Shadow_volume) and am hitting a snag.

To render the shadows right you have to find the silouette of the model in
relation to the light source.

If a model has holes in it for the light to shine through (like a doughnut
or swiss cheese), finding one silouette edge isn't enough.

I think i have a way to find all the silouette edges (basically check every
triangle on the mesh that isnt back face culled from the light to see if
it's and edge, and if so if it's not already part of a siloette edge find
the edge that contains that triangle)

but thats a much costlier thing i think, so i'm trying to figure out, how
can you tell if a model has holes in it?  That way i could set a flag on the
mesh saying it's ok to use the simpler test if there's no holes.

Does anyone know a way to tell if a mesh has holes in it?

Thanks!!
Alan

Other related posts: