Creating Goals for Particles

When you create a goal for particles, the particles are attracted to or repelled from 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 a swarm of bees chasing after an unfortunate bear.

 

Basically, to make particles reach a goal you select the particles, then choose one or more objects that will be the goals. The particles then 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.

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.

You can use almost any type of object as a particle goal (including multiple goal objects), including polygons, NURBS surfaces, curves, nulls, lattices, implicit objects, cameras, lights, and even other particle clouds.

As well, you can choose to where on the goal object the particles will go (the object’s surface, its center, or a point on its surface, etc.) and how the particles react to the goal (chase it, flee from it, stick to it, etc.).

Setting Goals

You can set goals for particle clouds, which affect all particle types that are attached to it, or you can set goals for specific particle types on a cloud. You can also use more than one goal object to affect the particles.

When a particle is born, it is randomly assigned to a point on the goal object and it evolves towards this point throughout its life. If there is more than one goal, each particle is assigned at birth to one point on each goal object: the first particle born is assigned and attracted to the first vertex of each goal, the next particle to the second vertex of each goal, and so on. Each goal has a weight parameter that lets you blend (and animate) the influence of the different goals on the particles (see Setting the Goal’s Weight).

Setting a Goal for a Particle Cloud

To set a goal for a particle cloud

1. Select the particle cloud to which you want to set a goal.

2. Choose Modify > Particles > Add Goal from the Simulate toolbar.

3. Pick one or more objects that you want to use as goals (middle-click to branch-select a goal object), then right-click to end.

You can use almost any type of object as a particle goal, including polygons, NURBS surfaces, curves, nulls, lattices, implicit objects, cameras, lights, and other particle clouds.

4. In the Goal property editor, set the parameters as described here:

 

 

The parameters on the Advanced page let you set more advanced variation for the Local Radius, Weight, and Offset parameters on the Goal page. You can select the Distribution method for each one (Uniform or Gaussian), as well as set a Seed value—see Adding Variation to Particles.

After you’ve set the goal:

• A goal property is created under each object that you picked to be a goal.

• A goal property is created under each particle cloud’s particle type.

Setting a Goal for a Particle Type

In addition to setting goals for particle clouds, you can set a goal for each particle type on a cloud. As well, if the particle cloud already has a goal set for it, you can edit or mute it for this particle type on the Goals page.

To set a goal for a particle type

1. Open the PType property editor for the particle type you want to.

2. Click the Goals tab and click the New Goal button.

3. Pick one or more objects you want as goals for this particle type and right-click to end the picking session.

 

After you’ve set the goal:

• A goal property is created under that particle type.

• A goal property is created under each object that you picked to be a goal.

Choosing the Particles Behavior

Using the Behavior options in the Goal property editor, you can decide how the particles react to the goal.

Particle goals are part of the overall particle simulation, which means that any particles that are progressing toward a goal can also react to forces that are applied to them. In fact, goals act as a force on particles, similar to how the Attract force works, depending on the behavior you choose.

For example, if gravity is pulling particles downwards but their goal is above them and you have Spring as the behavior, the particles will remain in a static position if the gravity and the behavior are of equal strength.

To determine the particles behavior

• Select an option from the Goal Behavior list: Chase, Flee, Stick, Arrive, or Spring.

- Chase: the particles follow the goal object as if it was a magnet.

 

- Flee: the particles are repelled from the goal and move in the opposite direction of it, as if repulsed by its hideousness.

- Stick: the particles immediately stick on the goal object as they are born; that is, the particles do not move from the emitter toward the goal and then stick on it.

 

- Arrive: the particles move slowly toward the goal.

You then set the Landing Distance in Softimage units and Deceleration of the particles. This allows you to prevent the particles from overshooting the goal.

 

- Spring: the particles are linked to the goal by springs and dampers (viscosity) according to Hooke’s law.

The Spring Constant determines how stiff the spring is. If you set this to positive values, the particles are attracted to the goal; negative values repel the particles. The farther the value is from 0 (either positive or negative), the more “elastic” the particles become.

Viscosity (or damping) is the amount of resistance applied to the particles as they move through space, as if they were moving through fluid. This is similar to the effect of a drag force. The higher the value, the more the particles are slowed down.

 

Selecting the Target on the Goal

Using the Target options in the Goal property editor, you can choose to which geometry component on the goal object the particles will move towards.

To determine where the particles move toward

• Select an option from the Target list in the Goal property editor:

- Surface: each particle is attracted to a randomly selected position (a random U and V value) on a polygon mesh or NURBS surface.

- Point: each particle is attracted to a randomly selected point (control vertex) on the goal’s geometry.

- Line: each particle is attracted to a randomly selected position on edges, isolines, or curves of the goal geometry. If the goal object is a curve, make sure to select this option.

- Center: each particle is attracted to the center of the goal object.

If the goal object is a particle cloud, you can use only the Center as the target. As well, if the Target option you select isn’t supported by the type of object the goal is, the target object’s Center is used.

- Volume: each particle is attracted to a randomly selected position inside the target geometry.

 

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. This is especially noticeable with the Target set to Volume. See Deforming Particle Simulations for more information on other ways of deforming particles.

 

Offsetting the Target from the Goal

You can offset the goal object’s target so that the particles don’t aim exactly for the target as they move toward the goal. This is particularly useful when you set a variance for the Offset X/Y/Z values to make the particles move more randomly toward the target on the goal object.

To offset the target position on the goal object

1. In the Goal property editor, select an option from the Offset Reference list. This determines the reference point from which the target is offset from the goal object:

- World: the target is offset relative to the global center: the reference stays constant regardless of changes to the goal object’s position, orientation, or scale.

- Goal object: the target is offset relative to the goal object’s local position, orientation, scale, and shape.

