Harald JOHNSEN wrote: > There is a pre process step where I look for the 2 triangles that > share an edge.
You're doing that per frame? Does it work well? I saw a huge CPU hit from that test, but that was about 2.5 years ago on a slower machine than is available now. Is the code complete enough to provide performance numbers? > The silhouette computation is only done when my sun vector change > enought and I cache the list of silouhette edges so the cpu is not > too stressed every frame while nothing changes. If I understand you correctly, this has a glitch: the failure mode is that you find an orientation where a new silhouette edge should have been added but wasn't, and suddenly the shadow has a hole in it that looks like a big diagonal streak across the screen. What I started trying to do was pre-cache multiple sets of silhouette triangles for different orientations and using the union of all the ones needed so I was guaranteed to never miss an edge. But then you're required to cache and store (presumably in OpenGL display lists) *many* times more polygons than the object actually has. I forget the numbers, but they were pretty big. Anyway, if you made all that work or found a simpler solution, then I salute you and look forward to seeing the code. This stuff can be really fun. > I started a prototype before using hardware shadow maps. You are > right it's a lot simpler, but it can't run on all hardware (and > nvidia don't have the shadow ambient extension so shadows would be > black...) All modern hardware can do them; remember that only high end machines will be able to do the stenciling also. And the ambient extension isn't all that useful for a flight simulator. The only thing we really care about shadowing is sunlight, which is white by definition. (And even then, you can still do colored shadows without it, just not as fast, using an extra pass or two). Andy _______________________________________________ Flightgear-devel mailing list [email protected] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
