POV-Ray : Newsgroups : povray.advanced-users : Per object antialiasing demo : Per object antialiasing demo Server Time
28 Jul 2024 20:23:59 EDT (-0400)
  Per object antialiasing demo  
From: Gilles Tran
Date: 7 Jan 2004 20:15:13
Message: <3ffcaf21@news.povray.org>
Further to the reflection blur thread in p.general and as an answer to a
question by Christoph Hormann, here's a demo of per object antialiasing in
Cinema 4D.

The scene is built with primitives (see the POV-Ray version at the end of
this message) and uses a hard omni light, transparency and reflection. so I
guess it's mostly raytracing (no scanline).
The figure attached to the name is the render time in seconds.

No antialiasing at all : http://www.oyonale.com/temp/po_none_4s.png
OK, it's really bad.

Now with antialiasing, but a very bad one (I lowered the settings almost at
their minimum) : http://www.oyonale.com/temp/po_bad_6s.png
It's almost as bad as the non antialiased one, but notice an interesting
thing: when the shapes are seen directly (hit by the first ray), they are
already very well antialiased (see the sphere outline vs its reflection, and
the checker on the plane vs when it's seen through the yellow disc). I don't
know (yet) what causes this, as it seems a default feature.

Note that to make things look more POV-Rayish, I turned off a C4D aa feature
(MIP scaling) that tends to antialias the textures with little rendering
overhead.
With a 100% MIP scaling, the previous scene looks like this:
http://www.oyonale.com/temp/po_bad_mip_7s.png
Here the textures are quite perfect, but the shadow and outlines in the
reflection are wrong, like in the previous image. Obviously, in a real
image, I would use MIP scaling to avoid using higher aa.

In any case, I kept the bad antialiasing values and the 0% MIP scaling as a
general setting for the entire scene and then gave each object in turn a
better setting (actually the default one with a slightly lower aa
threshold - see the POV-Ray manual!).

Sphere only : http://www.oyonale.com/temp/po_bad_sph_11s.png
The sphere looks good in direct view (except a little spot on the top) and
seen through the disc but its reflection and shadow are bad, as are the disc
reflection and the plane checker seen through the disc. It means certainly
that the per object aa is applied whenever the object is hit by a ray which
is direct or transmitted, but not reflected.

Disc only : http://www.oyonale.com/temp/po_bad_dsc_11s.png
Everything that is seen through the disc is good (sphere and checkered
plane), so we can guess that the aa settings of an object are also used for
everything that can be seen through it.

Plane only : http://www.oyonale.com/temp/po_bad_plane_12s.png
Everything that is on the plane (reflection, texture and shadow) is good.
The plane looks good through the disc too. We can guess that reflections and
shadows seen on an object use its aa settings.

Entire scene with the good settings:
http://www.oyonale.com/temp/po_good_16s.png
Here everything looks good... except the little white spot on the top of the
sphere.

To get rid of it, I raise the aa quality for the sphere until it disappears:
http://www.oyonale.com/temp/po_almostperfect_38s.png
Now the spot gone from the sphere, but is still on the reflection, which is
to be expected. However, from a practical point of view, this scene is a
good compromise between render time and quality.

To get rid of the spot on the reflection, one can use a higher aa on the
plane too, while giving a much lower one to the entire scene:
http://www.oyonale.com/temp/po_perfect_134s.png

Here the higher settings are used on the entire scene, as we would do in
POV-Ray:
http://www.oyonale.com/temp/po_perfect_164s.png
Of course this one takes the longest time to render.

I guess that this illustrates how a per object aa can work in practice, and
the benefits of it, particularly in render time. In POV-Ray we could even
have the additional goodie of declaring and naming the object settings so
that turning them off and on could be done with variables.

Here's the equivalent POV-Ray scene for those interested. I used rather
extreme aa settings (+A0.0 +F +AM2 +R4 +J) so the render times are extreme
too. Certainly it could be done faster (+A0.0 +AM1 +R9 or +A0.0 +AM2 +R3) .
http://www.oyonale.com/temp/po_pov_700s.png


at the picture from a distance and slightly from above or below, and which
is absent from the high aa C4D pics. Scale down the sphere texture by 2 to
see it more clearly. It becomes visible in C4D too, but it's much less
acute, particularly if MIP scaling is used.

#include "colors.inc"
global_settings {assumed_gamma 1.0}
camera {
    location -z*600    angle 60
    right x*image_width/image_height
    look_at   z
}
background{Cyan}
light_source { <-600,-200,-300> color Red}
light_source { <600,600,-600> color White}
sphere{0,100 texture{pigment{checker Black,White scale 1/100
warp{spherical}} finish{ambient 0 diffuse 1}}}
box{<-500,-500,0>,<500,500,0.001> texture{pigment{checker Black,White scale
100}finish{ambient 0 diffuse 1 reflection 0.7}} rotate y*45 translate z*300}
disc{0,z,100 texture{pigment {rgbf <1,1,100/255,0.8>} finish{ambient 0
diffuse 1}} translate <-100,0,-300>}

G.

-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

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