VIDEOMONTAZHERDAVINCI RESOLVE · VIDEO · AI

FUSION · NODE REFERENCE

pFlock

Neighbor-aware flock and swarm behavior

pFlock makes particles react to neighbors: Flock Number defines the local group, Follow coordinates motion, Attract pulls distant particles back, Repel separates close particles, and Minimum/Maximum Space defines the preferred spacing band.

ParticlesAdvanced

pFlock

Overview

What pFlock does

pFlock is a neighbor-aware Fusion particle modifier. Unlike pDirectionalForce, which adds one shared directional field, pFlock evaluates other particles around each affected particle to create flock, swarm, school or colony behavior.

The core idea uses two competing goals: remain close enough to other particles while also maintaining a minimum separation. Balancing those goals produces organized motion without hand-authoring a path for every particle.

Flock Number defines how many other particles an affected particle attempts to consider or follow. Higher values create more visible clumping and larger apparent groups. It is not the total particle count and it does not replace pEmitter Number.

Follow Strength controls the desire to follow other particles. Higher values make group motion more energetic and coordinated; lower values make it easier for individual particles to break away.

Attract Strength acts when a particle drifts farther from neighbors than Maximum Space. It drives the particle back toward the group, and higher values resolve excessive separation more quickly.

Repel Strength acts on the other boundary. When particles get closer than Minimum Space, repulsion attempts to increase the separation. Excessive Repel can shoot particles out of the flock.

Minimum/Maximum Space is the central spacing rule. It defines the distance band particles try to maintain. A narrower band usually reads as more organized; a wider band appears looser and more chaotic.

Follow, Attract and Repel must be tuned in context with Space. Strong Attract with a poorly chosen Maximum can collapse a flock, while strong Repel with an oversized Minimum can tear it apart. Establish spacing first, then increase the strengths.

Use Sets for Calculation is a dedicated pFlock control section, not the same mechanism as Conditions Set Mode. Its Limit to Specified Sets option and Set 1–32 choices define which particle memberships participate in neighbor calculations.

Conditions Set Mode answers a different question: which incoming particles pFlock is allowed to modify. Calculation Sets and Conditions Sets therefore must not be documented as one duplicated filter.

Probability in Conditions is evaluated per particle on each frame. A value of 0.6 does not choose a permanent 60 percent subgroup for the entire lifespan; an eligible particle receives a new chance on subsequent frames.

Age Start/End is normalized particle lifespan rather than timeline frame numbers. This can leave an initial free-flight phase before flocking begins or disable the group behavior near the end of life.

Region Mode and Region spatially gate pFlock. Built-in All, Bezier, Cube, Line, Rectangle and Sphere regions are created inside the node. Bitmap and Mesh obtain geometry externally and therefore create a dynamic Region input.

Only the orange Particles input exists by default. Region = Bitmap or Mesh adds a separate green/magenta Region socket. Bitmap accepts a 2D image/selectable channel and Mesh accepts 3D mesh data. This is not a standard blue Effect Mask.

Line Region is useful for diagnosing spatial gating because Start and End provide two XYZ points that can be animated or linked. Rectangle remains a plane without Z depth, while Sphere and Cube provide volumetric regions.

Mesh Region uses the common particle Region controls: Region Type can choose surface versus volume behavior, Winding Rule and Winding Ray Direction help with open meshes, and Limit By ObjectID/ObjectID can isolate an object inside a mesh stream.

The Resolve 21 reference specifically pairs pFlock with pFollow for natural swarms that change direction. pFollow supplies an overall target/spring behavior while pFlock maintains neighbor spacing; a restrained pTurbulence can be added afterward for irregularity.

Flocking is computationally heavier than a simple directional force because particles evaluate neighbors. Start with a low pEmitter Number and modest Flock Number, then raise density only after the behavior is stable.

pFlock output remains particle data. A Bitmap Region does not turn it into an RGBA node. A visible image appears only downstream in pRender, so evaluate the behavior through pRender or a later particle branch.

When to use it

  • Bird flocks, fish schools, insect swarms and abstract digital clouds

  • Coordinated glowing dots without animating every particle by hand

  • Organic clusters around a moving target when combined with pFollow

  • Naturalized swarm motion with a restrained pTurbulence downstream

  • Independent flock groups using calculation Sets and Conditions Sets

  • Flocking during only part of particle lifespan with Age Start/End

  • Local flocking inside Sphere/Cube/Rectangle or external Bitmap/Mesh Regions

  • Organizing a particle cloud before later force or collision nodes