Using the Modulo node


The Modulo operation gives the remainder after division. For example, 14 modulo 12 gives you 2, because 12 goes into 14 once, with 2 left over.

You can use the Modulo node to generate a sequence of numbers that continually wraps around. For example, the sequence 0,1,2,0,1,2,0,1,2,… is the result of applying “modulo by 3” to the sequence 0,1,2,3,4,5,6,7,8,…

0 = 0 modulo by 3
1 = 1 modulo by 3
2 = 2 modulo by 3
0 = 3 modulo by 3
1 = 4 modulo by 3
2 = 5 modulo by 3
0 = 6 modulo by 3

In an ICE tree, you could use Modulo to sequentially assign instances from a group:

Modulo_InstanceShape1

You could also use Modulo to do something to every Nth particle. For example, in the “modulo by 3” sequence “0,1,2,0,1,2,0,1,2,…”, note that every third number is a “2”. So if you wanted to do something to every third particle, you would set up this ICE tree:

Modulo_Every3rd

Modulo arithmetic is sometimes called “clock arithmetic”. Consider that when you add 5 hours to 9am, you end up with 2pm, which is an example of modulo 12 arithmetic:

9:00 + 5 hours = 2:00
9 + 5 = 2
2 = 14 modulo by 12 (12 goes into 14 once, with 2 left over)

Here’s some visual displays of modular arithmetic.

Fixes in Softimage 2010 SP1


Here’s a summary of what’s in SP1:

  • Face Robot on Linux Face Robot now works on Linux! As well, many fixes have been made to Face Robot.
  • Crosswalk 4.1 Softimage 2010 SP1 ships with Crosswalk v.4.1. The main purpose of the Crosswalk update is to support the Softimage Face Robot plug-in on Linux 64-bit systems. There were also a few other important fixes thrown in for good measure.
  • Particle Volume Shader Many fixes have been made to the Particle Volume shader. Note that this also affects the Particle Renderer shader compound which uses this shader.
  • Hair Many fixes have been made to hair on Linux.

For the full list of fixes in SP1, see the readme.

Softimage 2010 SP1 is now available


To all Softimage 2010 customers.

Softimage 2010 SP1 is complete, separate installation. You don’t have to remove Softimage 2010 first.
SP1 will install in its own folder, and create its own User location.

SP1 runs using your existing 2010 license.

If you have a network license:
When you install 2010 SP1, enter the product key 591B1 and the serial number 000-00000000.

If you have a standalone license:
When you install 2010 SP1, enter the product key 590B1 and your 2010 serial number.

Using WScript.Shell to get environment variables


The docs say that XSIUtils.Environment gets system environment variables, but I think it is more accurate to say that it returns env vars of the XSI.exe process.

WScript.Shell is another way to get at the environment variables. The WshShell object’s Environment property is a collection of environment variables. For example, this snippet shows how to create a WScript.Shell object, and then check the value of the TEMP environment variable. Note that XSI.exe creates its own folder under the location pointed to by the User TEMP environment variable.

// Get WshShell object.
var oWshShell = new ActiveXObject ("WScript.Shell");

var oEnv = oWshShell.Environment("Process");
LogMessage( oEnv("TEMP") );

// INFO : C:\Users\blairs\AppData\Local\Temp\XSI_Temp_17480

var oEnv = oWshShell.Environment("User");
LogMessage( oEnv("TEMP") );
LogMessage( oWshShell.ExpandEnvironmentStrings("%USERPROFILE%") );

// INFO : %USERPROFILE%\AppData\Local\Temp
// INFO : C:\Users\blairs

You can also loop over the collection:

var oEnv = oWshShell.Environment("System");
logenv( oEnv );

function logenv( o )
{
	oEnum = new Enumerator( o ) ;
	for (;!oEnum.atEnd();oEnum.moveNext() )
	{
		var oSelItem = oEnum.item() ;
		LogMessage( oSelItem  );
	}
}

Using XSICollections to check for character key sets


The IsCharacterKeySet parameter is not [directly] exposed through the Object Model, so you can’t get at the parameter through the Parameters or even NestedObjects. Instead, you can access the IsCharacterKeySet parameter with the GetValue and SetValue commands.

XSICollection does, however, provide an Object Model way to get at the parameter:

LogMessage( isCharKeySet( Selection(0) ) );

function isCharKeySet( o )
{
	var oColl = new ActiveXObject( "XSI.Collection" );
	oColl.items = o.FullName + ".IsCharacterKeySet";
	return ( oColl(0) != null && oColl(0).Value == true );
}

Face Robot workflow tips for combining heads with bodies


Courtesy of Mr Jeff Wilson, some tips on attaching Face Robot heads to characters:

“There are a few ways to go about it, depending on the pipeline that you are in.

If you just want to get the end result from Face Robot onto your character and are rendering frames, then the simplest way is to cache the face meshes from FR and bring those caches into your scene file containing the skeleton. This is the most accurate method for getting the animation across. FR ships with Point Oven, but we always used the KP_PointCache plugins from Kai Wolter in production. Kai’s tools write to the PC2 format which both Max and Maya understand. And they are free.

Continue reading

LMTOOLS ignores license path environment variables


Actually, no, it doesn’t. Not by default.

You should select the LMTOOLS ignores license path environment variables check box (it’s on the Service/License File tab of LMTOOLS). This prevents LMTOOLS from reading license server information from the ADSKFLEX_LICENSE_FILE key in the registry.

Letting LMTOOLS read license info from the environment can cause a number of problems:

  • LMTOOLS may spend time trying to connect to license servers that no longer exist.
  • Perform Status Enquiry may show errors that refer to some obsolete software you haven’t used in years (but which used some version of FlexLM).
  • Stop Server may stop more than your local license server. It may also stop any server listed in the registry (like, say, the central license server for the whole company).