POV-Ray : Newsgroups : povray.text.tutorials : Radiosity Voodoo - Volume 2: The Parameters Server Time
28 Mar 2024 15:31:36 EDT (-0400)
  Radiosity Voodoo - Volume 2: The Parameters (Message 1 to 3 of 3)  
From: clipka
Subject: Radiosity Voodoo - Volume 2: The Parameters
Date: 31 Dec 2008 11:30:00
Message: <web.495b9ce3ad98218d483cfa400@news.povray.org>
2. The Parameters
    -----------------


material ambient and global ambient_light:

With radiosity used to compute indirect illumination, PoV-ray's classic ambient
mechanism is basically obsolete. The mathematical principles behind it, however,
are exactly what is needed to simulate objects that emit light, allowing them to
act as light sources for radiosity.

In scenes with conventional lighting, merely "spiced up" with radiosity for
indirect lighting, you will usually want to turn off the ambient mechanism, by
either specifying a global ambient_light value of 0, or setting all materials'
ambient value to 0. Or both, which is probably the best idea: Setting
ambient_light to 0 ensures that no material will emit light whatsoever without
having to update all the material library you may be using, while defining your
own materials with an ambient of 0 ensures that you can later use them again in
radiosity-only scenes.

In radiosity-only scenes, you need some objects to emit light, so your global
ambient_light must be nonzero (unless the only light source you will be using is
a sky sphere). For ease of use, a value of 1 is ideal, so that you can directly
control an object's emissive brightness by its material's ambient value.

Sometimes you may want to use materials from a library which were defined with a
nonzero ambient value for conventional lighting. In this case, you may resort to
using a very small global ambient_light (e.g. 0.001), and turning up your light-
emitting objects' ambient value accordingly (multiply by 1000 in this case),
although I recommend to avoid such quirks. Note also that you cannot assign an
ambient value to a sky_sphere.


global max_trace_level:

In radiosity-only scenes, you want to set this a good deal higher than normal -
Otherwise you *will* end up with stray dark splotches, that can't be really
cured by any other means.


adc_bailout:

This parameter specifies an alternate ADC bailout value to use when tracing a
radiosity sample ray.

In POV 3.6 and earlier, and 3.7 beta versions up to .29, contrary to
documentation this value was actually implemented as a factor to multiply the
standard value with; e.g. if your global adc_bailout was set to 0.01 and your
radiosity adc_bailout was set to 0.02, you would have an effective ADC bailout
value of 0.0002 during radiosity tracing, rendering this mechanism mostly
useless.


always_sample:

When set to "off", this effectively sets "nearest_count" to 1 during the final
render, so that new radiosity samples are only taken if they are absolutely
needed.

For quick test renders, you may want to set this parameter to "on" to get away
with a faster pretrace (or none at all).

Othrwise, you will definitely want to set this parameter to "off", as new
samples taken during final trace may cause visible "jumps" in color or
brightness between areas rendered before and after the new sample was taken.

(Note that I recommend to set "nearest_count" to 1 anyway, which leaves this
option without any effect.)


count:

This parameter is fairly straightforward: It specifies how many rays are shot
for every radiosity sample.

If your scene is quite homogenous regarding color and brightness, you will
probably want to set this parameter fairly low to get a fast render.

If your scene has some comparatively small features of distinct color or
brightness, make sure you set this parameter fairly high, otherwise those
features will be totally missed for some radiosity samples, while having too
much impact on samples if they happen to be hit, resulting in visible splotches.
As a rule of thumb, set this value high enough so that every prominently colored
feature will typically be hit by multiple rays. Note however that having
a lot of such objects of similar color allows you to reduce the count again.

If you use a High Dynamic Range light probe for illumination with very small
areas contributing very much of the total brightness, make sure to crank the
count parameter up to maximum, and/or use a heavily blurred version of the
probe. I recommend the latter for speed considerations, but it requires either
that your light probe itself is not visible in the background or in reflections,
that you use strong focal blur, or that you use a version of PoV-ray that
supports the no_radiosity flag so that you can set up one sky sphere for
radiosity and another for reflections and background. Using a radiosity pre-
render with a blurrier sky texture may be a fallback option, but since the final
render may need to take additional samples despite best efforts, I recommend
some other approach if possible.


low_error_factor:

This parameter determines the relation between the density of samples taken
during pretrace, and the density of samples required for the final render. More
precisely, it specifies a scaling factor for the distance at which a sample is
still considered re-usable.

You may normally want to set this parameter to a value somewhere near 0.5, which
ensures that even if the pretrace missed some points, these will still be
covered by nearby samples instead of requiring additional ones being taken
during the final render.

