Background
Illumination
Using a simple background colour, you can illuminate a scene that
is not in an enclosed space. This type of illumination results in
a sophisticated ambient quality that can be quite compelling as
the sole source of illumination.
This illumination
setup involves the creation of a Global Illumination shader and
some Render output settings. As with all rendering options, the
key is to work with available parameters to strike the right balance
between fast render times and quality images.
These steps
can be used to set up lighting in your own scene or you can use
the following lesson file to explore your options.
Step
One: Create a GI Light Shader
Set your Network
Pane to Shaders (SHOP) and press
tab > Generators > VEX Global Illumination.
In the resulting v_gilight shader's Parameter pane, set the background
color to a light blue (0.9, 0.9 1). This color will be used to give
the scene an ambient-like illumination.
Next, set Irradiance
to Ambient Occlusion
and the Sampling Quality
to 32. These
settings are best for test renderings. Ambient
occlusion ignores the light bouncing from other
surfaces which is not needed in this case because there is no direct
light to bounce. The Sampling Quality
determines the number of rays being evaluated and a low setting
is ideal for test rendering.
Step
Two: Create a light
Set the Viewer
pane to Objects and press tab >
Generators > Light. In the Parameter pane,
click on the Shading tab then on the plus sign (+)
next to SHOP light. From the Operator list, click on shop then choose
v_gilight. Make sure that the light's Dimmer
found under the No SHOP tab is set to 1.
This parameter does have an affect on the amount of illumination
coming from the light even though a shader is being used.
You may want
to position the light above your objects in order to make sure that
they are not in darkness in the Open GL view. This position has
no affect on the rendered illumination which is being emitted as
if it is coming from a large sphere surrounding your scene.
Step
Three: Test Render the Scene
Set your network
type to Outputs and in the Network pane, press
tab > Generators > Mantra to create a
mantra render control. In the Parameter pane, set the Camera
to main_camera. Click on the Specific tab and turn
on Use Irradiance Caching.
This option lets you set values that will speed up renderings by
using a number of settings. Set the Default
Error to 0.5
to speed up the rendering by lowering its accuracy. The higher this
value is set the lower the quality of the rendering.
At the top of
the Parameter pane, click on the Render
button to start a test rendering. The result shows the general illumination
but is a spotty image that is a result of the low accuracy and sampling
values.

Step
Four: Re-render with Saved Cache
In the v_gilight
SHOP, set the Sampling Quality
to 100 and in
the mantra render output, set the Default
Error to 0.1.
This will increase the quality of the rendering but will take longer
to render.
In the mantra
render output, scroll down to the Cache
File parameter and enter test.cache.
Next, set the Cache Mode
to Write Only.
These options with save a cache file out that can be used to speed
up subsequent renderings as long as you are only adjusting certain
parameters in your scene.
At the top of
the Parameter pane, click on the Render
button to start another test rendering. The result is a better image
that took longer to render.

Step
Five: Re-render using Cache file
Set the v_gilight
shader's Global tint
to 1.5, 1.5, 1.5.
To use the cache file, set the mantra render output's
Cache Mode
to Read Only.
Make sure that Cache File
is still set to test.cache.
Click on the
Render button.
The result is a good quality image that took less time to render
and shows the affect of the new tint settings. Only the v_gilight's
Global tint and the object shaders' colors can be changed when using
the cache file. This limits its usage but can be very effective
when making little tweaks during the test rendering stage.

Step
Six: High Quality Output
To create even
higher quality images, you can turn off Irradiance
Caching and set your samples to a higher value.
This eliminates the error calculation but is much slower than with
caching turned on. The following image is an example with caching
off with a sampling value of 512.

You can also
get high quality images while leaving caching on to speed up rendering.
The following image was rendered using Irradiance
Caching with a Default
Error of 0.5
and Sampling Quality
of 2048. Make
sure that the Default Samples
in the mantra render output are also set to 2048.
This image shows how a large sampling quality can compensate for
a high error rate.

If you wrote
out a cache file with the image shown above then you can make changes
to parameters such as shader color, as shown with sphere's colour
change. These renderings will be much faster when generating test
images.

Note:If
you are familiar with Global Illumination then you might wonder
why the red of the ball is not being spilled onto the surrounding
surfaces. This is because there is no direct light in the scene
and background illumination is not bounced. When you learn about
setting up for indirect illumination,
you will learn how to get the colour spilling.
|