Follow
particle node
Makes particles follow a leader.
This operator calculates and applies forces necessary to make particles chase a leader.
You can use the second input to specify the leader(s), or use the parameters on the Leader tab to choose a group in the first input as the leader(s).
The Leader parameter on the Leader tab let you choose how the leader works:
-
The “leader” can be a computed point based on the leader particles (the spatial center of the leader particles, the center of mass, or the center of density).
-
Each particle in the leader stream can lead individual particles from the follower stream. Houdini can automatically assign followers to leaders, or you can set a
followattribute on particles to determine which leader they will follow. Use the Property POP to set the follow-related attributes on particles.
Using Follow
-
Start with two
particle streams. -
Use the group node to put one particle stream into a group called
leaders. Use another group node to put the other stream into a group calledfollowers. -
Use a collect node to collect the two particle streams.
-
Click the
Follow tool on the Drive Particles tab of the shelf.On the Leader tab, set the Leader Group to
leaders.
You must customized the parameters of the particle and follow nodes in the parameter editor. This tool is quite advanced and simply putting down the nodes will not automatically generate the desired result.
Parameters
|
Activation |
Turns this node on and off. The operator is only active if this value is greater than 0. This is useful to control the effect of this node with an expression. |
|
Source Group |
Only affect a group of points (created with, for example, a Group POP or Collision POP) out of all the points in the input. |
Follow
|
Behavior |
Controls how the node affects the follower particles.
|
||||
|
Minimum Distance |
Stop particles closer than this distance to the leader. |
||||
|
Maximum Distance |
If you enter a value greater than 0, particles further than this distance from the leader will NOT follow. |
||||
|
Ambient Speed |
If the speed of the leader falls below this value, this is used as the target speed instead. |
||||
|
Attract Distance |
If the distance to the leader is less than this value, the force is repulsive. Otherwise, it is attractive. To make this parameter available, you must set the Behavior to Normal Follow. |
||||
|
Predict Intercept |
Particles will try to predict the leader’s direction on the next frame and head it off. |
||||
|
Stop At Leader |
Particles come to a complete stop when they reach the leader. |
||||
|
Scale |
Scaling factor for the force applied to the particles. |
||||
|
Speed Scale |
Scaling factor for the target speed. |
Leader
|
Leader Group |
Subset of points from the first input to act as leaders. You can use this parameter instead of connecting the second (Leader) input. |
||||||||
|
Leader |
Specifies what the particles follow.
|
||||||||
|
Follow Index |
This parameter is available when Leader is “Individual Particles”. It controls how the node interprets the Particles that do not have
|
Defaults
|
Ignore Mass |
Ignores any mass attributes on the input particles. |
|
Override Mass |
Replaces any mass attributes on the input particles with the value of the Mass parameter below. |
|
Mass |
Mass to use when Override mass is on. |
Inputs
|
Follow |
The particles that will be made to follow the leader. |
|
Leader |
The particles that define the leader(s) to chase. If you do not connect this input, you must set the Leader Group parameter on the Leader tab. |
Local variables
Standard POP local variables
|
AGE |
The seconds a particle in the template has been alive. |
|
AX AY AZ |
Acceleration of the particle. |
|
BBX BBY BBZ |
The point’s relative position in the bounding box. |
|
DEAD |
Point is dead. |
|
ITER |
Processing iteration number. |
|
JUSTHIT |
A collision for this particle was detected (for example, by the Collision POP) during the processing of this timestep (that is, this iteration of the particle simulation). This variable is cleared at the beginning of each timestep. Note that the collision POP actually detects any collisions which would have occurred the during the previous frame. |
|
LIFE |
Percent of total life used (from 0 to 1). |
|
LIFESPAN |
Expected lifetime of particle. |
|
MAPU MAPV MAPW |
Point or vertex texture coordinates. |
|
NPT |
Total number of points. |
|
NGRP |
Total number of points in source group. |
|
NX NY NZ |
Normal vector. |
|
PT |
The point number of the currently processed point. The |
|
RESTX RESTY RESTZ |
The rest position. |
|
SLIDING |
The sliding state of the particle. |
|
SPRINGK |
Elasticity of a point. |
|
STOPPED |
Point is stopped. |
|
STUCK |
1 if particle is stuck to a collision object. |
|
TENSION |
Spring tension. |
|
TIMEINC |
Time increment. |
|
TX TY TZ |
Point position. |
|
U V |
Surface UV values. |
|
VX VY VZ |
Velocity direction. |
|
WEIGHT |
Point spline weight. |
Added by Collision POP/Limit POP
|
DIST |
Distance from particle to last collision. |
|
HCR HCG HCB |
Diffuse color at the collision point on the surface the particle collided with. |
|
HITID |
ID for last collision. You can control how this attribute is set in the Collision or Limit POP to help distinguish types of collisions. |
|
HITTIME |
The time at which the last collision occurred. |
|
HMAPU HMAPV |
The texture map UV coordinates for the surface location where the last collision occurred. |
|
HNX HNY HNZ |
The normal at the surface location where the last collision occurred. |
|
HTX HTY HTZ |
World space position of the last collision. |
|
HU HV |
The UV coordinates for the surface location where the last collision occurred. |
|
NUMHIT |
Number of times the particle has collided. |
Added by Color POP
|
CA |
Point or vertex alpha value. |
|
CR CG CB |
Diffuse point or vertex color. |
Added by Property POP
|
ATTRACT |
Attractor point. |
|
CHARGE |
Charge of the particle. |
|
CLING |
Point is clinging to geometry. |
|
DRAG |
Point drag. |
|
FOLLOW |
Leader to follow. |
|
MASS |
Point mass. |
|
PSCALE |
Particle Scale. |
|
SCALEX SCALEY SCALEZ |
Non-uniform scale. |
Added by Proximity POP
|
NEAREST |
Either the point number or id of the particle nearest to this one. |
|
NEARESTDIST |
The distance to the nearest particle. |
|
NUMPROXIMITY |
The number of particles within a specified proximity to this particle. |
Added by Rotation POP
|
ROTA |
Rotation angle. |
|
ROTX ROTY ROTZ |
Rotation axis. |
Added by Source POP
|
GEN |
Generation. |
|
ID |
ID number, which always remains constant. |
|
ORIGIN |
Original Source point was birthed from. |
|
PARENT |
Parent’s ID Number. |
Added by Speed Limit POP
|
SPEEDMAX |
Maximum speed. |
|
SPEEDMIN |
Minimum speed. |
Added by Sprite POP
|
SROT |
Sprite rotation around view axis (in degrees). |
|
STEXU STEXV |
Texture coordinate of sprite’s lower-left corner. |
|
STEXW STEXH |
Size of sprite in texture space. |
|
SX SY |
Sprite scale. |
Controlled by Suppress Rule POP
|
SUPPPOS |
Suppress default position rule. |
|
SUPPVEL |
Suppress default velocity rule. |
|
SUPPUP |
Suppress default up-vector rule. |
|
SUPPAGE |
Suppress default aging rule. |
|
SUPPROT |
1 if particle is suppressing its default rotation rule. |
|
SUPPANGVEL |
1 if particle is suppressing its default angular velocity rule. |
Added by Up Vector POP
|
PVX PVY PVZ |
Previous velocity. |
|
UPX UPY UPZ |
Up vector. |
Added by Location, Source, Softbody, Split POPs
|
SPEED |
Absolute speed of particle. |
Example files
FlockOnPath
$HFS/houdini/help/examples/nodes/pop/follow/FlockOnPath.cmd
This is a simple example of a flocking effect created using the Follow POP.
The network has two groups of particles, the leader and the follower groups. The “leader” is animated on a path with a Position POP.
An Interact POP is used to disperse the follower particles a bit.
FollowInteract
$HFS/houdini/help/examples/nodes/pop/follow/FollowInteract.cmd
This example contains a particle network which demonstrates the use of the Follow POP to create a flock or chase. Geometry from the SOP level are used as sources for the Target and Follower particle groups. Then, Properties are added to the particles to affect how the flocks and chase will act.
FollowStop
Lemmings
$HFS/houdini/help/examples/nodes/pop/follow/Lemmings.cmd
This example shows how simple flocking can be accomplished using the Follow and Interact POPs.
The single leader particle is birthed on the first frame. Its position is set from the transform channels of the object “leader” which is a good example of how to explicitly animate a single particle “by hand.”
The followers are birthed from a grid also only on the first frame. In order for the Interact POP to know how large the instanced geometry is, an Instance POP is used to place geometry on the particle. The instanced geometry will be the render SOP from the “bird” object.
To keep the followers from bumping into each other, an Interact POP is used. This POP applies inter-particle repulsive forces. The influence type used is “Effect Intersects Effect” to allow maximum buffering between the instanced geometries.
The Interact POP pretends there is a sphere of influence around each particle. This sphere has two parts: the particle radius which represents where the instanced geometry should be and the effect radius, which represents a further buffering area. The amount of applied force is constant throughout the particle radius and is an inverse cosine over the effect radius. In this example, we use 5 times the instanced geometry size for increased stability. A force multiplier of 10 is used to make the repulsion effect more immediate.
A Follow POP is then used to make the followers follow the leader particle. Since the leader particle has no real velocity (i.e. its velocity attribute is 0 and its position is manipulated), the ambient speed must be used. This represents how quickly the followers will try to follow the leader.
Try bypassing the Interact POP to watch the followers collapse among themselves. Play with the scales of follow1 and interact1 to observe the effect. Play with the particle radii of interact1 and see what happens. Remember you can toggle the guide geometry flag on to see a visual representation of the applied force.
NewGroupies
$HFS/houdini/help/examples/nodes/pop/follow/NewGroupies.cmd
This example shows how simple flocking can be accomplished using the Follow and Interact POPs.
The single leader particle is birthed on the first frame. Its position is animated by adding a noise function in the Position paramaters of the Position POP.
The followers are birthed from a grid also only on the first frame.
A Follow POP is then used to make the followers follow the leader particle. Since the leader particle has no real velocity (i.e. its velocity attribute is 0 and its position is manipulated), the ambient speed must be used. This represents how quickly the followers will try to follow the leader.
To keep the followers from bumping into each other, an Interact POP is used. This POP applies inter-particle repulsive forces. The influence type used is “Effect Intersects Effect” to allow maximum buffering between the instanced geometries. The Interact POP pretends there is a sphere of influence around each particle. This sphere has two parts: the particle radius which represents where the instanced geometry should be and the effect radius, which represents a further buffering area. The amount of applied force is constant throughout the particle radius and is an inverse cosine over the effect radius.
NewGroupiesRavage
$HFS/houdini/help/examples/nodes/pop/follow/NewGroupiesRavage.cmd
A good example of a followers particle systems swarming a leader. Very similar to the NewGroupies example, however, the speeds of the followers and the leader are both amplified to give the illusion of a swarming flock 'ravaging' a leader.
SplitAndStick
$HFS/houdini/help/examples/nodes/pop/follow/SplitAndStick.cmd
Interesting use of the Follow POP. An initial particle system is emitted off of a grid. The particles are then forced into an orbit using an Orbit POP.
The Follow POP is then activated at a specific frame (150) by the following syntax in the Follow POPs' activation field: $FF > 150, meaning 'If the current frame is greater than 150, then activate me'.
A second Source POP is piped into the leader input of the Follow POP. The neat trick here is that the second Source POP births the same number of particles as the first source POP, and these particles are not given any velocity. They are born and just stay where they are born. This gives the illusion that the particles leave one grid, fly around for a bit, and then go stick onto the other grid.
Usages in other examples
| Example name | Example for |
|---|