Skip to content. Skip to navigation

Illuminate Labs

Sections

Final Gather and HDR environments

Learn how to use HDR images as sky color.

Project files: gi_adv.zip

The scene consists of 10 nurbs spheres on a plane. There is no light source in the scene. Let's render it with default render settings, using the Default Light (Render Settings -> Common -> Render Options) for lighting.


Sky Light

Now to get more realistic lighting and shadows we disable the default light and enable Final Gather (Render Settings -> Render -> Final Gather). The default setting is a bit high for preview rendering, so we decrease the Gathering Rays to 300. We also enable Sky Light. The empty space around the scene will then work as a large area light, casting very soft shadows. Set the Sky Color attribute to a bright white color. Render again.


Since the sky has the same color in all directions we get a very diffuse "foggy day" lighting.

HDR Environments

To make the lighting more interesting we can map an HDR image to the Sky Color attribute in the Final Gather roll out . This is done by connecting a simple shader network to the Sky Color attribute.


In the Hypershade editor, choose the Textures tab, then display the graph network of the envSphere_FGsky node (right click node and hold to display this option). In the Outliner (Window -> Outliner...), make sure 'Display -> DAG Objects Only' is unchecked, then drag the TurtleRenderOptions node onto the Hypershade Work Area. Now connect envSphere_FGsky.outColor to TurtleRenderOptions.fgSkyColor. The resulting network should look like the one in the image above.

The file_envSphere_FGsky node is already set up to load the HDR file kitchen.hdr. Note that the HDR file should be in latitude/longitude format. Hit the render button.


We get a lot more artifacts this time. That is because the variance between pixels in the hdr image is very high, and the final gather algorithm is not able to do an accurate integration of the light with just 300 gathering rays. We could improve this by increasing the Gathering Rays a lot, but that is expensive. A better approach is to blur the hdr image, so that its pixel variance is reduced. This can be done with the node file_envSphere_FGsky Filter Offset. Set the attribute to 0.05.


The quality has now improved a lot without increasing the render time. The balls still have some artifacts and we must increase the Accuracy and Gathering Rays to get rid of them. We set Gathering rays to 800 and Accuracy to 1.2, this gives a better result.


To add more realism we can make the hdr image visible in reflections of the spheres. This can be done in two ways, by using the reflection feature in IBL or by assigning an enviroment shader to the shading group sg_ball (found in 'Shading Groups' tab in the Hypershade editor). We will use the later alternative in this tutorial.

There is a prepared envSphere_reflect node in the scene, assign envSphere_reflect.outColor to sg_ball.ilrEnvironmentShader and hit the render button.


The frame is a little bright, we can adjust this with the Color Balance feature in Final Gather, we will set the Intensity to a value of .5 and hit the render button.


Return to Tutorial index

Last modified 2006-09-04