View Daniel Harjanto's profile on LinkedIn

Brief description on building Path Constraint
with ICE in XSI 7

by Daniel Harjanto a.k.a misterdi

Phil Taylor kindly show his ICE Rigging compounds on Softimage Community Forum

Here is the video of "ICE Kinematics – Rigging Constraints"

But since Phil doesn't give a detail description on his video for the path constraint compound, some of the artists here get difficulties to understand the ICETree graph

Here is a brief description on the compound in attempt to re-build the graph
Note that ICE Kinematics are totally unsupported by Softimage for this release. You can enable this by setting environment variable XSI_UNSUPPORTED_ICE_KINEMATICS on,
but you’re on your own!


Scene Setup
Required element for this setup

Objects needed:
Get a null, by default its name is null
Create a Curve, by default its name is crvlist
Get an empty pointcloud, by default its name is pointcloud.


Getting an ICETree

Steps:
Select the pointcloud, and hit Alt+9.
An ICETree editor will be opened

To start building the ICETree graph, make sure that pointcloud is in the right pane.
Click ICETree->Create->ICE Tree
There will be a single ICETree node created in the editor which will be the root of the ICETree graph


Getting required inforamtion into ICETree

To build the ICETree, all required information need to be imported to the ICETree

We need the Curve Geometry and the null Global Transform

Notes:

  • Kinematics Global Transform is a 4x4 matrix
  • Matrix to SRT will output 3 components
    • Scale : a 3D Vector output port type
    • Rotation : a polymorphic output port type
    • Translation : a 3D Vector output port type
  • Get Closest Location


Solving Constraint Position

With this informtion we could resolve position of the null as the closest location on the curve from its current position

Notes:

  • Get Closest Location will output a location on the curve, this information can be used to get other information such as PointPosition, PointNormal, PointU, PointBinormal etc.
  • The only thing that we interest in this step is the point position in Worldspace coordinate.
  • Other transform matrix value are kept as is
  • SRT to Matrix, will compose a transform matrix from 3 components
    • Scale : a 3D Vector input port type
    • Rotation : a Rotation input port type
    • Translation : a 3D Vector input port type
  • Set Data is not actually a node, but a compound instead.

When you connect the graph to Port1 input port of the ICETree root, you will see in the viewport that the null should automatically snap to the closest location on the curve


Aligning Rotation to Curve Tangent

In some cases, we need to constraint also the rotation to the curve tangent.

In this case, we need to calculate the rotation and align that rotation with the curve tangent
Luckily that ICE came with a compound that can be used to do this.
Please consult the manual for description on "Increment Rotation with 2 Vectors" Compound.

Notes:

  • Get PointTangent will ouput a 3D Vector representing tangent vector at the location
  • By default, Increment Rotation with 2 Vectors use <0, 1, 0> as it's local vector
    or in other word it will align the Y-axis of the null to tangent vector of the curve
    You could change this if you want to align other axis.
  • Weight in Increment Rotation with 2 Vectors can be used to blend the value,
    • 0.0 local vector unchanged (nothing happen).
    • 1.0 local vector aligned to the To Vector


Adding Option for Constraining Rotation

To let user decide whether they want to constraint the rotation to curve tangent or not, we need to add an If node to the tree.

Notes:

  • Increment Rotation with 2 Vectors will be evaluated if and only if the Condition of If node is set to True
  • The Condition port could be exposed when you create a compound from this tree.



 

Beyond this tutorial.

In Phil Taylor's video, there is another output port exposed. Probably he need it in other context. It's a PointU parameter and exposed it through the compound. It's a the U value of the closest location on the curve.

With the same concept, probably it is possible to create another type of constraint such as Surface Constraint, the only thing you need to change probably the Get PointTangent, since there is no PointTangent ICE Attribute in a polymesh object, but it has a PointNormal instead

If you want to create a single compound for both type, probably using the First Valid node could help.

Cheers,

<<back>>