Setting Thread Count
Currently there are four ways to set the number of render threads in RfK. The first three 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 option).
Ways to set thread count, in order of precedence:
- Katana preferences interactiveRenderThreadsOverride and interactiveRenderThreads3D (equivalent to the use of the "
--threads3d" command line parameter in batch mode).
- Katana attribute: renderSettings.renderThreads.
- Katana attribute: prmanGlobalStatements.commandArguments.numThreadModeProcs.
- 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:
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:
As it is lowest in the precedence list, this thread option is overridden if either (1) preferences, (2) render settings or (3) command arguments have a thread value enabled.
In all cases, if a value of 0 (zero) is given to prman then all CPUs will be utilized for rendering. If a negative value (-N) is specified then prman will use all but N CPUs for rendering.