radiosity with conventional lighting
Megapov introduced a new faster and more realistic radiosity model to Povray, that is now also available in Povray 3.5.
In POV-Ray 3.5 radiosity is automatically activated if there is
a radiosity block in "global_settings"
.
If you are using megapov, you have to enable radiosity via command-line/ini file
(+QR/Radiosity=on) like in POV-Ray 3.1.
The pictures here introduce combined conventional/radiosity lighting. The second part of this tutorial with pure radiosity illumination is also available.
I also wrote a short section about normals and radiosity.
Example (these are the default settings in megapov, same result as an empty radiosity block):
global_settings {
radiosity {
pretrace_start 0.08
pretrace_end 0.04
count 35
nearest_count 5
error_bound 1.8
recursion_limit 3
low_error_factor 0.5
gray_threshold 0.0
minimum_reuse 0.015
brightness 1
adc_bailout 0.01/2
}
}
The following pictures are rendered with default settings and are made to introduce the sample scene (you can click on them to open a new window for comparison)
All objects except the sky have an ambient finish of 0.
The "ambient 1"
finish of the blue sky makes it
functioning as some kind of diffuse light source.
This leads to a bluish touch of the whole scene in the radiosity version.
no radiosity | megapov (default settings) | difference w/o radiosity |
---|---|---|
You can see that radiosity much affects the shadowed parts when applied combined with conventional lighting.
Changing "brightness"
changes the intensity
of radiosity effects. "brightness 0"
would be
the same as without radiosity. "brightness 1"
should work correctly in most cases, if effects are too strong you can reduce this.
Larger values lead to quite strange results in most cases.
brightness 0.5 (settings) | brightness 1.0 (settings) | brightness 2.0 (settings) |
---|---|---|
Changing the "recursion_limit"
value
leads to the following results, second line are difference to default
("recursion_limit 3"
):
recursion_limit 1 (settings) | recursion_limit 2 (settings) | recursion_limit 5 (settings) |
---|---|---|
You can see that higher values than the default of 3 do not lead to much better results in such a quite simple scene. In most cases values of 1 or 2 are sufficient.
The "error_bound"
value mainly affects the
structures of the shadows. Values larger than the default of 1.8 do not have much
effects, they make the shadows even flatter. Extremely low values can lead to very
good results, but the rendering time can become very long. For the following samples
"recursion_limit 1"
is used.
error_bound 0.01 (settings) | error_bound 0.5 (settings) | error_bound 1.0 (settings) |
---|---|---|
Somewhat related to "error_bound"
is
"low_error_factor"
. It reduces error_bound
during the last pretrace step. Changing this can be useful to eliminate artefacts.
low_error_factor 0.01 (settings) | low_error_factor 0.5 (settings) | low_error_factor 1.0 (settings) |
---|---|---|
The next samples use "recursion_limit 1"
and "error_bound 0.2"
. These 3 pictures
illustrate the effect of "count"
. It is a
general quality and accuracy parameter leading to higher quality and slower
rendering at higher values.
count 2 (settings) | count 35 (default) (settings) | count 300 (settings) |
---|---|---|
Another parameter that affects quality is "nearest_count"
. You
can use values from 1 to 10, default is 5:
nearest_count 1 (settings) | nearest_count 5 (settings) | nearest_count 10 (settings) |
---|---|---|
Again higher values lead to less artefacts and smoother appearance but slower rendering.
"minimum_reuse"
influences whether
previous radiosity samples are reused during calculation. It also affects
quality and smoothness.
minimum_reuse 0.2 (settings) | minimum_reuse 0.015 (settings) | minimum_reuse 0.005 (settings) |
---|---|---|
Another important value is "pretrace_end"
. It
specifies how many pretrace steps are calculated and thereby strongly influences the
speed. Usually lower values lead to better quality, but it's important to keep this in
good relation to "error_bound"
.
pretrace_end 0.2 (settings) | pretrace_end 0.04 (settings) | pretrace_end 0.002 (settings) |
---|---|---|
Strongly related to "pretrace_end"
is
"always_sample"
. Normally even in the final
trace additional radiosity samples are taken. You can avoid this by adding
"always_sample off"
. That's especially useful
if you load previously calculated radiosity data with
"load_file"
.
always_sample on (default) | always_sample off | difference |
---|---|---|
The effect of "max_sample"
is similar to
"brightness"
. It does not reduce the radiosity
effect in general but weakens samples with brightness above the specified value.
max_sample 0.5 | max_sample 0.8 | default |
---|---|---|
You can strongly affect things with the objects' finishes. In fact that is the most important thing about radiosity. Normal objects should have ambient finish 0 which is not default in POV-Ray and therefore needs to be specified. Objects with ambient > 0 actually emit light.
Default finish values used until now are diffuse 0.65 ambient 0
.
diffuse 0.65 ambient 0.2 | diffuse 0.4 ambient 0 | diffuse 1.0 ambient 0 |
---|---|---|
Finally you can vary the sky in outdoor radiosity scenes.
In all these examples it is implemented with a sphere object.
"finish { ambient 1 diffuse 0 }"
was used until now. The following pictures show some variations:
ambient 0 diffuse 1 | ambient 0 diffuse 0 (no sky) | yellow-blue gradient |
---|---|---|
That's it for now about radiosity with conventional lighting, maybe i will add samples for some other radiosity parameters later.
If you have any suggestions for improvements or find errors, feel free to contact me.
Christoph Hormann October 24, 2000
updated and extended March 16 - April 4, 2001
Continue with the second part (radiosity without conventional lighting)