Notch Notch Manual 0.9.23
 Light | Dark
Flocking Affector

Flocking Affector

Simulates flocking behaviour with particles.

image

image

Method #

This node simulates a flocking behaviour on a particle system. This is typically used to make particles behave like a flock of birds or a shoal of fish.

The simulation solves several different behaviour goals: making particles move towards their goal position (goal seeking); making particles avoid others nearby (avoidance); making particles stay close to their neighbours (cohesion); and making particles move in the same direction as their neighbours (alignment). The results of these conflicting goals are weighted together to produce a new velocity for the particle. The weights for the different behaviour goals are summed together and normalised, so a large weighting on one behaviour reduces the effect of the others.

The goal positions are determined by connecting nodes to the Flock Goal Nodes input. Where 3D objects are used, vertex positions are used as goals, Otherwise the transform position of the connected node is used. Where there are multiple goals, particles are each assigned a goal either randomly or based on their emitter.

The range in which particles can see their neighbours is determined by radii - Cohesion Radius and Avoidance Radius. The neighbourhood search is achieved internally by placing particles into a grid, and the location, cell size and resolution of this grid may be controlled in order to optimise the performance requirements of the node. Larger search areas, and search areas containing more particles, increase demands on performance. Larger grid resolutions may be desirable when dealing with large areas of space.

The sample project “flocking_birds.dfx” included in the Notch installer provides an example of the flocking affector in action.

Parameters

These properties control the 3D transforms of the node. Transforms will generally be inherited by child nodes, although they can be ignored through the Inherit Transform Channels attributes.

ParameterDetails
Position XMove along the local x-axis.
Position YMove along the local y-axis.
Position ZMove along the local z-axis.
Rotation HeadingRotate around the local y-axis.
Rotation PitchRotate around the local x-axis.
Rotation BankRotate around the local z-axis.
Scale XScale along the local x-axis.
Scale YScale along the local y-axis.
Scale ZScale along the local z-axis.

Toggle which transform channels should be inherited from the parent node. By default, all transforms will be inherited.

ParameterDetails
Position XToggle inheritance of the X Position from the parent.
Position YToggle inheritance of the Y Position from the parent.
Position ZToggle inheritance of the Z Position from the parent.
Rotation HeadingToggle inheritance of the Rotation Heading from the parent.
Rotation PitchToggle inheritance of the Rotation Pitch from the parent.
Rotation BankToggle inheritance of the Rotation Bank from the parent.
Scale XToggle inheritance of the X Scale from the parent.
Scale YToggle inheritance of the Y Scale from the parent.
Scale ZToggle inheritance of the Z Scale from the parent.
World Position OnlyInherit the world position from the parent only, rotation and scale will be ignored. Overrides above properties.
Inherit TimeToggle inheritance of time from the parent.

These properties control the core behaviours of the node.

ParameterDetails
Cell SizeThe area around each particle that resists other particles from getting within a certain distance.
WeightHow strong an effect has on the particles.
Goal SeekingHow much particles will want to move towards the goal input.
Min Goal Seek ThresholdThe minimum weighting that will be applied to the goal seeking behaviour.
Max Goal Seek ThresholdThe maximum weighting that will be applied to the goal seeking behaviour.
AvoidanceHow much particles attempt to avoid each other.
CohesionHow much the particles try to stay close to each other.
AlignmentHow much the particles try to move in the same direction.
Cohesion RadiusDistance at which the particles can see others when determining cohesion.
Avoidance RadiusDistance at which the particles can see others when determining avoidance.
Visibility AngleThe field of view angle at which particles can see others.
Rotation LimitThe maximum rate at which particles can change direction.
Max SpeedMaximum speed the particles can move at.
Min SpeedMinimum speed the particles can move at.
Slowdown At Goal DistanceDistance from the goal that particles begin to slow down.
Goal Movement WeightHow much the goal movement affects the flock movement.
Kinect Motion ThresholdThreshold for which movement from the Kinect will be followed.
Mesh Goal SeekingThe weighting for the mesh goals.
Null Goal SeekingThe weighting for the transform goals.
Life Effect CoeffsHow much the particles are affected by the affector at different stages of the particles life cycle. Values 1 and 2 are control points used to control a bezier curve between values 0 and 3.
Grid ResolutionThe resolution of the underlying neighbour search grid.
Limit to 2DLimits the affectors functionality to only its x and y plane.
Particle Goal Allocation ModeChoose how a particle decides which goal to move towards.
  • Random : The particles are randomly assigned which goal to move towards.
  • Per Emitter : The particles are assigned goals by emitter - so every particle from one emitter has the same goal.

Inputs

NameDescriptionTypical Input
Flock Goal NodesNodes input will be used as the goals for the flock effect.Null
Grid TransformUsed to control the size of the underlying grid used for neighbourhood searches.Bounding Box
Obstacle NodesThese nodes will be avoided by the flock effect3D Object
Kinect SkeletonA skeleton generated from a kinect.Kinect2 Skeleton
Affected EmittersChoose which particle emitters can be affected by the affector.Primitive Emitter
Procedural FalloffUse the distance field from a procedural system to vary how strong the affector is.Procedural Root
Transform ModifierApply the transforms of another node to this node.Null
Target NodeModifiy the rotations of the node to always direct the z axis towards the input.Null
Local Transform OverrideApply the transforms of another node to this node, relative to its parent.Null