cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/08/07:45:33

From: ovek AT arcticnet DOT no (Ove Kaaven)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is Z-sorting?
Date: Wed, 08 Apr 1998 10:10:32 GMT
Organization: Arctic Net AS
Lines: 33
Message-ID: <352b4a4e.3366243@isflak.arcticnet.no>
References: <352B0463 DOT FA9FC86F AT earthlink DOT net> <352B3124 DOT 64F7 AT acadia DOT net>
NNTP-Posting-Host: villager.arcticnet.no
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Scott Warner <swarnerx3 AT acadia DOT net> wrote:

>Steven S. Falls wrote:
>> 
>>     Lately I have been hering about somthing called Z-Sorting. What is
>> it?
>>         Thnaks,
>>                 -Ardy
>>             http://www.addr.com/~ardy/
>
>Z-buffering is an algorithm used to remove hidden surfaces when
>displaying 3d surfaces.  The x and y coordinates (plotted on the screen)
>and the z coordinate (projected into the screen) is placed in a buffer. 
>Through sorting of these z coordinates hidden surfaces can be removed
>for fast display.  As I understand it, z-buffering is built into some 3d
>accelerator boards.

Z-sorting, on the other hand, is an algorithm that stashes all the
polygons to be rendered in a list, and sorts them according to their Z
order (a simple implementation would just sort according to the
average Z of the vertices), and renders them later (often
back-to-front (Painter's algorithm)).

The difference between Z-buffering and Z-sorting is that Z-buffering
is pixel-per-pixel and does pixel Z comparisons while rendering, while
Z-sorting is polygon-per-polygon and sorts a list of polygons before
rendering. For moderate numbers of polygons this difference is obvious
(Z-buffering is more accurate and can handle overlapping, but has an
incredible amount of overhead, while Z-sorting can do both the sorting
and the rendering relatively fast). But for very high number of
polygons, the overhead of the sorting operation may become high enough
to warrant using Z-buffering instead.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019