|
From: Christopher K. S. J. <ck...@di...> - 2001-12-30 06:09:49
|
Damian McGuckin wrote: > > > Sort them once at the begining. Then resort on every single change in > > viewpoint. Assume that as you move around the list will remain mostly > > sorted, and choose a sorting algorithm to fit that assumption. > > If you rotate yourself, say 90 degrees, doesn't the list get horribly out > of sort. Mind you, this is simply a Z-buffer problem. > The theory is that there should be many intermediate steps in between, each of which results in only a small numbers of postion swaps in the sorted list. Spatial coherency is a fairly common assumption for real time scene graphs, even though, as you point out, it's not always true. Of course, it's only the transparent surfaces that need to be depth sorted, so as long as you keep to a reasonable number of them, the sorting shouldn't be a big deal. A good intermediate step might be to keep all the transparent surfaces in an unsorted list and render them last. That's not quite right (transparent surfaces layered over other transparent surfaces would have subtle artifacts), but would be much better than the current situation (transparent surfaces layered in with any surface at all produce very ugly artifacts) In the bad old days when processor time was expensive and 3d harware was rare, you also had "screen door" transparency. It's ugly, but relatively easy to implement, since you don't have to keep a separate (sorted) list of the transparent surfaces. A google search should turn up a bunch of references. -- Christopher St. John ck...@di... DistribuTopia http://www.distributopia.com |