[Algorithms] Depth-Sorting Axis-Aligned Boxes
Brought to you by:
vexxed72
|
From: metanet s. <met...@ya...> - 2009-08-01 14:32:32
|
This is a variation of the famous "isometric depth-sorting" problem: I have a 3D scene composed of axis-aligned boxes, viewed with an oblique/cabinet perspective ( http://en.wikipedia.org/wiki/Oblique_projection ). Sadly I don't have a z-buffer, so I need to determine a way to sort the boxes back-to-front. The boxes will all be non-overlapping, although they may be touching, and will move smoothly (i.e not by grid-sized steps as is common in some games). Is there a simple solution to this problem? I.e a formula which considers the extents and/or a reference point on each box to produce a back-to-front order? Or am I stuck with the general solution: build a BSP tree? Would it help to consider individual faces rather than boxes? (It seems to me that this wouldn't help, since each face can be considered a box with size=0 along one axis). Any suggestions or references would be most appreciated; all of the "isometric" stuff I've found via Google seems to be a big mess -- the algorithms which do work only work for objects which are all tile-sized and move in tile-sized increments.. which is just a special case of BSP (i.e the scene is essentially cut up by the grid). thanks, raigan __________________________________________________________________ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ |