Re: Depth-Sorting Axis-Aligned Boxes

Bert Peers <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
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
[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.