- Goal point: the target is offset relative to the local reference frame of the points on the goal object; that is, the offset follows the state of the goal object’s normals and tangents.

 

2. Set the Offset X/Y/Z values. These are target offset coordinates in relation to the Offset Reference you’ve selected. The offset directs the particles to the goal’s target plus the offset.

- For World, the Offset X/Y/Z values are expressed along the X/Y/Z axes of the world (global).

- For Goal object, the Offset X/Y/Z values are expressed along the X/Y/Z axes of the object (local).

- For Goal point, the Offset Y value is the direction along the normals, while the Offset X and Z values are directions along the tangents.

Each Offset parameter also has a variance parameter (Var) so that you can produce a more random effect on the particles. For more information, see Adding Variation to Particles.

Setting the Goals Range of Influence

You can set the goal’s range of influence so that the particles are affected only if they are within a specified distance (local radius) of the goal object.

To set the goals range of influence

1. In the Goal property editor, set the Influence to Local.

If you select Global, the particles are influenced by the goal wherever they are in space.

2. Set the Local Radius value to the number of Softimage units within which you want the particles to be influenced by the goal.

For example, if you set 5 as the value, the particles are not influenced by the goal until they are within 5 units of the goal.

The Local Radius parameter also has a variance parameter (Var) so that you can produce a more random effect on the particles. For information on the Var parameter, see Adding Variation to Particles.

Setting the Goals Weight

You can set the weight of a particle goal, meaning how much of an influence it has on the particles that are attracted to it. While you can set the weight for a single goal, weighting is most useful when particles have multiple goals to which they’re attracted. Each goal acts like a competing force on the particles, which is controlled by its weight. Setting each goal’s weight allows you to blend (and animate) the amount of influence the different goals have on the particles.

To set each goals weight

• Set a value for the goal’s Weight parameter between 0 and 1.

A value of 0 means that the goal has no effect on the particles, and a value of 1 means that the goal has full effect (100%) on the particles.

If there is more than one goal, the Weight values are multiplied together. For example, if there are two goals and they each have a weight of 1 (fully weighted), the particles are pulled equally between these goals so the combined weight effect is 50% for each goal. If the Weight is 0.5 for each goal, the combined effect on the particles would be 25%, and so on.

When each goal’s Weight is the same, the particles move between the goal objects, usually oscillating back and forth and then becoming static. If each goal’s Weight differs, the particles obviously move more toward the goals with the higher Weight value.

 

The Weight parameter also has a variance parameter (Var) so that you can can produce a more random effect on the particles. This is multiplied with the weight too. For information on the Var parameter, see Adding Variation to Particles.

Editing the Goals Properties

To edit the goals properties

• Do any of the following to open a goal’s property editor:

- Select the goal object and choose Modify > Particles > Edit Goal from the Simulate toolbar.

or

- Select the particle cloud that has a goal and choose Inspect > Goals > name of goal from the Simulate toolbar.

or

- In the explorer, click the Goal icon below the goal object or the particle type.

or

- On the Goals page in the PType property editor, right-click the Ptype.goal name and choose Inspect Item (see Setting a Goal for a Particle Type).

Muting Goals

You can mute a particle goal which lets you isolate and fine-tune the effects of other goals in a scene, or of particles without being affected by the goal. This is useful if you have several particle goals in the scene, and you don’t want to have them all simulate while you’re testing one.

As well, you can animate the muting to do such things as having the particles being intermittently attracted to a goal.

To mute a goal

• Select the Mute option in the Goal property editor.

or

• On the Goals page in the PType property editor, click in the Mute cell for the appropriate goal (see Setting a Goal for a Particle Type).

Disconnecting Goals

You can disconnect a goal from its particles by deleting the goal object’s goal property. This disconnects the goal from all the particle types on the particle cloud.

You can also disconnect a goal from an individual particle type. All other particle types on the same cloud remain connected to the goal.

To disconnect a goal from a particle cloud

• Open an explorer and delete the goal object’s goal property.

 

To disconnect a goal from a particle type

• On the Goal page in the PType property editor, right-click the goal name from which you want to disconnect the particle type and choose Select Item, then press Delete.

Scripting Particle Goals

You can control particle goals through scripted particle events. With scripting particle goal values, you can create many effects. For example you can simulate particles flowing along a surface or a curve.

To script particle goals

• Enter the script in the edit box or select an existing script on the Script page of the particle type’s PEvent property editor.

See Scripting a Particle Event for more information.

Particle Goal Script Attributes

Each particle has a set of particle attributes that are allocated to it when connecting a goal to the cloud. All attribute names start with “Goal_N_” where N is the 0-based index of the goals connected to the particle simulation. For example, if you have three goals for a particle cloud, you would have Goal_0_UVWI , Goal_1_UVWI, and Goal_2_UVWI.

Goal_N_UVWI

This is the target position of the particle on the goal object (see Selecting the Target on the Goal). This is a vector of four floats. The first three values (UVW) of the vector correspond to the surface parametric values, and the last one (I) is an index.

- If the target type is Surface on a NURBS surface goal object, U and V are the parametric values of the surface. W represents the depth when the goal target type is Volume. I is the index of the subsurface.

- For a polygon mesh goal with the Surface target type, I is the index of the target triangle and U and V are the barycentric coordinates of the target on that triangle. W is the depth along the triangle normal.

- For Point type targets, I is the index of the point.

- For Line type targets, I is the index of the edge or subcurve or curve and U is the parametric value along this element.

Goal_N_Offset

This is a vector that offsets the target point (see Offsetting the Target from the Goal).

Goal_N_Weight

This allows you to set a different goal weight for each particle (see Setting the Goal’s Weight).



Autodesk Softimage v.7.5