Get viewport kinematics
by iamVFX

Hyphae-growth in ICE
by Matic

Here’s a little Python example that shows how to get all the Get Closest Location nodes in a scene and check whether Enable Cutoff Distance is enabled.
Location queries can be expensive, in terms of memory and performance, so you usually want to have some sort of cutoff distance.
si = Application
log = si.LogMessage
nodes = Application.FindObjects( '', "{2E206DD7-DC51-49F7-92BD-F6CD863125D3}" )
for o in nodes:
log( '%s : Enable Cutoff Distance=%s' % (o, str(o.InputPorts('enablecutoffdistance').Value) ) )
#Application.InspectObj( o )
log( '%s : %s' % (o.Parent, si.ClassName(o.Parent) ) )
# pointcloud.pointcloud.flock_SIM.State_0.GetClosestLocationNode : Enable Cutoff Distance=True
# pointcloud.pointcloud.flock_SIM.CompoundNode.GetClosestLocationNode : Enable Cutoff Distance=False
# pointcloud.pointcloud.flock_SIM.State_3.Get_Closest_Location_on_Geometry.GetClosestLocationNode : Enable Cutoff Distance=True
# pointcloud.pointcloud.flock_SIM.State_10.Get_Closest_Location_on_Geometry.GetClosestLocationNode : Enable Cutoff Distance=False
# pointcloud.pointcloud.flock_SIM.State_10.GetClosestLocationNode : Enable Cutoff Distance=True
# pointcloud.pointcloud.flock_SIM.State_0.flock_CurveDirection.GetClosestLocationNode : Enable Cutoff Distance=True
# pointcloud.pointcloud.flock_SIM.State_10.Surface_Force.Get_Closest_Location_on_Geometry.GetClosestLocationNode : Enable Cutoff Distance=None
# pointcloud.pointcloud.flock_SIM.ExecuteInAllStates.Flow_Around_Surface.GetClosestLocationNode : Enable Cutoff Distance=None
# pointcloud.pointcloud.flock_SIM.State_2.Flow_Around_Surface.GetClosestLocationNode : Enable Cutoff Distance=None
# pointcloud.pointcloud.flock_SIM.State_1.Surface_Force.Get_Closest_Location_on_Geometry.GetClosestLocationNode : Enable Cutoff Distance=None
# pointcloud.pointcloud.flock_SIM.CompoundNode[1].GetClosestLocation.GetClosestLocationNode : Enable Cutoff Distance=True
# pointcloud.pointcloud.flock_SIM.State_9.GetClosestLocation.GetClosestLocationNode : Enable Cutoff Distance=False
#
#nodeAddress = "pointcloud.pointcloud.flock_SIM.State_0"
#Application.SelectObj(nodeAddress)
#Application.OpenView("ICE Tree")
The Enable Cutoff Distance=None results mean that the cutoff distance is an exposed port in a compound. If you wanted to get that setting, it would take a bit more scripting…exercise left to the reader.
Move…Creativity without limits…the first scalable, fully programmable crowd simulation and behavioral animation system…
From May 2003, here’s a brochure for SOFTIMAGE|Behavior 1.0.
If you want to know whether a material is used by any objects in the scene, you can check the UsedBy property.
Here’s a Python snippet that finds unused materials in the current material library:
from siutils import si
if Application.Version().split('.')[0]>= "11":
si = si() # win32com.client.Dispatch('XSI.Application')
from siutils import log # LogMessage
from siutils import disp # win32com.client.Dispatch
from siutils import C # win32com.client.constants
matlib = si.ActiveProject.ActiveScene.ActiveMaterialLibrary
for mat in matlib.Items:
if mat.UsedBy.Count == 0:
log( '%s <Not used>' % mat.Name )
Spawning into different point clouds is [supposed to be] easy to set up and allows you to use different shaders on different clouds, which gives you more control over the look of your particles.
Spawn on Collision, however, doesn’t seem to work with a different point cloud. As soon as you change Self to a different point cloud, everything goes red and there’s all kinds of errors and warnings. Look at the Show Messages for Spawn on Collision:
It’s like that all the way back to 7.01. If there’s a way to do it right, I don’t know it yet.
To spawn particles into a new point cloud, try using Spawn on Trigger instead.
In this case, a customer sent me a scene where Undo didn’t work. As soon as you opened the scene, nothing you did could be undone, and Undo wouldn’t start working again until you loaded some other scene.
I thought it might be something in the scene, so I deleted practically everything under the Scene_Root, but Undo still didn’t work. Then I noticed that the .scn file was still pretty big (18MB) so I poked around a bit more in the scene and found thousands and thousands of materials (14K of materials, to be exact).
There were over 13 thousand AutoCAD_Color_Index materials. Just opening the Material Manager took minutes, and deleting 13 thousand materials wasn’t as easy as you might think.
I first tried with the DeleteAllUnusedMaterials command, but that took so long that I figured that Softimage was hung and I killed it.
In the end, I deleted some manually (a hundred at a time) and then the rest with the Material Manager > Delete Unused Materials. But I could also have done it like this:
import time
start = time.clock()
import win32com.client
oObj = win32com.client.Dispatch( "XSI.Collection" )
oObj.Items = 'Sources.Materials.DefaultLib.AutoCAD_Color_Index_*'
print oObj.count
# 13782
Application.SetValue("preferences.General.undo", 0, "")
for mat in oObj:
Application.DeleteObj(mat)
Application.SetValue("preferences.General.undo", 50, "")
end = time.clock()
Application.LogMessage( round( end - start, 3) )
# INFO : 264.117
Bending paper
by Ендукъ

K means clustering
by iamVFX

Softimage ICE CrowdFX – Intel Logo 10,000 Actors
retrieving edge indicies after slicing polygons, ICE Modeling
by Chris Chia

Hiding part of a geometry with ICE
by Angel Sanchez

#Python from win32com.client import constants f = Application.GetValue( "PlayControl.Current" ) Application.SelectKeysInTimespan( ".kine.*", constants.siSetKeySelection, f, f, constants.siAnimatedParameters )
' VBScript SelectKeysInTimespan ".kine.*", siSetKeySelection,GetValue( "PlayControl.Current" ),GetValue( "PlayControl.Current" ),siAnimatedParameters
Hat tip: luceric