Page 1 of 1

Oddities with Anti aliasing

Posted: 18.05.2008, 12:51
by ElChristou
Don't really know where to post this; at first it was a reflexion about Anti Aliasing from the graphic card vs the AA function to smooth lines within Celestia engine.
In the following screens you can see the difference between the full AA from the board (first image) and smoothed lines from Celestia in the second image.

Perso, no doubt, the smoothed lines are much better than the full AA. Now Is that just related to the hardware I'm testing? (ATI Radeon HD 2600 Pro (256Mo))

Then looking those screens, Mimas orbits (and only this orbit!) seems to be different from the full AA version to the smoothed one; that's odd because I use the same cel Url in both screen... Any idea of what is happening here?

Re: Oddities with Anti aliasing

Posted: 20.05.2008, 12:24
by ElChristou
I suppose no one has been able to reproduce this, right?

Re: Oddities with Anti aliasing

Posted: 20.05.2008, 17:09
by chris
ElChristou wrote:I suppose no one has been able to reproduce this, right?

I don't know what's going on with Mimas's orbit. However, anti-aliasing is behaving as expected. With graphics hard, full scene anti-aliasing usually refers to multisampling. Like the name suggests, with multisampling there are multiple color and depth values stored at each pixel. Before displaying the scene, the color samples are averaged together to determine the color of the pixel. A standard value for the number of samples per pixel is 4, though there is hardware that can support up to 16.

Suppose you are rendering a single solid color line with multisample anti-aliasing. Each pixel will end up with one of five values depending on how many of that pixel's samples are overlapped by the line: 0, 1, 2, 3, or 4. This places a limit on how smooth the line will look. Graphics memory usage constrains how many samples are practical: the amount of memory used increases linearly with the number of samples. Consider the memory used when rendering into 1600x1200 window. That's 1.92 million pixels. Each pixel uses 32 bits for color/alpha and 32 bits for depth information, for a total of 8 bytes per pixel. Already, we're nearly at 16 megabytes for the frame buffer. 4x multisampling bumps the memory usage up to 64 megabytes!

Line smoothing (or more generally, edge anti-aliasing, since it can work on triangles too) operates differently than multisampling. As the hardware is drawing the line or triangle edge, it calculates the fraction of the pixel covered. The resulting pixel color is the line or triangle color is multiplied by the coverage fraction. The coverage is calculated to some arbitrary precision so there are lots of intermediate pixel values. It's not actually stored in the frame buffer, so there's no memory usage constraint like there is with multisampling. So what's the catch? Edge aliasing doesn't work properly when objects overlap on screen. There are lots of terrible looking artifacts even in fairly trivial scenes. While lines may look ok, everything else will look like garbage. Even lines will suffer if depth writes are enabled--that's the reason that foreground orbit paths don't properly occlude background paths in Celestia.

--Chris

Re: Oddities with Anti aliasing

Posted: 20.05.2008, 23:07
by symaski62
:D nvidia 8400 GS 175.16 version

Re: Oddities with Anti aliasing

Posted: 06.06.2008, 10:57
by ElChristou
BTW, despite testing Celestia on a pretty recent hardware (256mo board), stars in point style are not good at all when full AA is on (faint ones disappear, some others appear as a little bar (2 px) etc...). Is there something to do to fix this? (or is this a problem with the hardware?)

Re: Oddities with Anti aliasing

Posted: 06.06.2008, 16:36
by chris
ElChristou wrote:BTW, despite testing Celestia on a pretty recent hardware (256mo board), stars in point style are not good at all when full AA is on (faint ones disappear, some others appear as a little bar (2 px) etc...). Is there something to do to fix this? (or is this a problem with the hardware?)

I think that the point size of the stars needs to be increased when AA is enabled. However, this strikes me as a little odd . . . It's almost as if the points are shown as a single sample (1/4 of a pixel at 4x AA) instead of a single pixel. I'll experiment when I have some time.

--Chris

Re: Oddities with Anti aliasing

Posted: 08.06.2008, 15:15
by RVS
Image
:roll:

Re: Oddities with Anti aliasing

Posted: 12.06.2008, 00:44
by chris
RVS wrote:Image
:roll:

This has nothing to do with Celestia. Most likely, it is a result of the particular arrangement of pixel subsamples used by your graphics hardware. What is your antialiasing setting?

--Chris