Houdini 11 Nodes Shader nodes

Replaces the object with the contents of a file at render time.

Rendering Geometry from Disk

Geometry from a surface operator is sent down for mantra when an IFD is created. Therefore, Houdini needs to have a copy of the geometry in memory at some point during the IFD generation. Additionally, Houdini needs to write all the data into the IFD stream, and mantra needs read all the data from the IFD stream. In most cases this is fine, since the geometry does not take up much memory and the cost of reading/writing the geometry is not too high.

However, there are cases where this process can be prohibitive. For example, when rendering extremely large geometry files. Forcing Houdini to load and save the geometry at every frame can by costly in both memory and time. This could also become a problem when performing network rendering (the H-option on mantra), as it can impact the memory footprint of the server mantra.

A way to alleviate render time and memory costs is to save the geometry files to disk and instruct mantra to load the geometry from disk. Mantra still has to read the geometry, but instead of having to process the embedded geometry it can load the geometry directly from the disk.

  1. In the SHOP network, create a Mantra: Delayed Load geometry shader.

  2. Set the File name on the Main tab of the shader to point to the disk geometry file.

  3. On the IFD Bounds tab of the Mantra: Delayed Load geometry shader, set the Bounding Box to No bounding box required.

  4. On the Geometry sub-tab of the Render tab of the object, point to your shader in the Procedural Shader field.

Note

Try to avoid using displacement shaders on delayed load instances. Displacement forces mantra to create separate geometry for each instance, decreasing the benefits of referencing. If you must use displacement, micropolygon rendering is better because the renderer can throw away the displaced geometry when it’s done rendering it (see understanding mantra).

Improving Efficiency

Setting the Bounding Box to No bounding box required will make mantra read the disk geometry regardless of whether the geometry ever gets rendered.

To improve efficiency, you can instruct mantra to only load the geometry only if it is rendered. If the geometry is occluded or off screen, mantra will not need to load the geometry which will make the renderer faster and use less memory.

There are two other options for the Bounding Box field on the IFD Bounds tab of the Mantra: Delayed Load geometry shader.

Explicit Bounds

Allows you to explicitly set bounding box boundaries in the Min Bounds and Max Bounds fields.

Specified By SOP’s Bounding Box

Uses the geometry’s bounding box. This option is useful when the bounding box of a sequence of disk files are animated.

Note

Instead of using a file SOP to load the full geometry for the disk files, use proxy geometry instead. This keeps Houdini’s memory footprint lower.

Motion Blur

This procedural only supports one segment of motion blur (2 geometry samples). You can specify the deformation geometry in the Blur File on the Main tab of the Mantra: Delayed Load geometry shader.

This procedural does not use the camera shutter time. It blurs from the original file to the blur file. Given a blur time of t, the blur is computed as:

P' = lerp(P0, P1, t * shutter)

Note

This procedural does not support velocity blur.

See the motion blur help for more information.

Parameters

Main

File

The geometry file.

Blur File

The deformation motion blur.

Material Archive

Allows you to apply materials in the archive without having the materials defined in the .hip file. These materials can be generated using the Mantra Archive render driver.

Shutter

Optionally, a shutter time can be specified when rendering motion blur. This value is multiplied by the camera’s shutter.

Share Geometry

If this checkbox is turned on, the loaded geometry will be shared amongst other instances of this procedural. This is useful when you have one piece of heavy geometry that is instanced many times. Instead of loading the geometry multiple times, mantra will load the geometry once and share the geometry amongst all procedurals. However, this means that mantra needs to hold onto the geometry for the duration of the render.

If this checkbox is turned off, mantra will load the geometry for the procedural on demand, and then free the geometry after the fact. This can have a large impact on the rendering footprint.

Note

Share Geometry must be turned on if you Use Velocity Motion Blur.

IFD Bounds

Bounding Box

The bounding box controls let you specify a bounding box for the referenced geometry. Only when this bounding box is “on screen” will mantra load the referenced geometry. You can set Bounding box to No bounding box required, in which case mantra will always load the references geometry regardless. You can also specify the bounding box by referencing the SOP’s bounding box in the SOP Bounds parameter.

SOP Bounds

The geometry whose bounding box you want to reference.

Min Bounds

The minimum bounding box dimensions, when setting explicit bounds.

Max Bounds

The maximum bounding box dimensions, when setting explicit bounds.

Note

This procedural requires a bounding box to be specified. When generating motion blurred geometry, the bounds must enclose the blurred geometry as well.