Anit-Aliasing POV-Ray Examples


Without anti-aliasing - With anti-aliasing (.3)

POV-Ray has several anti-aliasing techniques: (see POV-Ray tutorial for more details)

When anti-aliasing is turned on, POV-Ray attempts to reduce the errors by shooting more than one viewing ray into each pixel and averaging the results to determine the pixel's apparent color. This technique is called super-sampling and can improve the appearance of the final image but it drastically increases the time required to render a scene since many more calculations have to be done.

Type 1 is adaptive because not every pixel is super-sampled. POV-Ray initially traces one ray per pixel. If the color of a pixel differs from its neighbors (to the left or above) by more than a threshold value then the pixel is super-sampled by shooting a given, fixed number of additional rays. The default threshold is 0.3.


Type 2 is recursive because the pixel is sub-divided and sub-sub-divided recursively. It starts by tracing four rays at the corners of each pixel. If the resulting colors differ more than the threshold amount additional samples will be taken. This is done recursively, i.e. the pixel is divided into four sub-pixels that are separately traced and tested for further subdivision. The advantage of this method is the reduced number of rays that have to be traced. Samples that are common among adjacent pixels and sub-pixels are stored and reused to avoid re-tracing of rays. The recursive character of this method makes the super-sampling concentrate on those parts of the pixel that are more likely to need super-sampling (see figure below). The depth determines the maximum number of subdivisions allowed.

Another way to reduce aliasing artifacts is to introduce noise into the sampling process. This is called jittering and works because the human visual system is much more forgiving to noise than it is to regular patterns. The location of the super-samples is jittered or wiggled a tiny amount when anti-aliasing is used. Jittering is used by default

POV-Ray Options

Antialias=bool

Turns anti-aliasing on/off

+A

Turns aa on with threshold 0.3 or previous amount

-A

Turns anti-aliasing off

Sampling_Method=n

Sets aa-sampling method (1 or 2)

+AMn

Same as Sampling_Method=n

Antialias_Threshold=n.n

Sets anti-aliasing threshold

+An.n

Sets aa on with aa-threshold at n.n

-An.n

Sets aa off (aa-threshold n.n in future)

Jitter=bool

Sets aa-jitter on/off

+J

Sets aa-jitter on with 1.0 or previous amount

-J

Sets aa-jitter off

Jitter_Amount=n.n

Sets aa-jitter amount to n.n. If n.n <= 0 aa-jitter is set off

+Jn.n

Sets aa-jitter on; jitter amount to n.n. If n.n <= 0 aa-jitter is set off

-Jn.n

Sets aa-jitter off (jitter amount n.n in future)

Antialias_Depth=n

Sets aa-depth (1 <= n <= 9)

+Rn

Same as Antialias_Depth=n