PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Z3 Antialiasing


Demirug
2002-07-31, 19:17:58
Mal wieder was für unsere AA-Fetischisten

Das ganze ist zwar schon 3 Jahre alt aber wurde hier noch nicht erwähnt.

Auf der Seite gibts auch ein paar Videos:

http://www.research.compaq.com/wrl/people/jouppi/Z3.html

Quasar
2002-07-31, 20:51:58
Hm, die Videos gehen nicht mit Quicktime 5.0....sind die zu alt oder zu neu??

Demirug
2002-07-31, 20:58:26
Bei mir gehen sie mit QT 5. Hab sie aber erst runtergeladen.

Quasar
2002-07-31, 21:07:49
Ich auch. Komisch...

aths
2002-08-01, 15:06:07
Ich habe nicht verstanden, was an dem Verfahren nun so sein soll. Die Maske ist klar. Dass nur 3 Farben gespeichert werden (wie ich das herausgelesen habe) könnte hier und da zu Fehlern führen.

Demirug
2002-08-01, 15:36:43
@aths:

Die Anzahl der gespeicherten Farbwerte ist bei dem Verfahren frei wählbar. Und wenn mehr Farbwerte als Speicherzellen pro Pixel gebraucht werden kann es zu Fehlern kommen. In dem Paper steht aber auch wie man versucht diese Fehler zu reduzieren.

Ich habe ja was das erkennen von AA Fehler angeht nicht ein ganz so gutes Auge wie du. Aber IMO sieht Z3 Antialiasing mit 2 Sample viel besser aus als Quincunx obwohl es nur minimal mehr Speicher braucht. Auf den Videos ergab die 2 Sample lösung sogar ein besseres Bild als 4xSS.

zeckensack
2002-08-01, 15:47:17
Boykottiert Quicktime *eg*

Aber sieht schon geil aus.
Ich hab wohl nur irgendwie verpasst, wie das Verfahren OIT lösen soll ...

@aths
Wenn ich das richtig verstanden habe, dann ist das neue an der Technik, daß es
1)adaptiv ist
2)trotzdem alles glättet (im Gegensatz zu Matrox' FAA)
3)dabei theoretisch unbegrenzte Subpixel-Auflösung bietet.

Wenn der Platz im Fragment Buffer für weitere Samples nicht mehr ausreicht, werden zwei 'sich nahestende' alte Fragmente verschmolzen, um wieder Platz zu schaffen.

aths
2002-08-01, 19:38:38
Demirug, ich werde mir Z3 noch mal näher ansehen. (Bei der Hitze hier kann ich partout nicht nachdenken.) Besser als Quincunx zu sein ist allerdings keine große Kunst.

Das mit dem Farbfehler muss ich noch mal durchdenken. Ich habe mir erst 2 Videos näher angesehen, und dort vor allem die Kanten, wo nur 2 Farben gemischt werden. Die sehen einwandfrei aus. Komplexere Szenen, die am besten noch Texturen verwenden, sah ich allerdings nicht (mal gucken, ob es da auch Videos gibt.)

(Ich bin gerade dabei, allerdings nur nebenbei, zu überlegen wie man "echtes" Anti-Aliasing realisieren könnte, welches letztlich ganz ohne Subpixelmaske auskommt. Die Maske für 8x Z3 halte ich btw für suboptimal, allerdings bin ich mir selbst noch nicht über eine "optimale" 8x-Maske im Klaren. Seit es Voodoo5 6000 gibt habe ich einiges überlegt, aber jeden Vorteil erkauft man sich mit einem Nachteil.)

edit: Jedes wirklich gute AA muss meiner Meinung nach gamma-korrekt erfolgen. Dazu reichen 8 Bit pro Kanal aber nicht aus, man müsste schätzungsweise besser 12 Bit nehmen.

Demirug
2002-08-01, 19:48:33
aths,

Die Videos sind alle ohne Texturen damit man die Kanten besser sieht. Die Maske ist im Prinzip bei dem Verfahren egal. Man kann jede beliebige benutzen.

Wobei das Z3 Verfahren mindestens einen Nachteil hat-> Kein Stencil AA.

