RE: [Algorithms] Optimizing the silhouette finding for a shadow v
Brought to you by:
vexxed72
From: Davies S. <SD...@uk...> - 2002-07-04 13:59:56
|
Is this not just a reformulation of the backfacing/frontfacing triangles meeting at an edge test but using more memory? I can't immediately see any advantage of this method over the classic one... I may be being dim mind ;) cheers Sean -----Original Message----- From: John White [mailto:jo...@de...] Sent: 04 July 2002 14:44 To: gda...@li... Subject: RE: [Algorithms] Optimizing the silhouette finding for a shadow v I've been thinking about this recently. If you have 2 polys which share an edge you can catergorize 4 areas of space that the 2 planes (coplanar with the polys) split the world into. . . . 2 . . . 1 .. 3 /\ / \ / 4 \ / \ So area 2 is in the +ve space of both polys. 4 is in the -ve space and both and 1 and 3 is in +ve space of one and -ve space of the other. Determing which space the camera is in is 2 quick plane equateions. If the camera is in regions 1 or 3 then the edge is a shadow edge, otherwise it isn't. It _should_ be fairly striaghtforward to carve up all edges this way such that the leaves of the tree give an exact set of all sillouette edges. If the two polys sharing an edge have their normals pointing towards one another then there is no way (I think) that they can cast a shadow so can be completely ignored. It should also be possible to remove shadow edges if you know that they are redundant due to an enclosing set of shadow edges. I fear that the memory overhead will be two high as I have not tried this yet. Comments? -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Ulf Ochsenfahrt Sent: 04 July 2002 14:00 To: gda...@li... Subject: RE: [Algorithms] Optimizing the silhouette finding for a shadow v On Thu, 2002-07-04 at 14:06, Warrick Buchanan wrote: > Still twisting my head slightly on this - anyone care to click my brain into > the correct gear? Does this only work for convex objects? or does the fact > you're inflicting a BSP on space make it work in this case as well? I should join Tom in this as I havn't tried it either. The general idea is that you only have a finite number of possible silhouettes and that you can pre-calculate these. The only problem is then choosing the correct silouette. To do this you build a data structure where you can quickly get the correct silhouette data. Tom mentiones a BSP. Yet the naive approach of just doing a BSP on your object does not work in all cases. C +------ | | B | +------ A Plane A is the root. Plane B is completely on one side of Plane A. The light source is in front of (below) A and looks towards A. Then the edge between A and B belongs to the silhoutte. If the light source moves to the left (or the object to the right) then the edge between A and B is no more correct but the edge between B and C must be taken. In a simple BSP you would still be in the same space partition. -- Ulf ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Caffeinated soap. No kidding. http://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=6188 |