Houdini 11 Rendering

Overview

For information on what physically based rendering is and why you might want to use it, see understanding PBR.

Note

Irradiance caches aren’t supported for PBR.

Using physically based rendering

Physically based rendering is implemented as a rendering engine inside mantra.

  1. Change the Rendering Engine to either Physically Based Rendering or Micropolygon Physically Based Rendering on the Render tab in the parameter editor of a mantra render node.

  2. Render your scene.

Micropolygon Rendering vs. Raytracing

There are two types of rendering in PBR, micropolygon rendering and raytracing. Micropolygon physically based rendering, like micropolygon rendering, decouple the Min Ray Samples from the Pixel Samples, allowing different numbers of motion blur from raytracing samples.

Micropolygon rendering uses the maximum of the Min/Max Ray Samples samples to determine the number of antialiasing samples per micropolygon. Raytracing uses Pixel Samples to do all of these things.

The following in an example of micropolygon PBR with Pixel Samples set to 4×4 and Min Ray Samples set to 16:

The following in an example of raytraced PBR with Pixel Samples set to 4×4:

One of the features of micropolygon rendering is that shading is dragged with the object as it moves. This has the desirable side effect of blurring out noise from the low sampling rate.

See the Render Quality and Performance help for more information.

Micropolygon renderer does not generally allow shading to be occluded on a per-pixel basis; however, ray tracing does. Mantra will perform occlusion culling to eliminate volumes that are hidden by a fully opaque surface, but if that surface is partly transparent or it is not solid across many tiles this optimization is likely to fail. The reason for this is that normally micropolygon or microvolume grids cover many pixels (often several tiles), so all those tiles would need to be fully occluded for the volume shading to be avoided.

Lighting

Area lights are very efficient to use with physically based rendering, specifically the environment light. For more information on lights see the Lighting help.

Diffuse secondary lighting

Secondary lighting can make a big difference to the appearance of a scene.

The following image was rendered only using direct lighting:

The following image was rendered using direct and indirect lighting:

There are two approaches to achieve indirect lighting using physically based rendering. You can either render long light paths using path tracing or cache indirect light to a photon map and then perform a final gather from the map.

Path tracing

To enable path tracing of longer paths using physically based rendering, you must increase the Diffuse Limit parameter on the PBR sub-tab in the parameter editor of the mantra output driver. Increasing the number of diffuse bounces will slow down the render and increase the amount of noise, so you might have to increase the number of samples to achieve a higher quality render.

View-dependent photon maps

Caching indirect lighting to a photon map requires two output drivers, one to render the photon map and one to use the photon map for final gathering in the render.

To...Do this
Set up a mantra render node for photon map generation
  1. Set the Rendering Engine to View-Dependent Photon Map Generation on the Render tab in the parameter editor.

    You can also edit the Global Photon File on the PBR sub-tab of the Properties tab to change the file path where the photons will be stored.

  2. Render the node to generate the photon map.

Set up a mantra render node to perform a final gather from the photon map
  1. Increase the Diffuse Limit on the PBR sub-tab of the Properties tab in the parameter editor to have a value of at least 1.

  2. On the PBR sub-tab of the Properties tab, change the Secondary GI Cache parameter to Photon Map. This will allow secondary illumination to be drawn from the photon map rather than from path tracing.

  3. Verify that the photon map contains valid data by changing the Primary GI Cache parameter to Photon Map from the drop-down menu on the PBR sub-tab of the Properties tab in the parameter editor. This will allow direct visualization of the photons in the map.

Parameters that will alter the global illumination performance and quality

Photon Storage Count

This parameter displays the number of photons that are stored in a photon map. Larger numbers of photons will produce more accurate results.

View Photon Supersamples

This parameter displays the number of supersamples for view-dependent photon map generation. Larger numbers of supersamples will produce higher quality results.

Global Prefiltering

This checkbox determines if global photons should be prefiltered. Prefiltered maps average out photon values before the photon map is closed to allow faster photon look-up.

