Path: chuka.playstation.co.uk!chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Mike Fulton Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: Z-sorting really means *Z* sorting! Date: Mon, 22 Sep 1997 17:56:03 -0700 Organization: Sony Computer Entertainment America Lines: 40 Message-ID: <342713A3.37D1@playstation.sony.com> References: <33CA4E02.7487@charlie.cns.iit.edu> <33CB278F.38CF@bc.sympatico.ca> <33D0F343.2A14@charlie.cns.iit.edu> Reply-To: mfulton@playstation.sony.com NNTP-Posting-Host: 206.41.6.40 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0Gold (Win95; I) Ed Federmeyer wrote: > Cool! This did the trick! > > The problem seems to be that the Z-coordinate used to insert a > polygon into the OT is the *average* Z-coordinate for all the > vertices of the poly. > > In my case, the horizontal poly would have a lower *average* > Z-coordinate than the vertical poly that was above it, and so > the horizontal poly would get sorted after the vertical poly > and partially cover it up. > > When the vertical poly moved forward enough that it's average > Z-coordinate was less than the horizontal's, the vertical > poly would pop into full view. > > The multiple OT's allow the vertical poly to "fake out" the > horizontal poly! > > Thanks! > Ed Federmeyer Ed, the problem you mentioned is not limited to a horizontal versus a vertical polygon. It can just as easily popup with two polygons of the same orientation. Using a higher-resolution ordering table can help in some cases, but usually the best solution is to subdivide polygons which exceed a certain size. This will ensure that the resulting segments are drawn at the right priority compared to smaller polygons in the same region. The basic idea of subdivision isn't all that different from Z-buffering, which essentially breaks objects down pixel by pixel, but it's much faster and requires much less memory. It's not a perfect solution; you may still see glitches occasionally, but they should be much less serious and less frequent. Mike