Overview
You can include extra image planes (also called deep rasters) containing image representations of VEX (the mantra shading language) global variables, or exported variables/parameters from any surface or fog shader.
You can even output extra planes per light if you assign the exported variable inside an illuminance loop.
When rendering to a .pic (Houdini image format) or .exr (OpenEXR) format image (or the special ip name, which outputs to MPlay instead of a file) you can include the extra planes in the same multi-plane image as the main render. You can also specify that extra planes go into multiple separate files (or put multiple extra planes in a separate multi-plane file from the main render).
Examples
For example, you can export the value of the global variable N (surface normal) for each pixel to an image.
The rendered color plane: a torus lit from above.
| The
|
(You can view the extra plane(s) in MPlay using the popup menu in the top left under the toolbar.)
Another example: Houdini’s basic surface shader exports a variable named paintExport, containing the shader’s color contribution before lighting. This can be very useful information to have during compositing.
The rendered color plane: a torus lit from various angles, with point colors.
| The
|
How to
| To... | Do this |
|---|---|
| Set up a render node to export an extra plane |
|
| Output a global variable |
|
| Output a shader variable |
|
| Output a variable per-light | Set Light Exports to Export variable for each light on the render node and it will create the proper per light outputs. Note If you only want one light, you can set Solo Light to the desired light in the Objects tab of the mantra output driver. |
Parameters
| Extra Image Planes | Any number of extra image planes may be generated simultaneously. If the primary output image format supports multiple image planes, the plane name will be used to define the name of the deep raster plane. If the primary output device does not support multiple image planes, each image plane will be output to an individual file, with the name of the plane defining the file name. The formats that support multiple image planes are OpenEXR and Houdini .pic (including the “ip” device).
Note For each light the deep raster plane name is prefixed with a mangled version of the path to the light. This can be specified manually by adding the rendering parameter Export Plane Prefix to the light sources. You can set the export prefix to an empty string on the output driver if you are generating deep rasters for a single light source in all cases. This will eliminate the prefix for all light sources. |
Intrinsic Deep Rasters
The following are deep raster planes that you can specify to get additional intrinsic information.
Note
They are in the defaults menu for deep raster planes, along with the PBR planes.
| Name | Type | Description |
| Render_Time | Float | Outputs the number of seconds spent rendering the tile as a floating point value. |
| Op_Id | Float | Output the object identifier as a floating point value. This plane will store the value specified by the “object:id” object-level setting, or if this setting was not specified, it will store a unique identifier for the object covered by the pixel. Pixels with a value of -1 are not covered by any objects. |
| Prim_Id | Float | Output the primitive identifier as a floating point value. This plane will store the geometry primitive number as can be queried in SOPs. Pixels with a value of -1 are not covered by any primitives. |
| Shading_Samples | Float | Output the number of transparent samples shaded per pixel sample. This value is useful for debugging volume and sprite renders to determine how much processing time is spent shading transparent samples. |
| Opacity_Samples | Float | Output the number of opacity samples shaded per pixel sample. This deep raster is only non-zero for renders using stochastic transparency, and is useful to debug the amount of processing time that is spend evaluating opacities before allocating shading samples. Using a larger volume step size in volume renders will decrease the number of opacity samples, improving performance. |
PBR Deep Raster Exports
The default PBR shader supports a number of export variables. The table below shows the VEX variable name and type so that you can correctly configure deep raster outputs to reference these values.
Note
Exports available as a light export can be exported either on a per-light basis or as a combination for all lights. To specify a per-light value, supply 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, though you should name the deep raster planes differently.
| VEX Variable Name | Type | Light Export Available | Description |
direct_diffuse | vector | yes | Direct lighting, diffuse component. |
direct_glossy | vector | yes | Direct lighting, glossy component. |
direct_specular | vector | yes | Direct lighting, specular component. |
direct_caustic | vector | no | Direct caustics. |
direct_emission | vector | no | Direct emission. |
indirect_diffuse | vector | yes | Indirect lighting, diffuse component. |
indirect_glossy | vector | yes | Indirect lighting, glossy component. |
indirect_specular | vector | yes | Indirect lighting, specular component. |
indirect_caustic | vector | no | Indirect caustics. |
indirect_emission | vector | no | Indirect emission. |
all_diffuse | vector | yes | All diffuse lighting. |
all_glossy | vector | yes | All glossy lighting. |
all_specular | vector | yes | All specular lighting. |
all_caustic | vector | no | All caustic lighting. |
all_emission | vector | no | All emission lighting. |
direct | vector | yes | All direct lighting. |
indirect | vector | yes | All indirect lighting. |
level | float | no | Average pathtracing depth for a pixel. |
diffuselevel | float | no | Average diffuse pathtracing depth for a pixel. |
glossylevel | float | no | Average glossy pathtracing depth for a pixel. |



