Page tree

Versions Compared

Key

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

...

Elements and Properties

Args files were originally created as a way of providing UI hinting for shaders in Katana. PRMan has since adopted and extended this format. Katana's set of elements, parameters and tags are described in detail in the Katana documentation and in the Args File UI Hinting document. Below is a summary of the most commonly used components for the built-in PRMan shaders. Portions that have been adopted specifically for PRMan and RenderMan for Katana and Maya are noted.

 

Parameter Definition

Details about each param element can be specified using the following properties:

Parameter Properties
PropertyDescriptionRequirementOrigin
nameSpecifies the exact shader parameter.RequiredKatana
labelString to display in the UI for the parameter. If no label is specified the name of the parameter is used.OptionalKatana
typeThe parameter type. Recognized types are: floatintstringcolornormalpointmatrix,  shader, vectorstruct, and  bxdf, lightfilter, displayfilter, and samplefilter.Required for plugin shaders in RfM.PRMan extension
default

Specifies default parameter value.  For color, point, normal, and vector, three values are required.  For array size > 1, default values are separated by space.  Examples:

type = "float" default = "5.0".

type = "color"", default="0.18 0.18 0.18"

type = "normal" default="0 0 0"

type = "float" arraySize = "5"  default =  "15.0 25.0 8.0 5.0 40.0"

type = "color" arraySize = "2" default = "0.18 0.18 0.18 0.18 0.18 0.18"

For dynamic array, since the array size is unknown, specifying the default values will not work.

Required for plugin shadersKatana
arraySize

Specify the array size. Default values are separated by spaces.

<param name="resolution" type="float"
       arraySize="2" default="1024 1024"/>
OptionalKatana
isDynamicArray

Set to "1" if the parameter is a dynamic array.  Note that default for dynamic array must not be specified.

<param name="layers" isDynamicArray="1"
       arraySize="-1" widget="dynamicArray"/>
OptionalKatana
widgetThe widget property specifies which user interface widget should used for a parameter. If no widget type is defined the widget will default to a numeric type. The standard widget types are defined below.OptionalKatana

The following table is a list of the commonly used widget types for RfM and RfK. There are several other widget types defined by Katana which are recognized by RfK but they are not currently recognized by RfM. The table includes a list of commonly-used hints for each widget types. Please see Args File UI Hinting for detailed explanations of these and other available hints.

List of Common Widget Types
Widget TypeTag NameDescriptionCommon Hints
Defaultdefault or noneEach parameter type has a default widget type. If the widget type is not specified in the args file it will be determined by the shader parameter data type.None
NumericintDefault widget used for numeric parameter types. Common hints are listed below.min, max, sensitivity, int slider, slidermin, slidermax
StringstringDefault widget for string parameters.replaceRegex, replaceWith
BooleanbooleanA dropdown list with "Yes" and "No" options.None
Check BoxcheckBoxBoolean parameter displayed as a check box rather than a pop-up.None
Popup/SelectorpopupA pop-up menu or combo box with literal choices for paramter values.options, editable
Mapping PopupmapperA pop-up menu with associative choices. Each value has an associated display value.options, hintdict
ColorcolorA color parameter where a color picker will be available to pick a color. Note that in Katana, the color picked will return a linearized RGB value.None
File InputfileInputA file parameter where a file browser icon will be available to pick a file.typefilter, presets, fileType. In addition RfM supports the options="texture" option for automatically running txmake.
Null/HiddennullHide the parameter from the user interface.None
Float RampfloatRampFloat ramp editor. Require_Knots, _Floats, and _Interpolation for the parameter.  See example below.None
Color RampcolorRampColor ramp editor.  Require _Knots, _Colors, and _Interpolation for the parameter.  See example below.None
Asset InputassetIdInputAn asset browser for selecting an input.   Use with options="texture".  See example below.None

 

Widget Type Examples

Code Block
languagexml
<param name="diffuseColor" widget="default"/>

<param name="channel" type="string" widget="popup" options="R|G|B|A"/>

<param name="stops" label="Stops" type="float"
       default="0.0" min="-10" max="10"
       slider="True" slidermin="-4" slidermax="4"
       widget="float">

<param name="atlasStyle" type="int" default="0" widget="mapper">
    <hintdict name="options">
        <string name="None"   value="0"/>
        <string name="MARI"   value="1"/>
        <string name="Mudbox" value="2"/>
    </hintdict>
</param>

<param name="filename"
       label="Filename"
       type="string"
       default=""
       widget="assetIdInput"
       options="texture"
       connectable="False">
</param>

<page name="Color Ramp" open="False">
        <param name="colorRamp"
               label="Color Ramp"
               type="int" widget="colorRamp" default="4"
               colorBarHeight="25" restrictComponents="True">
        </param>
        <param name="colorRamp_Knots"
               type="float"
               widget="null"
               default="0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1" arraySize="16"/>
        <param name="colorRamp_Colors"
               type="color"
               widget="null"
               default="1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" 
               arraySize="16"/>
        <param name="colorRamp_Interpolation"
               type="string"
               default="linear"
               widget="null" options="linear|catmull-rom|bspline|constant"/>
 </page>

<page name="Falloff" open="False">
        <param name="falloff"
               label="Fall Off"
               type="int" widget="floatRamp" default="6"
               connectable="False"
               bgColor="0.25 0.25 0.25" underSplineColor="0.5 0.5 0.5">
            <help>falloff: Controls the transition from the core to the edge.</help>
        </param>
        <param name="falloff_Knots"
               type="float"
               widget="null"
               default="0 0 0.3 0.7 1 1 1 1 1 1 1 1 1 1 1 1" 
               arraySize="16"/>
        <param name="falloff_Floats"
               type="float"
               widget="null"
               default="0 0 0.2 0.8 1 1 1 1 1 1 1 1 1 1 1 1" 
               arraySize="16"/>
        <param name="falloff_Interpolation"
               type="string"
               default="bspline"
               widget="null" options="linear|catmull-rom|bspline|constant"/>
</page>

 

 

...