Args Files for Procedurals¶
Similar to the use in shader interfaces, UI hints can be defined for renderer
procedurals. RendererProceduralArgs nodes look for an Args File
called proceduralName.so.args in the same directory as the
.so for the selected procedural.
Here’s an example of a procedural.so.args file:
<args format="1.0" outputStyle="scenegraphAttr">
<float name='color' size='3' default='1,0,0' widget='color'/>
<float name='radius' default='1'/>
</args>
Note
For procedurals, the type and default value of a parameter have to be declared. This is in contrast to the use of Args Files for Shaders where the type can be interrogated directly from the shader.
Output Style¶
The choice of outputStyle controls how Katana declares procedural arguments
to the renderer. We show the resulting RenderMan .rib and Arnold .ass
generation to illustrate the differences. The following styles are available:
typedArgumentsSerializes arguments into multiple typed arguments. This is the default if
outputStyleis not specified.In RenderMan:
Procedural "DynamicLoad2" "MyProc" "float[3] color" [0 1 0] "float radius" [0]
In Arnold:
procedural { name MyProc declare color constant ARRAY FLOAT color 3 1 FLOAT 0 1 0 declare radius constant FLOAT radius 0.9 }classicSerializes arguments into a single string.
In RenderMan:
Procedural "DynamicLoad" ["/path/to/proc.so" "-color 0 1 0 -radius 0.9"]
In Arnold:
procedural { name MyProc dso "/path/to/proc.so" data "-color 0 1 0 -radius 0.9" }scenegraphAttr- Serializes arguments to XML, then passes the XML string as a single string argument.