If your scene is radiosity-lit with small light sources, and the maximum of 1600
sample rays turns out to be still insufficient, you may additionally want to
reduce low_error_factor. The effect of reducing low_error_factor by a certain
factor is somewhat similar to further increasing the count by the square of that
factor, except that it may give a slightly better quality at slightly lower
performance, and may require a higher-resolution pretrace.

Note that nearest_count does something similar, but not as good.


minimum_reuse:

The mechanism behind this parameter sacrifices quality to gain speed, by
enforcing a certain minimum distance between radiosity samples, depending on how
far away (and therefore how small in the final image) they are. The
minimum_reuse specifies the ratio between the minimum distance of two radiosity
samples and the camera distance.

If your scene contains only large structures, you will probably want to set this
parameter fairly high to get a fast render.

However, if your scene contains lots of small details and you rely solely on
radiosity for lighting, make sure you set this parameter low enough, using the
following formula, where detail_size is the size of your smallest detail on
screen:

minimum_reuse = 0.5 * (detail_size / image_width) * tan (camera_angle/2)

Aside from improving render speed (including getting away with a lower-
resolution pretrace), there is no benefit of setting this parameter to a high
value.


nearest_count:

This parameter specifies how many samples must be "within reach" to re-use them.
However, this does not place any upper limit on the number of samples actually
re-used.

Note that you normally want this effectively turned off during the final render
to prevent additional samples from being taken, by specifying "always_sample
off".

I recommend always setting this parameter to 1, as a higher sample density can
be achieved just as well by lowering low_error_factor, which has the benefit of
enforcing a more homogenous sample distribution, while nearest_count may allow
samples to "flock", thereby somewhat reducing the benefit.

Note that increasing nearest_count by a certain factor has the same effect on
overall sample density as dividing low_error_factor by the root of that factor.

(It seems that previous versions of POV-Ray used this value to place an *upper*
limit on the number of samples re-used for a certain point, which may explain
the existence of this otherwise obsolete parameter.)


pretrace_start & pretrace_end:

The pretrace_end value should be low enough to allow all necessary samples to be
taken during pretrace already. I recommend using 1/min(image_width,image_height)
if you are patient enough, which causes the last pretrace to be taken at the
same resolution as the main render; otherwise set it according to the following
formula:

pretrace_end = 0.5 * minimum_reuse / tan (camera_angle/2)

If you choose a high nearest_count to work around the 1600 sample ray limit,
make sure to further reduce this value according to the following formula:

pretrace_end = 0.5 * minimum_reuse / ( tan (camera_angle/2) * sqrt
(nearest_count) )

This makes sure that you get the full number of samples for every pixel.

For pretrace_start, I recommend using some power-of-2-fold of the value you use
for pretrace_end, especially if you intend to go for a full-resolution last
pretrace. Basically, any power of 2 will do, although it should not be too low,
especially if you have chosen a high nearest_count. I suggest going for
dramatically high values, as this will ensure the most homogenous distribution
of samples.


recursion_limit:

This parameter specifies how many "generations" of samples will be taken.

For rather open scenes, a value of 1 should usually suffice. If you have many
dark edges and hollows though, you may want to set this to 2 or even 3 to shed
light into all corners.

Note however that this may also increase the risk of light "leaking" through
thin walls, especially at corners.


---(End of Volume 2)---


Post a reply to this message

From: Cousin Ricky
Subject: Re: Radiosity Voodoo - Volume 2: The Parameters
Date: 20 Sep 2011 08:00:01
Message: <web.4e787fe9c286f8cd85de7b680@news.povray.org>
"clipka" <nomail@nomail> wrote:
> The pretrace_end value should be low enough to allow all necessary samples to be
> taken during pretrace already. I recommend using 1/min(image_width,image_height)
> if you are patient enough, which causes the last pretrace to be taken at the
> same resolution as the main render; [snip]

It appears that 1/max(image_width,image_height) achieves the result that you
describe.


Post a reply to this message

From: clipka
Subject: Re: Radiosity Voodoo - Volume 2: The Parameters
Date: 20 Sep 2011 11:18:05
Message: <4e78aead@news.povray.org>
Am 20.09.2011 13:58, schrieb Cousin Ricky:
> "clipka"<nomail@nomail>  wrote:
>> The pretrace_end value should be low enough to allow all necessary samples to be
>> taken during pretrace already. I recommend using 1/min(image_width,image_height)
>> if you are patient enough, which causes the last pretrace to be taken at the
>> same resolution as the main render; [snip]
>
> It appears that 1/max(image_width,image_height) achieves the result that you
> describe.

Darn, I guess you're right.


Post a reply to this message

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