The main purpose of the Shader Definition Wizard is to generate the code required for defining and implementing hardware shaders
(C++ realtime shaders) into Softimage. The Shader Definition Wizard provides the basic code structure for integrating a shader
in no time.
The basic definition code for mental ray shaders can also be generated with the Shader Definition Wizard. However, the wizard
doesn't generate the mental ray callback code — the mental ray Shader Wizard is more appropriate for that task.
Displaying the Shader Definition Wizard
-
Choose .
-
Click .
-
Choose to open the wizard.
Plug-in
|
Name of the plug-in file to generate. The plug-in will contain the necessary code for creating the shader definition. The
name is also used for setting the plug-in object name and for specifying the default hardware shader .vcproj file.
|
|
Name of the author creating the shader plug-in.
|
|
The language used for creating the shader definition plug-in. The following languages are supported: Python, C++, JScript,
VBScript.
Note that the language doesn't affect the shader implementation code which is always generated in C++.
|
|
The directory name where all files are generated. The default is the current user directory.
|
Definition
This is where the shader definition and renderer information is specified. For convenience, preset buttons can be used to
quickly setup the wizard for generating hardware and Mental ray shader code.
Hardware Shader Preset
Click to set up the wizard with mandatory information required for generating the renderer registration and hardware shader callbacks.
The mandatory setting for hardware shaders are:
ImportantIf the above information is missing or not properly set, the generated hardware shader may not work properly.
NoteThe plug-in name as code path is optional and can be replaced with any name.
Mental Ray Shader Preset
Click to set up the wizard with mandatory information required for generating the renderer registration for mental ray shaders.
These settings are the following:
-
Mental Ray
-
{LIBS}/xsibase.{EXT}
Notexsibase is not mandatory and can be replaced with any other mental ray shaders.
Shader
|
The shader name which uniquely identifies the shader in Softimage.
|
|
The shader major version number.
|
|
The shader minor version number.
|
|
The shader family type.
|
Category
|
The shader category name. This category is used to identify the where the shader is listed in the preset manager.
|
|
The UI name used to identify the shader in the render tree.
|
|
This name is used for identifying a user-defined attribute.
|
|
The attribute value for a user-defined shader attribute.
|
Renderer
|
The name of the renderer associated to the shader. Available renderers are: OpenGL, DirectX, and Mental Ray. Hardware shaders
are typically set with OpenGL or DirectX.
|
|
User-defined name used to map a shader with its renderer.
|
|
The name of the shader library for this renderer. For hardware shaders, the name is used for the shader library file name
to generate. For mental ray shaders, the name refers to an existing mental ray library.
|
Options
|
User-defined option name for the renderer.
|
|
Value set for a given renderer option.
|
|
Add a new renderer option entry in the renderer option grid.
|
|
Remove a selected entry from the renderer option grid.
|
Parameters
This tab is used for setting the input and output parameters for the new shader definition.
Input Parameters
|
The name of the parameter.
|
|
The parameter's data type.
|
|
The description of the parameter which is used as a tool tip in the render tree.
|
|
Set the parameter as animatable.
|
|
Set the parameter as inspectable.
|
|
Set the parameter as texturable.
|
|
The parameter's default value. The default value is only enabled for the following parameter types:
-
siShaderDataTypeBoolean
-
siShaderDataTypeInteger
-
siShaderDataTypeScalar
|
|
Min and max value range for the parameter.
|
|
Min and max UI slider values for the parameter.
|
|
User-defined attribute for this parameter. The new attribute can also be chosen from a built-in list of attribute names.
|
|
The value associated to a given parameter attribute.
|
|
Adds a new parameter entry to the parameter grid with the above values.
|
|
Remove the selected parameter from the parameter grid.
|
Output Parameters
|
The name of the parameter.
|
|
The parameter's data type.
|
|
The description of the parameter which is used as a tool tip.
|
|
Identify the parameter as the main output parameter.
|
|
The value associated to a given parameter attribute.
|
|
Add a new parameter entry to the parameter grid with the above values.
|
|
Remove the selected parameter from the parameter grid.
|
Generate Code
Click to generate the code based on the wizard settings. The new shader entry will show up in the render tree automatically. Hardware
shaders must be compiled first in order to be usable from the render tree.
The wizard generates the plug-in registration code for the shader definition and renderer. The following files are generated:
-
shader definition plugin-in file
-
plug-in .vcproj file (C++ only)
-
hardware shader C++ file (for hardware shaders only)
-
hardware shader .vcproj (or GNUMakefile for Linux)
For hardware shaders, if you choose a scripting language for the shader definition plug-in code, the wizard will generate
a separate .vcproj file for the hardware shader C++ file. However, if you choose C++ as the plug-in language, the hardware
shader C++ file will be added to the plug-in .vcproj file and no separate .vcproj will be generated for the hardware shader.
The .vcproj output setting is set to the standard plug-in location:
<user folder>\Application\Plugins\bin\<platform folder>
For example:
C:\Users\fred\Autodesk\Softimage_2011\Application\Plugins\bin\nt-x86-64
The list of callbacks generated for the shader definition is:
The list of callbacks generated for the hardware shaders is:
-
<Symbol Name>_<Major version>_<Minor version>_<Renderer name>_Init
-
<Symbol Name>_<Major version>_<Minor version>_<Renderer name>_Execute
-
<Symbol Name>_<Major version>_<Minor version>_<Renderer name>_Term
-
<Symbol Name>_<Major version>_<Minor version>_<Renderer name>_GetAttributeList
Some examples:
NoteThere is no shader callback code generated for Mental ray shaders.