Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: OT sorting Date: Fri, 19 Mar 1999 09:32:49 +0000 Organization: Sony Computer Entertainment Europe Lines: 30 Message-ID: <36F219C1.3132C523@scee.sony.co.uk> References: <36F0DBE6.5561@bristol.ac.uk> <7cqnf5$fu915@chuka.playstation.co.uk> <36F0EE52.1E69@bristol.ac.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.51 [en] (Win95; I) X-Accept-Language: en Robert Swan got around this problem by sorting his main character object into an OT level that was a few less than what it should have been. The problem occurs because a polygon is sorted into the OT at a level which is the average of its vertices' Z values. This means that if your character is at the far end of a very big polygon (which is underneath it), then the average of it's Zs are going to be at a higher level than the average of the big polygon's Zs. So it gets inserted ata higher level, which means that it gets drawn first, which means that the big polygon will be drawn later, which isn't what you want. Solution? o Reduce the size of the floor polys. This will reduce (but not completely solve) the problem. o Sort the floor and object into different OTs. Then either: o Insert the object OT into the 'main' OT, at a level which is slightly less than what it should be. That way it gets drawn later, but you'll get some slightly different errors. o If your object is never obscured by the landscape, then just draw the main OT and then draw the object OT separately. There's some code in the FAQ (off the new member's page) which tells you how to work out which OT level (priority) to sort an object into. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Tools and Licensing Middleware Manager - Sony Computer Entertainment Europe Diplomacy is saying "nice doggy" until you find a rock.