Realtime Shaders in Softimage

Realtime shaders are a fully integrated set of Softimage shaders that allow you to build and control the realtime rendering pipeline, using the render tree. You can connect these shaders together to achieve a multitude of sophisticated rendering effects, from basic surface shading to complex texture blending and reflection.

Realtime shaders are designed primarily for games and interactive media development. Using realtime shaders allows artists to apply in-game shading and effects to characters and environments from directly within the Softimage interface, without having to involve developers. There are two sets of factory shaders that are provided with Softimage, which are designed to operate with an OpenGL or DirectX display.

Although realtime shaders cannot be connected to Softimage’s mental ray shaders, they are designed to have the same workflow. You connect realtime shaders together in the render tree, where realtime shader trees plug into the material node’s realtime input. Realtime shaders also support animation, scripting, expressions, and parameter linking.

Supporting 64-bit Platforms

To to support 64-bit platforms, realtime shaders must use the #pragma pack directive to remove padding between the fields of PPG structures:

#pragma pack(push, 1)
// PPG structures...
#pragma pack(pop)

 

If you have in-house shaders compiled with the Realtime Shader v2.0 architecture under Win64 (compiled against Autodesk Softimage v6.0 Win64), you must recompile your shaders using either Realtime Shader v3.0 or the Realtime Shader v2.0 Compatibility Shader Structures shipped with the v7.5 SDK (see the %XSI_HOME%\XSISDK\examples\realtimeshader\CompatibilityShader folder).

For Win32, Realtime Shader v2.0 shaders will run automatically without the need to recompile.

 

Viewing Realtime Shading effects in Softimage

To see your OpenGL based realtime shader effects, set any viewport to the OpenGL display mode, which uses the OpenGLŪ API to provide direct realtime shader support.

• To see your DirectX based realtime shader effects, set any viewport to the DirectX9 display mode.

Once a realtime shader tree is connected to an object’s material node, you’ll get instant feedback of shader effects in any realtime shaded viewport.

 

OpenGL based shaders are not compatible with DirectX based shaders and vice-versa. OpenGL based shaders have no visible effect in a DirectX9 viewport and DirectX based shaders have no visible effect in an OpenGL viewport.

Realtime Shaders vs. mental ray Shaders

Though you work with mental ray and realtime shaders in much the same way, they are not compatible with one another. They do, however, coexist peacefully when applied to the same object. Here are some important things to remember when using realtime shaders and mental ray shaders in the same scene.

• You’ll notice that there are no connection icons for parameters in realtime shader property editors. Unlike mental ray shaders, you can connect realtime shaders only in the render tree.

• Both types of shaders are visible in the render tree. The realtime shader tree plugs into the material node’s realtime input, while the mental ray shader tree can use any of the other material node ports. Image clip nodes are shared between both types of shader when they use the same images.

• Realtime shader effects are visible in any viewport that is set to Realtime Shader display mode. Mental ray shaders are visible in any viewports that are set to Textured or Textured Decal mode, as well as in the render region.

• Drawing a render region in any viewport set to Realtime Shaders display mode displays the mental ray shaders’ output.

• In Realtime Shaders display mode, any objects that don’t use realtime shaders are displayed as they would be in a Textured display mode.

A Note about Graphics Cards

The extent to which you can use realtime shaders depends the graphics card and/or drivers on your machine.

For a list of graphics cards that are certified for use with Softimage, see the Hardware Certification pages of the Partners section at www.softimage.com

Backward Compatibility

Autodesk Softimage does not support binary compatibility with Realtime Shader version 1.0 (used in Autodesk Softimage version 3.5 or previous). However, the shader parameters that are persisted in old scenes will be preserved. You can ensure backward compatibility by porting shaders to the Realtime Shader v3.0 API.

Autodesk Softimage v7.5 is fully compatible with Realtime Shader v2.0 API. However, geometry is always passed to realtime shaders as flat index arrays regardless of the type of geometry (meshes vs. NURBS) or whether they use subdivision.

For Win64 shaders, you must either recompile using the Realtime Shader v3.0 API or use the Realtime Shader v2.0 Compatibility Shader Structures shipped with the 7.0 SDK (see the CompatibilityShader project in%XSI_HOME%\XSISDK\examples\realtimeshader\CompatibilityShader folder). All Realtime Shader v2.0 structures are in the XSI_rtshaders_RTS2.h file.

 

To achieve maximum speed and memory use, it is recommended to recompile shaders with the Realtime Shader v3.0 API so that Softimage does not have to create and maintain internal data structures to ensure backward compatibility.



Autodesk Softimage v7.5