Denke auch schon länger über AA-Verfahren nach. Das beste was dabei bisher rausgekommen ist war ein FAA-Verfahren mit z und Stencil AA. Allerding mit einer Maske.

Unregistered
2002-08-04, 22:35:21
Könnte mal einer Pics dazu posten? Hab kein Bock einige 60MB-Filchen saugen zu müssen und ausserdem boykottiere ich QT. ;)

Unregistered
2002-08-05, 05:01:50
Das erste Mal dass ich auf Z3 bei B3D traf war vor dem R200 release. Hier ein quote:

My own preference for hardware antialiasing would be to use a techniques similar to the Z3 algorithm. It has the following advantages:

1) The amount of AA work (both computations and memory bandwidth) on a pixel depends on the number of visible fragments in a pixel, rather than the number of samples per pixel (a very big advantage). Hence, it is "adaptive". That is, it spends more memory bandwidth and computation time on pixels with lots of visible fragments (that need more antialiasing), and less time or pixels with fewer fragments (and need little or no geometric AA. This allows a very large number of samples per pixel (say 16, 32, or more) with a relatively small amount of extra memory bandwidth and a bit wider AND computation.[b] If the frame buffer were in on-chip memory, the AA would appear "free" regardless of the number of samples per pixel.

2) It uses much less memory and memory bandwidth for a given quality of AA than supersampling. The memory and memory bandwidth consumption should be small enough to allow the same number of samples per pixel at all resolutions.
If the frame buffer were on chip, you could offer the same high quality AA at all resolutions (say 1600x1200 by 16x) for "free".

3) It can provide order independant transparency for "free".

One change I would make to the Z3 algorithm would be the use of jittered sampling rather than sparse supersampling. It would use edge crossings to lookup coverage masks from an assortment of masks. Each mask in the assortment would have a different set of jitter values. This would mean that the same edge crossings would result in a slightly different coverage pattern for each mask in the assortment. The R200 appears to use 16 different masks with different jitter values. This is probably enough if the masks themselves are used in a random fashion. It is important that the same mask be used with a particular pixel across frames to avoid flicker. The mask to pixel assignement should therefore be random across the screen but constant across frames. A simple way to provide random mask assignement is to use an assortment of mask assignement lookup tables. Each mask assignement lookup assigns a random arrangement of all 16 masks to a set of 16 pixels. This creates a sort of random hierarchy of coverage masks across the screen. While not perfectly stocastic, it is fairly close. Another change I would make, though probably not at first, would be to use a wider weighted filter for the samples (say gaussian weights), using the same set of weights for each mask in the assortment.


BTW, here's a link to the Z3 algorithm:

http://www.research.compaq.com/wrl/people/jouppi/Z3/Z3paper.pdf


There are some important points about the Z3 algorithm:

- It uses a fixed amount of storage per pixel (enough for 3 fragments). This is critical for hardware.

- It merges coverage mask information for the two closest (in Z) fragments when the number of fragments exceeds 3. This has the effect of usually merging fragments from the same surface (therefore they often do not overlap in Z).

- It stores all the information about the plane of the triangle (z,dz/dx,dz/dy) for later z computations and not just a single z value. This allows computing the precise occlusion within a pixel.

- It correctly antialiases transparent/translucent polygons. This also provides order independent transparency as a side benefit (which is still a significant problem for most 3d hardware).


I have been somewhat surprised that more vendors have not yet used coverage mask AA. It is somewhat more complex to implement, but has substantial benefits in the number of samples operated on for a given amount of memory, memory bandwidth, and computation.

Also coverage mask AA works ideally with deferred rendering since in that case you don't need to store the fragment colour for each fragment (up to 3) in a pixel. This is because the fragment coverage masks in a pixel have all had a chance to reach their final values before rendering (during the HSR step). By the time you render, you use the fragment coverage mask to define the percent of the fragment colour to store in the frame buffer.

If you use coverage mask AA with a traditional, you need to store the fragment colour of each fragment (up to 3 per pixel). This is still much better than storing one colour per sample though (say 16 per pixel).

Wenn richtig implementiert waere eine Kombination von Z3 und FAA keine allzu schlechte Idee.