Re: Depth-Sorting Axis-Aligned Boxes

"Richard Mitton" <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
I may be missing something, but can't you just do a sort based on their 
furthest point along the camera axis?

i.e. transform into view space, then sort by furthest Z coordinate.

-- 
()()      Richard Mitton
( '.')
(")_(")       Beard Without Portfolio :: Treyarch


----- Original Message ----- 
From: "metanet software" <[email protected]>
To: <[email protected]>
Sent: Saturday, August 01, 2009 7:05 AM
Subject: [Algorithms] Depth-Sorting Axis-Aligned Boxes



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/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus 
on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.