|On this page|
The indirect light object can be used to add indirect lighting to the scene that is not accounted for by raytracing - including indirect diffuse lighting and caustics. The light is designed to work with all rendering engines. When using PBR, the use of an indirect light will automatically override the calculation of indirect diffuse lighting and caustics to use the photon maps generated by the indirect light. When using non-PBR engines, the indirect light can add in indirect diffuse lighting that would not ordinarily be accounted for in the render.
In prior releases of Houdini (versions 9.0-10.0), photon maps were generated via the use of a second mantra ROP with parameters to control the photon map generation on the ROP itself. This workflow is no longer supported in 11.0. Instead, you should now use the Indirect Light to manage rendering of photon maps.
In Houdini 11.0.513 and later, global photon maps will additionally store and approximate glossy bounces (such as blurry reflections). You don’t need to modify the indirect light or mantra ROP parameters to take advantage of photon maps for glossy bounces.
This node is not actually a light. It is a photon map generator that requires one or more lights in the scene to see results.
Workflow for Diffuse Photon Map Rendering
Managing a renderer that uses photon maps can be a little more complex than simply using PBR with extra diffuse bounces. Here’s a checklist to verify that the photon maps are being generated accurately and that your render is running as efficiently as possible. These steps assume that you are using the Physically Based Rendering Rendering Engine.
Create an Indirect Light using either the GI Light shelf tool or by using the tab menu to create an Indirect Light.
In the Render View, perform an initial render. Verify that the photon map generation progress is reported at the top of the IPR viewer before the image is rendered.
On the Indirect Light object, change the Light Type to Direct Global Photon Map. This setting can be used during interactive renders to verify that the photon map has been generated correctly and is a reasonable approximation for the diffuse lighting in the scene.
If the render appears to have large blocks of constant illumination, increase the Photon Count until the quality reaches an acceptable level.
Switch between Direct Global Photon Map and Indirect Global Photon Map to see the quality difference between rendering the photons directly and using them for indirect lighting. If enough photons exist in the scene, the overall light level for each render should be roughly the same.
If you notice some artifacts in corners, increase the Prefilter Samples or try increasing the Photon Distance Threshold. Increasing the number of samples may require you to go back and increase the Photon Count to sharpen the photon map result.
Mantra ROP Parameters affecting photon maps
Photon map generation relies on the same shading parameters that are used when rendering with PBR. The following ROP parameters will affect the photon map generation.
The limit parameters on the Shading tab of the Mantra ROP. For example, to see diffuse bounces in the photon map increase the Diffuse Limit parameter, and to see refractive caustics increase the Refract Limit parameter.
The Allowable Paths parameter on the Shading sub-tab of the on the Rendering tab on the Mantra ROP. By default, PBR will exclude indirect lighting that it considers caustics since these types of paths commonly introduce a significant amount of noise in the render. However, with photon maps, caustic paths are easily generated and cached as part of the global photon map solution. To enable caustic paths in the photon map and in the render, change Allowable Paths to All Paths.
Controls the type of indirect light to be produced and the algorithm used to produce it.
Indirect Global Photon Map
Produces indirect diffuse lighting using a photon map. Rather than using the photon map directly, diffuse rays will be traced from the shading point and the photon map will be used only for these secondary hits. It is necessary to increase the Diffuse Limit on the mantra ROP to at least 1 for indirect diffuse lighting to appear in the render.
When using PBR, using an Indirect Light of this type is a fast alternative to simply increasing the Diffuse Limit on the ROP. Photon maps can be effective in improving performance and reducing noise especially in indoor scenes that involve a large amount of diffuse inter-reflections. To compare performance and quality with and without the use of the photon map, toggle the Light Enabled toggle on this light.
This setting is analogous to the Final Gather algorithm available in other rendering software.
Direct Global Photon Map
Directly display the diffuse photon map illumination on surfaces. This setting is useful to visualize the contents of the photon map but should generally not be used for renders.
Caustic Photon Map
This setting should be used when rendering caustics, or patterns of focused light that appear when illumination reflects off a reflective or refractive object. When using Caustic Photon Map mode, the photon map generation algorithm will also be configured to only calculate light paths that reflect or refract from objects before being absorbed by a diffuse surface.
If you're rendering a scene that requires both caustics and indirect diffuse lighting, you should render with 2 indirect lights - one for the indirect diffuse and another for caustics.
Produces indirect diffuse lighting using path tracing. This setting is only meaningful when rendering with non-PBR rendering engines, and it will use the irradiance VEX function.
Allows indirect illumination to be artificially tinted when rendered. This parameter does not affect photon map generation.
Allows indirect illumination to be artificially scaled when rendered. This parameter does not affect photon map generation.
Turning this toggle off is equivalent to setting the light intensity to 0.
Enable Light In Viewport
Turning this off removes the light from consideration in the viewport. This is useful for lights which only make sense at render time.
The space or comma separated list of categories to which this object belongs.
Currently not supported for per-primitive material assignment (material SOP).
Photon Map Options
Options to control generation and rendering of photon maps.
Auto-generate Photon Map
Enables automatic generation of a photon map. Photon map generation will proceed before the main render begins.
Use the IPR Viewer pane to see a progress bar for photon map generation. When using IPR with photon maps, be sure to press the Render button if you need to regenerate photon maps - photon maps are treated the same way as depth maps in IPR, and so must be manually regenerated when they are out of date.
The approximate number of photons to store in the photon map file.
A bundle to specify the lights to use for photon map generation from the indirect light. By default, all lights will contribute to photon map illumination.
It is possible to separate indirect lighting from different light sources by creating several Indirect Light objects with disjoint light masks, and then using per-light exports to create a deep raster plane for each Indirect Light’s illumination.
Since the Indirect Light object does not produce any illumination of its own, all Indirect Light objects are automatically ignored while generating photon maps.
A bundle to specify what objects should be targeted for photon storage. This parameter should be used to optimize photon renders when you know that all photons must hit or pass through a specified object.
If your render does not show any photons and produces an error message indicating that photon generation was aborted, you may need to adjust the photon target parameter to focus photon generation on a particular object in the scene. This error can commonly occur when generating caustics from a small glass object in the presence of much larger objects defining its environment.
The photon map file to generate on disk. When rendering an animation, you should usually modify this value to include the frame number.
Photon filter to use. The default Convex Hull filter improves photon map quality in corners of the scene. You can improve render time slightly by switching to Sphere at the expense of accuracy.
When reading from the photon map, this is the number of photons to filter. When rendering with a prefiltered photon map, you should use a small number (generally from 1-10). When rendering non-prefiltered photon maps, you should use a large number (generally 50-500).
Photon Map Stores Direct Lighting
Store direct lighting in the photon map. When disabled, the photon map will only store indirect lighting - meaning that a full direct lighting computation is required in addition to a photon map lookup to compute lighting at a hit surface. In either case, the render should account for the same light paths. Normally you should leave this parameter unchanged.
When rendering caustic photon maps, this parameter is ignored.
Prefilter Photon Map
After photon map generation but before rendering, prefilter the photon map so that much fewer photon samples are required for rendering. Prefiltering can often take as long as the photon map generation process itself.
The number of photons to filter during prefiltering. This should normally be a large value (generally 50-500).
The ratio of photons to store in the prefiltered photon map to photons in the original non-prefiltered map. Prefiltering can often take several minutes for large photon maps. Using a ratio less than 1 can improve performance by only filtering the specified proportion of photons in the map while introducing only a small difference in render quality.
Enable Point Cloud
Use the photon map for direct lighting as if it were a geometry area light with point cloud generation enabled. This setting can help to reduce noise in renders using photon maps where the illumination is highly variable.
Note that after toggling this setting it’s necessary to regenerate photon maps since the content of the map will changes depending on this setting. Only prefiltered maps are supported.
This setting is currently experimental. In particular, it has the following limitations:
It requires a prefiltered photon map
It does not work correctly with volumes
Other indirect illumination will be completely disabled
The photon distance threshold does not have any effect (it’s assumed to be 0)
Indirect Diffuse Options
These sampling options apply when using the Irradiance Only or Indirect Global Photon Map mode with a non-PBR rendering engine. When rendering with PBR, you should instead use the sampling controls on the ROP to adjust the sampling quality for indirect diffuse lighting (such as the Pixel Samples or Min Ray Samples).
The number of rays to send out for irradiance. Ignored by PBR - use the Ray Samples or Pixel Samples to adjust quality in PBR.
Max Ray Distance
Maximum distance from the sample point to consider geometry for irradiance. Ignored by PBR.
Half-angle over which to send rays for irradiance. Ignored by PBR.
Photon Distance Threshold
This parameter is a quality/performance control that can be used when rendering global photon maps. When too few photons are present in a photon map, the distance between photons can be significantly larger than the distance that an indirect lighting ray travels - which would lead to artifacts in the render if the photon map were used to approximate illumination. This parameter indicates that when the indirect lighting ray travels a shorter distance than the distance between photons in the map, that the illumination should be computed directly (via path tracing) rather than using the photon map.
Larger values will favor more path tracing while smaller values will favor the use of the photon map. A value of 0 indicates that the photon map should always be used - potentially leading to artifacts in corners. Generally a value between 0 and 4 is reasonable, with a value of 4 eliminating the vast majority of artifacts in corners.
If your photon map contains very smooth illumination (for example, when using many filter samples), you can improve performance by decreasing this parameter to 0. If you photon map is poorly filtered, you can improve quality by increasing this parameter to a value larger than 1.
To visualize how much the photon map is contributing to the image relative to path tracing:
Configure your rendering engine to Physically Based Rendering.
indirect_diffusedeep raster and enable Export variable for each light.
Look at the deep raster plane for the indirect light and for your other lights. You should see that in corners of your geometry, the
indirect_diffusewill have a larger contribution than other lights. As you decrease the photon distance threshold to 0, the contents of
indirect_diffusefor lights other than the indirect light should drop to 0.
Turns on an automatic optimization that will reduce the number of samples when there is little variation in occlusion above the sample point. This can improve performance at the expense of some possible flickering or additional noise. Adaptive sampling will only take effect with more than 64 samples. Ignored by PBR - use variance antialiasing instead.
This example shows how to set up the indirectlight object for indirect diffuse lighting. The scene consists of a box that has been extruded several times, containing a light source and the camera. The light has been placed so that all light reaching the camera must bounce more than once inside the scene before reaching the camera. The indirectlight object is configured to generate 1000000 photons. To visualize the photon map, change the rendering mode on the light to "Direct Global Photon Map". To adjust the sampling quality, modify the pixel samples or ray samples on the mantra ROP. The rendering engine used in this example is PBR.
This example shows how to set up the indirectlight object for caustic photon map generation and also how light masks and photon targets should be used. The scene consists of a reflective tube and a point and environment light. Each light has a corresponding indirectlight to generate caustics, with the light mask configured to allow the light to generate photons only from the specified light. The photon target is used to ensure that photons are only sent toward the reflective tube. The mantra ROP will produce deep raster planes for the direct_diffuse component on a per-light basis, showing the diffuse illumination from the two lights and the caustics split into separate planes.