Defining the Effect That Is Triggered

 
 
 

After you have selected a trigger for a state, you must define the type of effect that you want to occur. An effect is something that happens (the particles behavior changes) when the trigger's defined value is reached.

In this example, there is only one effect (change of particle shape) defined when the trigger value is reached (the particle's age limit). The different particle color indicates the transition to the new state.

An effect compound can be plugged into different types of Execute ports for the Primary State on the Simulation Root node, or on a State compound.

An effect compound can be evaluated either once at the start of the state simulation, or it can be evaluated at every frame of the simulation, which is what you want to do for most effects.

There are many different types of effects that you can create, from the classic bouncing particles off an obstacle to a simple change of particle color or shape upon a certain condition. Basically, any compound that can cause set particle attributes or change its behavior can be used as an effect compound. See Types of Effect Compounds for more ideas.

To set up an effect that is triggered

  1. Create a particle emission — see Creating a Basic Particle Emission for information.

  2. Set up the states you want to use as described in Setting Up States.

  3. Set up the trigger and its value as described in Selecting the Trigger.

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

    From the groups on the Particles tab, drag a compound you want to use as an effect. The compounds that can be used as effects are found in many different groups on the Particles tab. See Types of Effect Compounds for a list of possibilities.

  5. Plug the effect compound into the appropriate state's Execute port in any of the ways described in The Execute Ports.

    Trigger defined in first State compound and effects plugged into second State compound. Particles switch to the second compound when trigger compound's value is reached.

  6. In the effect compound's property editor, set the parameters to define the behavior of the particles. For example, if you're using a gravity force as an effect, you need to define its strength.

The Execute Ports

There are different types of Execute ports in a State or Simulation Root node in which you can plug an effect compound, depending on what you want to do:

  • Execute on Trigger: This port is on both the Primary State on the Simulation Root node and on State compounds.

    This port executes the compound plugged in here only once when the trigger value is reached: the particles do not remain in this state. This is useful for compounds such as Delete Particles or Unstick from Surface, where you want the action to be performed only once, not at every frame.

    You can define more than one effect to be executed at the same time: just plug its Execute output into a New Execute port.

  • Execute Once on Enter State: This port is on both the Primary State on the Simulation Root node and on State compounds.

    This port executes the effect compound plugged in here at the first frame that the state is entered. Like the Execute on Trigger port, this one is useful when you want the action to be performed only once, not at every frame, such as spawning new particles for a "bounce on surface" event.

  • Execute Every Frame: Only for the State compounds, this port executes the effect compound plugged in here at every frame so that the particles continue to be evaluated throughout the simulation. This is useful for when you want the particles to remain in their new condition, such as keeping their new color upon reaching a goal object.

Types of Effect Compounds

The effect compounds are mostly found in the Motion Control, Surface Interaction, Goals, Spawning, Strands, or Deleting Particles groups on the Particles tab in the preset manager.

However, you can use any compound that can cause a change to particles' behavior or its attributes, such as compounds in the Forces or Setters groups. For example, an effect could be gravity (a force) pulling the particles down or having particles change their velocity (set particle velocity) upon a certain condition being reached.

Here are some of the compounds most frequently used for state effects:

Bounce Off Surface

Makes particles bounce upon a collision with an obstacle.

See ICE Particles Bouncing Off Obstacles for information.

Flow Along Curve

Modifies the velocity vector so that the particles are aligned with a curve's tangent.

See ICE Particles Flowing Along a Curve for information.

Flow Around Surface

Modifies the velocity vector so that the particles flow around (avoid) an obstacle. Useful for doing fluid flows.

See ICE Particles Flowing Around an Object for information.

Move Towards Goal

Attracts particles to one or more objects (goals).

See ICE Particle Goals for information.

Orbit Around Controller

Makes particles continuously circle around an object.

See ICE Particles Orbiting Around an Object for information.

Slide on Surface

Makes particles slide on surfaces, and possibly drip off them.

See ICE Particles Sliding on Obstacles for information.

Spawning

Creates new particles from the original ones.

See Spawning ICE Particles for information.

Start Timer

Starts a timer that you define to determine how long a particle remains in a certain state.

See Setting Particle Timers.

Stick to Location and Stick to Surface

Makes particles stick to an obstacle's surface or a location when they collide with it.

See ICE Particles Sticking to Obstacles for information.

Strands

Creates strands (trails) following particles.

See ICE Particle Strands for information.

Unstick from Surface

Makes stuck particles detach from the obstacle.

See Detaching (Unsticking) Particles from Obstacles for information.

Compounds in the Deleting Particles Group

Deletes particles, such as making particles die when they reach a certain age or when they get to a certain location or upon collision with object.

See ICE Particle Age.

Compounds in the Forces group

Applies different types of forces to the particles to make them move.

See ICE Forces [ICE Fundamentals] for information.

Compounds in the Setters group

Changes any particle attribute, such as setting the particle color or size.

See Getting and Setting ICE Particle Attributes for information on using these types of compounds.