Global Count

This parameter displays the number of global photons to filter at a point. Larger numbers of filtered photons will produce blurry, smoother results.

Global Radius

This parameter displays the filter radius in world space. Photons will only be considered for filtering if they fall within the specified distance of the search point.

Rendering caustics with PBR

Caustics are created when light (either from a light source, or a constant shaded object) passes through a specular material such as a refractive object or reflective surface, producing patterns of focused light on the surface behind it. You can render caustics using photon maps and the physically based rendering algorithm in mantra. When caustic paths are enabled, color bleeding will occur even from lights or surfaces that are hidden behind refractive/reflective objects.

This is an example of an image that does not have caustics. Notice that the light is not passing through the transparent object.

This is an example of what the scene looks like with caustics and light.

Rendering using caustics and light

If you use PBR, you don’t have to do anything else to see caustics. Use the Caustic Light tool on the Lights and Cameras shelf tab to add indirect light to the scene with the correct options. This tool adds an environment light using caustic photon maps, causing other lights in the scene to cast caustic reflections/refractions.

By default, when you place an indirect light using the Caustic Light tool, you have to turn off Prefilter Photon Map and increase the Filter Samples to 100 to get it to work correctly. Also, make sure you have a reflective/refractive material in the scene, such as the glass default shader.

Tip

Only apply the caustics to the objects that are generating the effect by putting these objects in the Photon Target parameter.

Deep rasters

Deep raster planes are exported by the pathtracer shader for PBR. The default PBR shader supports a number of export variables. Exports that are available as light exports can be exported either on a per-light basis or as a combination for all lights. To specify a per-light value, use the light name in the deep raster parameters. To specify a sum over all lights, leave the light name blank. The same variable name is used for both the light and combination export. However, you should name the deep raster planes differently.

VEX Variable Name

Type

Light Export

Description

direct_diffuse

vector

available

Direct lighting, diffuse component

direct_specular

vector

available

Direct lighting, specular component

direct_reflect

vector

available

Direct lighting, reflection component

direct_refract

vector

available

Direct lighting, refraction component

direct_emission

vector

not available

Direct emission

indirect_diffuse

vector

available

Indirect lighting, diffuse component

indirect_specular

vector

available

Indirect lighting, specular component

indirect_reflect

vector

available

Indirect lighting, reflection component

indirect_refract

vector

available

Indirect lighting, refraction component

indirect_emission

vector

not available

Indirect emission

all_diffuse

vector

available

All diffuse lighting

all_specular

vector

available

All specular lighting

all_emission

vector

not available

All emission lighting

direct

vector

available

All direct lighting

indirect

vector

available

All indirect lighting

level

float

not available

Average pathtracing depth for a pixel

diffuselevel

float

not available

Average diffuse pathtracing depth for a pixel

specularlevel

float

not available

Average specular pathtracing depth for a pixel

Tips

Photon maps will only be generated for point lights and spot lights. If you are using point lights, make sure it is close enough to the scene to ensure that enough photons will hit your transparent geometry. If you are using spot lights, make sure it is illuminating as small an are of your scene as possible. You can do this by adjusting the Cone Angle and Cone Delta parameters on the Spot Light Options sub-tab of the Light tab.

If your render produces the error message: “Aborting photon generation from light...”, try moving your light closer to the scene or fixing the orienting toward your geometry. If the light is too far away from your scene it will not be able to efficiently generate photon maps.

Troubleshooting

White speckles

If you have white speckles in your image, you can try to fix it by limiting the number of color contributions a pixel will accept.

On the output driver Properties tab, add the mantra9.0/render/Color Limit property (see properties for information on how to add properties).

Decreasing this value is a bit of a hack: it can eliminate white speckles by clamping the amount of color contributed to each pixel, but it thereby darkens the image overall, and decreases the accuracy by truncating color contributions instead of distributing them equally.