Finding shaders


Before Softimage 2011, we used to use FindObjects() with a shader CLSID to find all instances of a shader. But as of Softimage 2011, all shaders have the same CLSID, so you have to use the ProgID to find all instances of a certain type of shader.

// Find all Color_correction shader nodes

var sProgID = "Softimage.sib_color_correction.1.0"

var oShaderDef = Application.GetShaderDef( sProgID ) ;
oEnum = new Enumerator( oShaderDef.ShaderInstances ) ;
for (;!oEnum.atEnd();oEnum.moveNext() )
{
	var oShaderInstance = oEnum.item() ;
	LogMessage( oShaderInstance.fullname );
}

You can find the ProgID of a shader using the SDK Explorer:

Developing with ICE


Personally, whether it is ICE or scripting or C++, I’ll focus on specific pieces of the puzzle before I put everything together.
For example, for a simple bulge effect in ICE, I started by making sure I knew how to get the distance between a null and a mesh, and provide some sort of distance fall-off.

As has been noted by many others in many other [more detailed] videos, ICE is pretty good at giving you ways to visualize and debug:

In this case, to help me visualize how many points would be “bulged”, I just had show some vectors:

Simple bulge


After a little fiddling around, I patched together a simple bulge operator with ICE:

Here’s the ICE tree, which is in the Modeling stack on the torus.
Right now, this works properly only when the torus is at the global origin (because Get Point Position returns local coordinates).