POV-Ray : Newsgroups : povray.general : Confusion about anti-aliasing : Confusion about anti-aliasing Server Time
5 Nov 2024 03:20:09 EST (-0500)
  Confusion about anti-aliasing  
From:
Date: 4 Jul 2003 23:25:15
Message: <3f06451b$1@news.povray.org>
Hi all,

the behaviour of anti-aliasing is irritating me:



          -1-

Why is the cylinder of the following tiny scene anti-aliased when using
the options
// +A0.9 +AM2 +R3 -J0.0 +FN +W400 +H300
// start of scene
cylinder { <-1, 0, 2>, <1, 0.03, 2>, 0.03
  texture {
    pigment { color rgb .25 }
    finish { ambient 1 diffuse 0 }
    }
  }
// end of scene

The maximum color difference is (according to the formula in the inbuilt
help, 5.2.6.4): abs(.25-0)+abs(.25-0)+abs(.25-0) = .75, which is less than
.9, so no anti-aliasing should be done. I used 3.5.icl.win32, windows
2000 professional, 933 MHz, 256 MB. Enlarging the picture (in IrfanView)
clearly shows anti-aliased pixels.



          -2-

A totally empty scene, rendered with "+A0.9 +AM2 +R2 -J0.0 -F +W400 +H300"
casts 120701 rays in 0.28 seconds. Change "+R2" to "+R6": this casts the
same number of rays in 6.22 seconds; "+R7": 137.98 seconds. To me this
looks as if the anti-aliasing is done even if difference<threshold, but in
this case the rays are not counted.



          -3-

The inbuilt help 5.2.6.4 says:
   "If this difference is greater than the threshold then both pixels are
   super-sampled. The rgb values are in the range from 0.0 to 1.0 thus the
   most two pixels can differ is 3.0. If the anti-aliasing threshold is
   0.0 then every pixel is super-sampled. If the threshold is 3.0 then no
   anti-aliasing is done."

This is not consistent, it should either be (changes in boldface):
   "If this difference is greater OR EQUAL than the threshold then both
   pixels are super-sampled. The rgb values are in the range from 0.0 to
   1.0 thus the most two pixels can differ is 3.0. If the anti-aliasing
   threshold is 0.0 then every pixel is super-sampled. If the threshold is
   3.0 then ANTI-ALIASING IS DONE ONLY IF ONE PIXEL IS PURE BLACK AND THE
   OTHER IS PURE WHITE. If the threshold is GREATER THAN 3.0 then no anti-
   aliasing is done."

or
   "If this difference is greater than the threshold then both pixels are
   super-sampled. The rgb values are in the range from 0.0 to 1.0 thus the
   most two pixels can differ is 3.0. If the anti-aliasing threshold is
   0.0 then BOTH PIXELS ARE super-sampled IF THEIR RGB VALUES ARE NOT
   EQUAL. If the threshold is 3.0 OR GREATER then no anti-aliasing is
   done."

I would stongly prefer the anti-alias decision being implemented as
"difference is greater than threshold".

Currently I suggest to NEVER use Antialias_Threshold = 0.0; 0.001 should
do the same (at 8 bits per color) and will save VERY much time if the
scene contains areas without change in color. (For example statistics see
my answer to p.g: "What causes this effect" (started by
"mca### [at] aolcom (S McAvoy)").



          -4-

To set a threshold>=1, a leading zero is required: "+A1.0" isn't accepted,
but "+A01.0" is. This is not documented (and should not be neccessary).



          -5-

A trailing ".0" may not be omitted. The syntax is (according to internal
help 5.2.6.4)

   +An.n     Sets aa on with aa-threshold at n.n

The symbol "n.n" is defined as (internal help, 5.2):

   n.n       Any float such as in Clock=3.45

Because 0 is a legal float value, it should be accepted here (ANY float!).



I'm confused ...

   Sputnik


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.