Flocking AffectorSimulates flocking behaviour with particles.
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.
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.
|Position X||Move along the local x-axis.|
|Position Y||Move along the local y-axis.|
|Position Z||Move along the local z-axis.|
|Rotation Heading||Rotate around the local y-axis.|
|Rotation Pitch||Rotate around the local x-axis.|
|Rotation Bank||Rotate around the local z-axis.|
|Scale X||Scale along the local x-axis.|
|Scale Y||Scale along the local y-axis.|
|Scale Z||Scale along the local z-axis.|
Toggle which transform channels should be inherited from the parent node. By default, all transforms will be inherited.
|Position X||Toggle inheritance of the X Position from the parent.|
|Position Y||Toggle inheritance of the Y Position from the parent.|
|Position Z||Toggle inheritance of the Z Position from the parent.|
|Rotation Heading||Toggle inheritance of the Rotation Heading from the parent.|
|Rotation Pitch||Toggle inheritance of the Rotation Pitch from the parent.|
|Rotation Bank||Toggle inheritance of the Rotation Bank from the parent.|
|Scale X||Toggle inheritance of the X Scale from the parent.|
|Scale Y||Toggle inheritance of the Y Scale from the parent.|
|Scale Z||Toggle inheritance of the Z Scale from the parent.|
|World Position Only||Inherit the world position from the parent only, rotation and scale will be ignored. Overrides above properties.|
|Inherit Time||Toggle inheritance of time from the parent.|
These properties control the core behaviours of the node.
|Cell Size||The area around each particle that resists other particles from getting within a certain distance.|
|Weight||How strong an effect has on the particles.|
|Goal Seeking||How much particles will want to move towards the goal input.|
|Min Goal Seek Threshold||The minimum weighting that will be applied to the goal seeking behaviour.|
|Max Goal Seek Threshold||The maximum weighting that will be applied to the goal seeking behaviour.|
|Avoidance||How much particles attempt to avoid each other.|
|Cohesion||How much the particles try to stay close to each other.|
|Alignment||How much the particles try to move in the same direction.|
|Cohesion Radius||Distance at which the particles can see others when determining cohesion.|
|Avoidance Radius||Distance at which the particles can see others when determining avoidance.|
|Visibility Angle||The field of view angle at which particles can see others.|
|Rotation Limit||The maximum rate at which particles can change direction.|
|Max Speed||Maximum speed the particles can move at.|
|Min Speed||Minimum speed the particles can move at.|
|Slowdown At Goal Distance||Distance from the goal that particles begin to slow down.|
|Goal Movement Weight||How much the goal movement affects the flock movement.|
|Kinect Motion Threshold||Threshold for which movement from the Kinect will be followed.|
|Mesh Goal Seeking||The weighting for the mesh goals.|
|Null Goal Seeking||The weighting for the transform goals.|
|Life Effect Coeffs||How 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 Resolution||The resolution of the underlying neighbour search grid.|
|Limit to 2D||Limits the affectors functionality to only its x and y plane.|
|Particle Goal Allocation Mode||Choose how a particle decides which goal to move towards.
|Flock Goal Nodes||Nodes input will be used as the goals for the flock effect.||Null|
|Grid Transform||Used to control the size of the underlying grid used for neighbourhood searches.||Bounding Box|
|Obstacle Nodes||These nodes will be avoided by the flock effect||3D Object|
|Kinect Skeleton||A skeleton generated from a kinect.||Kinect2 Skeleton|
|Affected Emitters||Choose which particle emitters can be affected by the affector.||Primitive Emitter|
|Procedural Falloff||Use the distance field from a procedural system to vary how strong the affector is.||Procedural Root|
|Transform Modifier||Apply the transforms of another node to this node.||Null|
|Target Node||Modifiy the rotations of the node to always direct the z axis towards the input.||Null|
|Local Transform Override||Apply the transforms of another node to this node, relative to its parent.||Null|