ICE Particle Goals

 
 
 

When you create a goal for particles, the particles are attracted to it, similar to the way in which a magnet attracts or repels pieces of metal. With goals, you can create a number of particle effects, such as drops of water forming into a puddle, paint being sprayed over a surface, or butterflies being attracted to the bright colors on some guy who's just passing by.

When a particle is born, it is assigned to a location on the goal object that you have defined, and it evolves towards this location throughout its life. The particles try to reach the position and/or shape of the goal objects. When the particles reach the surface of the goal, their velocity decreases and they "stop." If the goal moves or its surface is deformed, the particles keep on trying to reach the goal's surface.

When you want particle to form a target shape (like filling a volume), that shape can be moving and deforming. In fact, if you deform the goal object, then hide it or make it unrenderable, the particles will take on that shape and make it look as if you're deforming the particles.

Particle goals are part of the overall particle simulation, which means that any particles that are progressing toward a goal can also react to obstacles and forces that are applied to them. In fact, goals act as a force on particles, similar to how the Attract force works. For example, if gravity is pulling particles downwards but their goal is above them, the particles will remain in a static position if both these forces are of the same strength.

Creating goals requires the Move Towards Goal compound. This compound lets you do two things:

If you want the particles to move among multiple goals, you can use the Multi Goal Sequencer compound with several instances of the Move Towards Goal compound — see Particles Moving Among Multiple Goals.

To set a goal for particles

  1. Create an object that you want to use as a goal for the particles to move toward.

  2. Create a particle emission — see Creating a Basic Particle Emission.

  3. In the ICE tree's preset manager, click the Task tab and select Particles.

  4. Drag the Move Towards Goal compound from the Goals group into the ICE view.

  5. Plug this compound's Execute output into an Execute port on the Simulation Root node, or a port on the ICETree node.

  6. Plug the goal object's Get data node into the Geometry port of the Move Towards Goal compound.

  7. In the Move Towards Goal property editor, set the parameters in the Goal Definition, Motion Towards Goals, and Goal Reached groups.

To set two goals for particles

You can use two Move Towards Goal compounds with two goals and the If node to have particles move to two goals at once.

  1. Create a set of "goal object+Move Towards Goal compound" for each goal that you want the particles to move toward (see the previous section for details).

  2. In the ICE tree's preset manager, click the Tool tab.

  3. Drag the If node from the Execution group into the ICE view and plug its Result output into a port on the ICETree node.

  4. In the ICE tree's preset manager, click the Task tab and select Particles.

  5. Drag the Every Nth Particle compound from the Conditionals group and plug its output into the Condition port of the If node.

  6. Open this compound's property editor and set the condition that makes the particles switch. In this example, the value of 2 is set so that every other particle goes to one of two goals.

  7. Plug one of the Move Towards Goal's Execute output into the If True port of the If node, and plug the other's Execute output into the If False port.

Particles Moving Among Multiple Goals

If you want to have particles move from one goal to another, you can create a set of "Move Towards Goal+goal object" nodes, then plug each set into the Multi Goal Sequencer compound.

To make particles move among multiple goals

  1. Create a particle simulation — see Setting Up Any Type of ICE Particle Emission.

  2. In the ICE tree's preset manager, click the Task tab and select Particles.

  3. Drag the Multi Goal Sequencer compound from the Goals group into the ICE view.

  4. Plug this compound's Execute output into a Port on the ICETree node.

  5. Create a set of "goal object+Move Towards Goal compound" for each goal that you want the particles to move toward (see the previous section for details).

  6. Plug each of the Move Towards Goal compound Execute outputs into an Execute Move Towards Goal port on the Multi Goal Sequencer compound, in the order in which you want the particles to travel (top goal is the one that is reached first).

  7. In the Multi Goal Sequencer property editor, you can set the distance in which the particles need to be to each goal before they go to the next one on the list, and you can choose to cycle through all the goals to create a continuous circuit.

Switching to Other Goals Based on a Condition

You can use the Switch to Next Goal compound with multiple goals, such as if you want to switch from one goal to another based on a certain condition. You can switch to other goals within a state system or with a compound or node that lets you set conditions, such as the small but mighty If node.

The following procedure shows how to use the If node and a Conditional compound.

Every 4th particle emitted switches to the goal on the right.

To switch to other goals

  1. Set up multiple goals as described in the previous section, Particles Moving Among Multiple Goals.

  2. In the ICE tree's preset manager, click the Tool tab.

  3. Drag the If node from the Execution group into the ICE view and plug its Result output into an Execute Each Frame port of the first Move Towards Goal compound.

  4. In the ICE tree's preset manager, click the Task tab and select Particles.

  5. Drag a compound from the Conditionals group and plug its output into the Condition port of the If node. In this example, the Every Nth Particle compound is used, meaning that every nth particle moves to the next goal.

  6. Open this compound's property editor and set the condition that makes the particles switch. In this example, every 4th particle is set as the condition to make the particles switch to the next goal.

  7. Drag the Switch to Next Goal compound from the Goals group into the ICE view.

  8. Plug its Execute output into the If True port of the If node.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License