Overview
Houdini now communicates with renderers through the SOHO Python bindings. SOHO stands for Scripted Output of Houdini Objects. All renderers use the same process for parameter definition and evaluation. The Mantra and RenderMan output drivers are now simply front-ends to Python scripts (they are now digital assets). Each renderer can add its own parameter definitions and bindings using Python mappings.
SOHO provides two main benefits:
Easy to define new render output nodes for alternative renderers. SOHO provides the interface to interrogate Houdini for necessary information to output the renderer-specific file format.
You can customize generation of render output by creating a new render node and customizing the
soho_programparameter (see below). In some cases this may be more convenient or flexible for you than adding rendering properties to lights, cameras, and/or render nodes.
The SOHO interface is used to send geometry, object transforms, and rendering properties to a renderer. Each supported renderer has a set of predefined rendering properties. If an object has any of these properties defined as spare parameters, its value will be sent to the renderer.
There are a set of predefined rendering parameters which can be added to objects (or materials) using the “Edit Rendering Parameters” interface. There is a one to one mapping of these parameters from the Houdini interface to the renderer’s properties.
SOHO uses the new Material workflow to process shaders and rendering properties. For more information see the materials, properties, and property overrides help.
The SOHO renderer property default values correspond to the target renderer’s default values. If the property value is left at the default value, the property is generally not written out to the input stream for the renderer.
Note
Changing the default value is not recommended, since SOHO and the renderer will no longer be in agreement.
How it works
If you look at the type properties of the Mantra render output digital asset, you will see an invisible parameter called soho_program, which contains the Python script Houdini will run to write the output file (in the case of the Mantra driver, an IFD file).
The Python script will contain code like this:
value = obj.getDefaultedFloat('vm_displacebound', 0.0)
(or, more likely, batch evaluation of properties). When a SOHO program evaluates a parameter like this, it applies the property inheritance order so more specifically-defined properties (for example, on a shader) have priority over more broadly-defined properties (for example, on the output driver node).
The SOHO API and implementation are in Python scripts in $HFS/houdini/soho.
You can use the following parameters to control the SOHO generation process.
soho_program
| The Python script to run. In this script you | ||||||
soho_outputmode
| What to do with the printed output of the script.
| ||||||
soho_pipecmd
| When | ||||||
soho_diskfile
| When | ||||||
soho_foreground
| If true, blocks Houdini until the script completes. This is turned on automatically when rendering multiple frames to prevent all frames from rendering simultaneously. | ||||||
soho_initsim
| If true, Houdini initializes simulation nodes. This will cause all particle and dynamics networks to start cooking from the first frame to the current frame. This is used when you are controlling which frames to render (see | ||||||
soho_multiframe
| When off (the default), Houdini runs the script separately for every frame. If this parameter is on, the script is run once, and the script is responsible for rendering the frame range itself. |
How to show all available properties
echo ray_show device | mantra echo ray_show global | mantra echo ray_show object | mantra echo ray_show light | mantra echo ray_show image | mantra echo ray_show fog | mantra
Subtopics
| Patching SOHO |