Creating a desktop shortcut for batch rendering


You can use scriptXSI.bat in %XSI_HOME%\Application\bin to create a desktop shortcut for batch rendering. When you drag and drop a scene file on that batch file, that starts a batch render.

To create a desktop shortcut, right-click scriptXSI.bat and click Send To > Desktop (create shortcut).

If you want to drag and drop multiple scenes:

  1. Copy scriptXSI.bat to your desktop.
  2. Edit the batch file and change it to this:
    @echo off
    call "C:\Program Files\Autodesk\Softimage 2011 Subscription Advantage Pack\Application\bin\setenv.bat"
    :next
    if "%1"=="" goto end
    set SCN=%1
    "C:\Program Files\Autodesk\Softimage 2011 Subscription Advantage Pack\Application\bin\XSIBatch.exe" -render %SCN%
    shift
    goto next
    :end
    

Importing SOFTIMAGE|3D HRC and DSC files


We still get the occasional support request about importing SOFTIMAGE|3D scenes (.dsc) and models (.hrc) into Softimage 2011.

The SOFTIMAGE|3D importer was removed in the Softimage 2011 release. From the What’s New section of the documentation:

SI3D Loader Is Gone

The SOFTIMAGE|3D importer, also known as the SI3D Loader, has been removed from Softimage. The workaround is to import your SOFTIMAGE|3D scene or model into Softimage as dotXSI (*.xsi).

As suggested in the documentation, you could use export dotXSI 3.0 from SOFTIMAGE|3D and then import that into Softimage 2011.

Or you could use 32-bit Softimage 2010, which includes the Import > SI|3D Scene/Model command. If you’re on Subscription, your Softimage 2011 license will run Softimage 2010, and you can download Softimage 2010 from the Subscription Center.

If you have a lot of hrc/dsc files to import, you can write a script to automate the process.
Here’s a relatively crude example (JScript):

var fso = new ActiveXObject( "Scripting.FileSystemObject" );

var sSourceDir = "C:\\Softimage\\SOFT3D_4.0\\3D\\rsrc\\";
var sTargetDir = "C:\\Documents and Settings\\blairs\\Local Settings\\Temp\\HRC\\Scenes\\";

var srcFolder = fso.GetFolder( sSourceDir );

var files = new Enumerator( srcFolder.files );
// Loop through files  

var re = /\.hrc$/;
for(; !files.atEnd(); files.moveNext() )
{
	var sName = files.item().Name;
		
	if ( sName.match(re) )
	{
		NewScene(null, null);
		
		//LogMessage( "Importing " + sSourceDir + sName );
		ImportFromSI3D( sSourceDir + sName, null, null);
		
		// Strip off the ".hrc"
		var sTmp = sName.substr(0,sName.lastIndexOf( "." ));
		
		//LogMessage( "Saving " + sTargetDir + sTmp + ".scn" );
		SaveSceneAs( sTargetDir + sTmp + ".scn" );
		
	}
}

Scripting the Transform panel buttons


The state of the buttons on the Transform panel are saved in the 3D_TRANSFO_REFERENTIAL_CHANGED preference, which is a bitfield.

So, for example, to enable the Ref manipulation mode, you would do this:

SetUserPref(
	"3D_TRANSFO_REFERENTIAL_CHANGED",
	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") | 3 );

This would turn on the Ref mode, and leave the COG, Prop, and Sym options untouched.

If you simply did this:

SetUserPref( "3D_TRANSFO_REFERENTIAL_CHANGED", 3 );

that would reset the COG and Sym options.

Turn on COG:

SetUserPref(
 	"3D_TRANSFO_REFERENTIAL_CHANGED",
 	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") | 16 );

Turn off COG:

SetUserPref(
 	"3D_TRANSFO_REFERENTIAL_CHANGED",
 	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") & ~16 );

Another example:

// Turn off all
SetUserPref( "3D_TRANSFO_REFERENTIAL_CHANGED", 0 );

// Turn on Local and COG
SetUserPref(
 	"3D_TRANSFO_REFERENTIAL_CHANGED",
 	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") | (16 | 2) );

You can use Alt+NumPad numbers to see what gets logged when the different buttons are selected.
The SDK documentation also includes a page for the Manipulation Mode Values.

Messing around with vertex colors


Using Get Nearby Points to average vertex colors

Here’s a screenshot of the ICE tree.
In the first branch, I get the vertex colors (via the NodeLocation attribute) of the nearby points, and store them in an attribute.

Then I get the saved vertex colors and do a simple Array Average on the RGB components, to give me a Color per Sample value that I can put back into the Color at Vertices (CAV) property.

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).

The support funnel


A company’s product support model can be visualized as a funnel.

For every N customers who need help, only a subset will require direct one-on-one support

  • At the top of the funnel is the self-service component, where you hope the majority of users can find their answers. Ideally, there’s a support portal that brings together documentation, KBs, FAQs, blogs, forums, videos, and tutorials, and provides an integrated search, and possibly some sort of interactive guided question-and-answer technology. In practice, most self-service sites are usually a loose collection of these different components, which rely on the user’s ability to define good search queries.
  • Next in the funnel are forums and user communities, where you can get help from other users and, in some cases, from staff who monitor the communities.
  • For a company like Autodesk, partners provide the next level of support (this is not so true for Softimage, but is true for most other Autodesk products).
  • Finally, at the narrow end of the funnel, is the one-to-one support provided by people like me, the “technical specialists” (I’m not sure why, but I loathe that title).

Now, the funnel analogy is not “correct” in the literal sense. In a real funnel, everything that comes in eventually flows through the bottom of the funnel. In the support funnel model, the number of customers decreases as you move down the funnel. A more accurate diagram of the support model would be a sankey diagram, which shows the proportionate number of customers served by each level of support:

Satellite rendering licensing


A recent drop of mental ray included a change to satellite licensing scheme.
Satellite licensing will be per machine, not per CPU. You’ll get four machines (instead of the current four CPUs).

Softimage 2011.5 (Subscription Advantage Pack) doesn’t have this particular drop, but you will see this change in subsequent releases.

ERROR : FATAL: DB 1.0 fatal 041500: interrupted by exception code 0xc0000005 (access violation)


‘ ERROR : FATAL: DB 1.0 fatal 041500: interrupted by exception code 0xc0000005 (access violation)

The exception code 0xc0000005 (access violation) indicates this is probably a memory access error. The software is trying to access a region of memory that it shouldn’t be accessing. In general, this could be a problem in the code (for example, a NULL pointer), faulty RAM, or even a bad device driver.

If you get this error with any scene (for example, with one of the sample scenes that ships with Softimage), then that may indicate the problem is specific to your computers. Or if you get the error only with a certain computer, that would indicate a possible problem with that one computer.

If you get this with just some scenes, then that points to a problem in the software (or perhaps the scene). It could be that something about the scene triggers certain conditions in the software, and the software then causes the error. In general, I would try breaking down the scene to try and isolate the root cause. It could be the overall complexity of the scene, or a specific element of the scene.

In one case I had recently, the user got this 0xc0000005 (access violation) error and then an endless series of bad message…0xbad0bad errors. We traced the access violation error back the number of different animated objects that were being instanced through ICE using assemblies.

Assemblies are used when an ICE trees use one of these compounds:

  • Set Instance Geometry
  • Set Particle Instance Animation Time
  • Control Instance Animation
  • Control Displacement Instance Animation

Using assemblies can be memory-intensive, so it appears that when you’ve got a lot of particles and a lot of animated instances of many objects, satellite rendering may fail with a memory access error (actually, the frame was rendered, but XSI was hung up after because of the errors).

Ref: Access Violation? How dare you …