Re: [Algorithms] Depth-Sorting Axis-Aligned Boxes
Brought to you by:
vexxed72
|
From: Richard M. <mi...@tr...> - 2009-08-02 19:58:07
|
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" <met...@ya...>
To: <gda...@li...>
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
GDA...@li...
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
|