RE: [Algorithms] Yet another stencil shadow question
Brought to you by:
vexxed72
From: Chris B. (BUNGIE) <cbu...@mi...> - 2002-12-19 18:57:39
|
Jon's suggestion requires duplicating vertices whenever their face normals differ. In a typical dense mesh, this will blow your vertex data size by a factor of six, and require the creation of degenerate quads between every pair of adjacent non-coplanar triangles. Also, your vertex cache reuse will go through the floor since every vertex is basically unique. It's not necessarily a bad technique, but you should be aware of the caveats before you decide to go with it. -- Chris Butcher Rendering & Simulation Lead Halo 2 | Bungie Studios bu...@bu... -----Original Message----- From: Tomasz Rozen [mailto:Tom...@in...]=20 Sent: Thursday, December 19, 2002 2:08 AM To: gda...@li... Subject: Re: [Algorithms] Yet another stencil shadow question Okay, thanks for all your answers. In my previous post I forgot to mention that this algorithm included inserting degenerated triangles along sharp edges (two per edge). Basicaly I was expecting something Jon and Chris have described. I think you can also have problems with convex meshes. I think I'll go with what Jon suggested, however I'm a little worried about video memory. Thanks again, Tomek > -----Wiadomosc oryginalna----- > Od: gda...@li... > [mailto:gda...@li...]W imieniu Jon > Watte > Wyslano: Thursday, 19 December 2002 05:39 > Do: gda...@li... > Temat: RE: [Algorithms] Yet another stencil shadow question > > > > You don't get a perfect fit with the mesh silhouette, so shadows are > slimmer than they'd otherwise be. For really coarse geometry, it may > potentially mean fairly gross shape differences. > > If you're not geometry throughput bound, and you very likely are not > when you do stencil shadows, I'd rather use a separate version of the > mesh with stitched sliver triangles between each edge, and face > normals. Extrude all vertices that have (face) normals pointing away > from the light (or even those pointing ever so slightly towards the > light). > > Cheers, > > / h+ > > > > -----Original Message----- > > From: gda...@li... > > [mailto:gda...@li...]On Behalf Of > > Tomasz Rozen > > Sent: Wednesday, December 18, 2002 1:16 PM > > To: Gdalgorithms-List > > Subject: [Algorithms] Yet another stencil shadow question > > > > > > Once I've heard about an approach to rendering stencil shadows (but > > unfortunately I don't remember where). The algorithm was simple: extrude > > every vertex if L . N < 0 (L - light vector, N - vertex normal). > > Has anyone successfuly implemented this algorithm? Are there > any caveats? > > > > Thanks, > > Tomek > > > > -- > > mailto:tr...@st... > > http://trozen.w.interia.pl > > > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: Order your Holiday Geek Presents Now! > > Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap, > > MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty. > > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Order your Holiday Geek Presents Now! > Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap, > MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty. > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 > > ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 |