# ICE Nodes Reference Library: Math Vector

##### By Sunder Iyer
In this tutorial, we will be taking a detailed look at each of the Math Vector nodes found in Softimage's Interactive Creative Environment. Software required: Softimage 7 and higher.
###### Course info
Level
Advanced
Updated
Sep 25, 2008
Duration
1h 1m
Table of contents
Introduction and Project Overview
ICE Nodes Reference Library: Math Vector
Description
Level
Advanced
Updated
Sep 25, 2008
Duration
1h 1m
###### Description

In this tutorial, we will be taking a detailed look at each of the Math Vector nodes found in Softimage's Interactive Creative Environment. Each video in this course is a self-contained tutorial centering on one of the nodes found in ICE within Softimage. This means that these tutorials can be viewed in any order you wish, allowing you to jump straight to the content that is most relevant to you. These tutorials will take a detailed look at each of the nodes found within the Math Vector section of ICE, and we'll learn how they can be used to speed up our workflow. Software required: Softimage 7 and higher.

About the author
###### About the author

Originally from Lagos, Nigeria, Sunder has made great headway in both the interactive game design and 3D animation worlds.

###### Python in Houdini
Intermediate
43m
Sep 17, 2009
Section Introduction Transcripts
###### Section Introduction Transcripts

Introduction and Project Overview
The Are Parallel node will find out if two vectors are parallel or not, that is whether or not they'll intersect. It's also a nice way of finding out if your vectors are pointing in the same direction, and we're now going to learn how to use it to give upward-rising particles specific properties. So let's get started by dropping in a null, go to any menu, Get Primitive, and drop in a null. Now with this null selected let's go to the Simulate menu, ICE, and Create, Emit Particles from Selection. Once you run this it'll drop in a point cloud, click Update to look at the ICE tree on that point cloud, and hit Play and your particles will come out. Now what happens if we want the particles that are rising straight up to be blobs instead of points? Well we can do just that with the Are Parallel node. All we have to do is get the particle velocity, compare it with the 0, 1, 0 Y unit vector, and if it reaches that we can execute some code or execute a node branch, and then based off of that we can get desired results. So let's define the conditions for this node. Grab a Get Particle Velocity node and drop it onto your ICE graph, plug that into the First port, and now in the Second port here, you can go in and set the value to 0, 1, 0, or you can plug in a 3D vector constant in here, either one should be just fine, but now with this node, we can check for an if condition. So, grab an Execution If node, connect the Parallel port into the Condition port. So now if they're parallel, we can run whatever's plugged into true, otherwise we can execute whatever's into a false. Plug the result into the port to here, and now if true, grab a Set Particle Shape node. Take it, connect it like so, and then change the shape from Point to maybe Blob, for example. Hit Rewind and Play. And actually it's a little hard to see, but you can see the upward particles are all blobs. Let me go in here and increase my size, so I'll set it to maybe 2. I will definitely see the balls I've shaded turned on, hit Rewind and Play, and only the particles that rise upwards have a size of 2, which is kind of exaggerated here, so let me take it down to maybe. 5. It's a little too crazy. Alright, there we go. Now if we want for instance, we can apply some forces so any particles that are not pointing up will be pulled down. So we can grab an Add Forces node for example, connect that into If False, and in here set the values to 0, -. 9, 0, so we can emulate gravity, and now any of the points that don't point directly upwards will be pulled down by gravity as we have here. So there you go, with the Are Parallel node we were able to determine the direction in which a particle is facing, so if it's facing 0, 1, 0, we can set the shape to a blob, otherwise we can add forces to pull these guys down. So that's the Are Parallel node in a nutshell. It will just check if two vectors are parallel to each other, and as we have seen here it's a nice way of finding out if the two vectors are facing the same direction.