Houdini 11 Lighting

Overview

Ambient occlusion is a fast technique for producing soft, diffuse lighting in open spaces by using ray tracing. It is computed by determining how much of the hemisphere above a point is blocked by other surfaces in the scene, and produces a darker lighting value when the point is heavily occluded. This technique is useful when you want a GI-like effect without the slow rendering time of global illumination.

Ambient occlusion is usually used when your scene has uniform light. It has a similar effect as using the environment light, but renders faster.

Note

Ambient occlusion does not work with physically based rendering.

The environment light produces an effect similar to using ambient occlusion, but it doesn’t render as fast. Use an environment light instead of ambient occlusion when your scene’s environment lighting is directional, or when you are using physically based rendering. See the Lights and Cameras shelf help for how to create an environment light.

How to

  1. Go to the SHOP network: right-click or press and hold on the network editor's path and choose Other Networks > shop.

  2. Use the tab menu to create a VEX Global Illumination light shader node.

    Make sure that Ambient Occlusion is selected in the Irradiance drop-down menu. You may also want to tweak the Sampling Quality value. The higher the value, the longer it will take to render.

  3. Go back to the Scene level: right-click or press and hold on the network editor's path and choose Other Networks > obj, or use the network editor’s Back button.

  4. Use the tab menu to create a Light Template node.

  5. In the parameter editor of the light template, click the Render tab, then click the Shaders sub-tab. Assign the VEX Global Illumination you just created as the Light Shader.

Optimizing performance and quality

Samples

Decreasing the sample count allows you to improve render time at the expense of some additional noise in the render. For example, the following render uses the same shader as the image above but decreases the samples from the default of 256 to 16.

Irradiance caching

Irradiance caching is a technique that allows ambient occlusion values to be shared across a surface to improve performance.

If you enable irradiance caching with ambient occlusion, you can speed up your render time immensely. Irradiance caching works by reusing pixel values in adjacent pixels, so it does not have to compute each individual pixel. Increasing the sample values will reduce noise in your render.

Sometimes, when using irradiance caching, artifacts appear near sharp edges. For example, some pixels may appear brighter than they should be. To resolve these artifacts, decrease the Max Pixel Spacing parameter on the Irradiance sub-tab of the Properties tab of the render node.

To...Do this
Enable irradiance caching for the entire scene
  1. Choose Render > Edit Render Node > node name.

  2. In the parameter editor, click the Properties tab, then click the Irradiance sub-tab.

  3. Turn on the Enable Irradiance Cache.

Enable separate irradiance caches per object

Add the “GI File (vm_gienable)” irradiance cache file property to a geometry container object and set the file name to save the cache to. See properties for information on how to add a render property to an object.

Environment maps

If you have a smooth environment map, it is possible to replace the global background color with the value from an environment map. All you need to do is change the Environment map parameter on the Irradiance tab of your VEX Global Illumination shader to point to your map.

See how to create an environment/reflection map.

Image-Based Illumination

To create more subtle environment illumination, you can also use a light probe image. Houdini reads environment maps that are set up in the cross format similar to those found at the Light Probe Image Gallery hosted by Paul Debevec. You can also read Paul Debevec and Dan Lemmon’s writings on Image-Based Lighting in their SIGGRAPH 2001 course.

These files are high definition light probes that can be converted by Houdini’s isixpack reflection map generator utility into rat files. When these files are assigned as Environment maps in the VEX Global Illumination shader then the lighting is derived from image.

To use the light probes as an environment map, complete the following steps:

  1. Convert the light probe.

    Get a light probe in the high definition radiance format (hdr). This example uses the rnl_cross file from Paul Debevec’s Light probe Image Gallery.

    Open the Command Line Tools and cd to the file. Enter the following:

    isixpack filename.hdr filename.rat

  2. Load the Environment Map.

    In the VEX Global Illumination, load the new rat texture into the Environment Map __parameter. Because these lights are quite intense, you should lower the __Global Tint to about 0.7, 0.7, 0.7. This value will depend on the map chosen.

  3. Render.

    In the mantra render output, click on the Render button to start another test rendering. Set your sampling and error values as you see fit. This time there is more illumination on surfaces that face the sky and less on the side surfaces of objects. If you had any reflectivity on the objects then you could also use the texture as a reflection map.

See how to create an environment/reflection map.