# Turbulize the position of a locator with ICE kinematics

Controlling the scale, transformation or rotation (SRT) of an object with ICE isn’t any different from doing the same when dealing with point or “particles”. The thing you need to keep in mind though is how you set the data. While you can read any of the SRT properties of an object you can’t set the individual X,Y or Z transforms directly nor their local transform values. In order to set any of the transform values you need to set the whole global transform matrix. Note that this is merely a structural thing and does not affect what you can and cannot do with an object’s SRT.

01 Creating the scene

Get a Sphere (From the Get > Primitive > Polygon Mesh menu) and a Null object (From the Get > Primitive menu). The null object serves as a place holder for your ICE Tree. Select the Null object and press [Alt] + [9] to open an ICE Tree view. Get a Get Data node, open its PPG and enter sphere.kine.global as the Reference. In order to change the individual components of the SRT matrix you first need to deconstruct the matrix, make the modifications to the respective components, and then put the matrix back together. Get a Matrix to SRT node and connect the Value output of the sphere.kine.global node to its Matrix input. Get a SRT to Matrix node and connect the Scaling and Translation output of the Matrix to SRT to its corresponding input.

02 Deconstructing the Matrix

Get a 3D Vector to Scalar node and connect the Translation output of the Matrix to SRT to its Vector input. Get a 3D Vector node, a Turbulence node and a Multiply node. Connect the 3D Vector to the Position input of the Turbulence node and the Turbulence to the Value1 input of the Multiply node. Get a Add node and connect the Y output of the 3D Vector to Scalar to its Value1 input. Connect the Multiply node to the Value2 input of the Add node. Open the Turbulence PPG and lower the Time Frequency to 0.5 or so. This will control the speed of the turbulence. The Multiply node controls the strength of the turbulence. Open the PPG and set the Value2 to 20

03 Put the Matrix back together.

By using the Add node, the turbulence will be added on top of the Sphere’s Y translation rather than completely replacing it. Get a Scalar to 3D Vector and connect the X and Z output of the 3D Vector to Scalar node to its corresponding inputs. Connect the Result output of the Add node to the Y input. Connect the Vector output of the Scalar to 3D Vector node to the Translation input of the SRT to Matrix node. Get a Set Data node, open its PPG and enter sphere.kine.global as the reference. Connect the Matrix output of the SRT to Matrix node to the sphere.kine.global input of the Set Data node. Connect the Execute output of the Set Data node to the port1 of the ICETree node.

The project files used in this tutorial can be found at:http://dl.dropbox.com/u/3834689/CaffeineAbuse/ICE_Kinematic_Turbulence.zip

You completely duplication our mean and the difference of our information.

all vectors