Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Setting Traversal Thread Count

As RfK converts the Katana scene graph into the Rix scene graph for rendering it will do so in parallel, spawning new threads at location branches. The default is "all on" meaning it will fork on every child location in the scene which is unlikely to be ideal for most scenes but allows for deeper control by the author for control of parallelism. There are are varying levels of control which will take some adjustment to come up with a configuration that works with your pipeline and subsequently for individual scenes. 

  1. prmanGlobalSettings.plugin.traversalMethod: set to 'Serial' allows the parallel scene traversal to be disabled entirely.
  2. prmanGlobalSettings.plugin.maxTraversalThreads: this is the first place to start tuning. By default it is set to 4 but depending on your machine configuration and your scene layout you may get double or half the performance at this level. It is recommended to not set this to the TBB default of '0'.
  3. prmanSettings.traversal.forceSerial: fine-tuning for specific scenes. It is highly recommended to set this true at component or group levels such that the traversal does not try to parallelize down to the gprim level. Please see PrmanObjectStatements for more detail on location-level thread tuning.

Setting Render Thread Count

Currently there are three Currently there are four ways to set the number of render threads in RfK. The first three two will trigger a "-t:#" addition to the command line arguments for prman which, by RenderMan definition, will override any thread specification in the RIB (the fourth third option).

Ways to set thread count, in order of precedence:

  1. Katana preferences preferences: interactiveRenderThreadsOverride and interactiveRenderThreads3D (equivalent to the use of the "--threads3d" command line parameter in batch mode).
  2. Katana attribute: renderSettings.renderThreads.Katana attribute: prmanGlobalStatements.commandArguments.numThreadModeProcs. Deprecated
  3. PRMan option: prmanGlobalStatements.options.limits.threads.

How and where to set these values are detailed below.

Option 1:   interactiveRenderThread Preferences

Below is a screen capture of the preferences interactiveRenderThreadsOverride and interactiveRenderThreads3D (equivalent to the use of the "--threads3d" command line parameter in batch mode). If you want to definitively set the number of render threads this will be the place to do it. Set interactiveRenderThreadsOverride = Yes and set the value of interactiveRenderThreads3D to your desired threads:

Option 2: renderThreads Attribute

The attribute renderSettings.renderThreads must be set via AttributeSet or OpScript as it is not exposed in RenderSettings.  Below is an example of setting the attribute with an AttributSet node:

Option 3:

numThreadModeProcs Attribute

The numThreadsModeProcs attribute is set via the PrmanGlobalStatements node in the commandArguments section:

Image Removed

Option 4:

limits.threads prman Option

The prman option for limits.threads is set via the Options section of the PrmanGlobalStatements node:

This attribute translates literally to RIB:

Code Block
Option "limits" "int threads" [N]

As it is lowest in the precedence list, this thread option is overridden if either (1) preferences , or (2) render settings or (3) command arguments have a thread value enabled.

 

...