Integrating External Renderers
| This article provides a high-level overview of how to integrate another rendering system into XSI and assumes that you are using XSI version 4.2 up to version 5.11. For XSI 6.0 or later, please refer to the new Custom Renderer API instead.
|
- Implement a C++ graphics sequencer display pass
Implement a display pass that registers itself as a display mode. The display should have two operating modes -- fast render mode and file render mode -- that are detectable at runtime. For more details refer to the SDK guides: Graphics Sequencer (http://softimage.wiki.avid.com/sdkdocs/cus_graphicsequencer.htm)
- Implement the fast render mode as a C++ graphics sequencer OGL display callback
Implement the fast render mode as a display callback to be used in the OGL user and camera view when switching to this new mode.
- Choose your renderer as the render engine
The file render mode is the high quality mode to be used when you render a sequence from the render preview or render pass commands. Your renderer will show up as an entry under the render engine pulldown menu in the render options property editor.
For more details refer to the XSI guides: Choosing a Render Engine (http://softimage.wiki.avid.com/xsidocs/renderoptions.htm)
- Configure your own render options using custom preferences
You cannot extend the built-in render options but you can configure your own render options using custom preferences. Your custom preferences will be accessible from the explorer view: set the scope to Application and navigate to the Preferences > Custom folder.
For more details refer to the XSI guides: Creating Custom Preferences (http://softimage.wiki.avid.com/xsidocs/cusparams.htm)
- Define metashaders or create shaders from scratch
The metashader architecture is better suited to a workflow where you want to switch between renderers, for example, switching between CG and mental ray. But, if you have a completely different renderer, such as RenderMan, you would create new shaders from scratch.
Using the metashader architecture each existing shader (including XSI shaders) that you want to support will need to have a new metashader section defined. When the scene is rendered, the display pass will use your super realtime shader (using RenderSceneUsingMaterial() method). The realtime shader will scan the original object material and traverse the shader tree for each shader encountered then scan for the proper metashader data and interpret that data accordingly.
For more details refer to the SDK guides: mental ray Shaders (http://softimage.wiki.avid.com/sdkdocs/cus_mrshad.htm),MetaShaders (http://softimage.wiki.avid.com/sdkdocs/cus_metashad.htm), and Shader SPDL Reference (http://softimage.wiki.avid.com/sdkdocs/SPDL_Shader.htm)
If you are integrating a completely new renderer you will want to implement your own set of realtime shaders. You can choose to implement a monolithic shader (as used by vertex and pixels shaders) or hierarchial shader trees, this will depend on how your renderer works.
- Explore the XSI SDK's graphics sequencer and realtime shader examples
Refer to the DX9Display example shipped with the SDK. You can find it under:
%XSI_HOME%\XSISDK\examples\graphicsequencer\DX9Display
There's also a factory add-on with DirectX shaders you can access via Net View (Alt+5). Navigate to the XSI Local > Add-ons tab. Source for DirectX shaders can be found in the SDK folder under:
%XSI_HOME%\XSISDK\examples\realtimeshader\directx
XSIMan XSI to Renderman Plugin


