Here’s a little ICE modeling example that chains together a few basic polygon operations:

And here’s the same thing, but with no ICE:

Another look at IsElement problems
I’ve had some problems with IsElement lately, so I took another look at how to work around problems with IsElement, especially when you’re using it with ICE topology. Also, a quick look under the covers at the connections in the construction stack (aka operator history).
Here’s the script I was using to print the connection stack info:
#
# This script works in 2013 SP1 only because it uses sipyutils
#
from sipyutils import si # win32com.client.Dispatch('XSI.Application')
from sipyutils import siut # win32com.client.Dispatch('XSI.Utils')
from sipyutils import siui # win32com.client.Dispatch('XSI.UIToolkit')
from sipyutils import simath # win32com.client.Dispatch('XSI.Math')
from sipyutils import log # LogMessage
from sipyutils import disp # win32com.client.Dispatch
from sipyutils import C # win32com.client.constants
si=si()
siut =siut()
sisel = si.Selection
from xml.etree import ElementTree as ET
prim = sisel(0).ActivePrimitive if si.ClassName(sisel(0)) == 'X3DObject' else sisel(0)
stackInfo = siut.DataRepository.GetConnectionStackInfo( prim )
#log( stackInfo )
connections = ET.XML(stackInfo)
currentMarker =''
print "Connections for %s" % prim.FullName
for connection in connections:
o = connection.find('object').text
if o == currentMarker:
continue
if o.endswith('marker'):
currentMarker = o
print "%s (%s)" % (connection.find('object').text, connection.find('type').text)
The case of Error 2000 Failed creating scripting engine XSI.SIPython.1
The guy sitting next to me kept getting this Python error at startup (which meant I had to either fix his install or continue taking all the CrowdFX cases 😉
' ERROR : 2000 - Failed creating scripting engine: XSI.SIPython.1. ' pythoncom error: PythonCOM Server - The 'win32com.server.policy' module could not be loaded. ' <type 'exceptions.ImportError'>: No module named win32com.server.policy ' pythoncom error: CPyFactory::CreateInstance failed to create instance. (80004005)
This happened only with the Python installed with Softimage. We did runonce.bat. We checked that Python was in the PATH. I scoured a Process Monitor log for several hours. But no luck. After a few days off, I came back and took another look at his Process Monitor log, and I noticed that at a certain point, Softimage switched over to reading files from the system Python install (in C:\Python26). And that was the clue.
It turns out that the environment variable PYTHONHOME was set to C:\Python26. Unsetting that environment variable was the solution.
Setting PYTHONPATH to C:\Python26 also causes the same error.
Lip synching
Screenshots of the week
Freeze ICE Tree to geometry
by Vincent Ullmann


example of Creating Mesh-Copies based on a PointCloud
by Vincent Ullmann

get data from back in time
by owei

Create Asteroids #1
by owei

Create Asteroids #2
by ChrB


Create Asteroids #3
by owei

Blending displacement using raylength
by Rob Chapman

by Rob Chapman

Friday Flashback #82
Bullet Rigid Body Simulation with States
Softimage 2013 SP1 included a fix for a problem (aka a crash) with the Simulate Bullet Rigid Bodies nodes and states.
So, when a customer asked us how to do a two-part simulation, I gave Bullet + States a try. In the first part, the objects drop onto an obstacle, and in the second part, another obstacle comes along and pushes some of the objects away. Like this:
Here’s the ICE tree. I used Test Current Frame to trigger the state change. I did try some other triggers, like Test Particle Velocity and Test Particle Size, but I got some weird results with those triggers. By weird, I mean things like some, but not all, of the small cylinders being pushed away, even though they were still in the first state.
The idea here is to push just the big cubes. I make all the little cubes passive, so they get left behind.
Understanding backwards and forwards compatibility
You say backwards, I say forwards…
Backward compatible and forward compatible have specific meanings in the software world, but in collequial/conversational usage, the meanings are usually reversed.
For example, customers never ask me
Is Softimage 2012 forward compatible with Softimage 2013?
Rather, they ask me
Is Softimage 2013 backward compatible with 2012?
What the customer usually wants to know is can 2012 load a scene saved by 2013?
But that’s not backwards compatiblity, that’s forwards compatibility 😉
- Forwards compatibility = ability of older versions to load data saved by newer versions.
Softimage is not forwards compatible: it cannot load files from newer versions of Softimage
- Backwards compatibilty = ability of the new versions to load data saved by older versions.
Softimage is backwards compatible: it can load scene files [and models] saved by older versions of Softimage
In general:
- Newer versions of Softimage can load scenes and models created by older versions.
- Older versions Softimage cannot load scenes and models created by newer versions.
- Newer versions of Softimage can load plugins compiled with older versions
Resizing polygons with ICE
Getting a list of all shaders in a render tree
Here’s a Python snippet that gets all the shaders in the render tree for a specific material. As usual, I always feel that my Python snippet could be made more pythonic; for now, this will have to do…
PS The Shader reference page has a VBScript example, but that doesn’t work anymore because it was written before ShaderParameters were introduced.
from sipyutils import si # win32com.client.Dispatch('XSI.Application')
si=si()
import win32com.client
coll = win32com.client.Dispatch( "XSI.Collection" )
def doit( s, coll ):
for p in s.Parameters:
if p.Source and p.Source.IsClassOf( C.siShaderParameterID ):
print p.Source.Parent.Name
coll.Add( p.Source.Parent )
doit( p.Source.Parent, coll )
for l in s.TextureLayers:
for y in l.Parameters:
if y.Source and y.Source.IsClassOf( C.siShaderParameterID ):
print y.Source.Parent.Name
coll.Add( y.Source.Parent )
doit( y.Source.Parent, coll )
# Get a material or shader to use as a starting point
mat = si.Dictionary.GetObject("Sources.Materials.DefaultLib.Architectural")
doit( mat, coll )
coll.Unique = True
coll.Add( mat.AllImageClips.GetAsText() )
This snippet worked for this [nonsensical test] render tree:













