Re: [Algorithms] Depth-Sorting Axis-Aligned Boxes
Brought to you by:
vexxed72
|
From: metanet s. <met...@ya...> - 2009-08-03 17:37:48
|
> If what's stopping you from using a ZBuffer is memory or > performance,you can try a span-list based system Unfortunately the problem is the platform: Flash. This means I don't have access to the pixels directly if I want to use the flashplayer's rendering system. In theory I could write a z-buffer or span-list system in Actionscript, however this would require circumventing Flash's built-in renderer and writing my own (on top of the basic get/set pixel commands). I suspect this would be hellishly slow, but if that's the only solution I guess it's worth trying. > How many different camera angles will you be viewing from? Also, by > sprites, do you mean quads in 3-space, or something more like point > sprites The camera angle will be fixed (pointing along z) but will translate in x and y. By "sprites" I mean something close to GBA: 2D images you can translate/rotate/scale, but not anything as general as a textured quad; if I had access to textured polygons, I could conceivably build a BSP each frame and split each quad into pieces. This is looking more and more grim! :( thanks again, raigan --- On Mon, 8/3/09, Bert Peers <be...@bp...> wrote: > From: Bert Peers <be...@bp...> > Subject: Re: [Algorithms] Depth-Sorting Axis-Aligned Boxes > To: ra...@ha..., "Game Development Algorithms" <gda...@li...> > Received: Monday, August 3, 2009, 9:56 AM > metanet software schreef: > >> Unfortunately, this is the classic polygon sorting > problem. > > > > This is what I was afraid of; aside from the cost of > building a BSP every frame, the more fundamental problem is > that the graphics are sprites and not really amenable to > arbitrary splitting. I was hoping in the worst case that I > could split them up to have one sprite per face (top, front, > side, etc), but it would appear that even that is too > coarse. > > > > So, I'm screwed? > > If what's stopping you from using a ZBuffer is memory or > performance, > you can try a span-list based system; at every scanline, > you keep track > of which poly's overlap it, then you analytically compute > the spans of > pixels that are visible due to every polygon edge or > intersection. > See quake1. If the sprites in turn have an alpha > mask, you can still > make it work by converting the sprites into several spans > (ie. RLE > compression; see, uh, 'Divinity'). > > > bert > > ------------------------------------------------------------------------------ > 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 > __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. |