FUSION · FULL ARTICLE
pFlock
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.
Overview
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
Article screenshots
Inputs & outputs
pFlock accepts a particle stream; Region appears only for Bitmap/Mesh
By default pFlock has one orange Particles input. An additional Region socket is created dynamically only after choosing Region = Bitmap or Mesh; built-in Regions work without an external cable.
Recalculates existing particle motion from neighbors, the spacing band, calculation Sets, Conditions and Region while preserving the Particles stream type.
Inputs
- Particles
Primary particle stream
Receives: Particle data from pEmitter, pImageEmitter, pMerge or another particle modifier/force node.
Inside the node: pFlock analyzes neighboring particles and changes motion for particles that pass Conditions/Region without turning the stream into an image.
Typical sources: pEmitter · pImageEmitter · pMerge · pFollow · pTurbulence
MediaIn and ordinary RGBA video do not connect here. This is the orange particle input.
- Region (Bitmap/Mesh, dynamic)
External spatial Region
Receives: For Bitmap: a 2D image/selectable channel; for Mesh: a 3D mesh.
Inside the node: The socket appears only after Region = Bitmap/Mesh and supplies the external area used for pFlock spatial gating.
Typical sources: Bitmap image source · Shape3D / Merge3D mesh
This is not a permanent Effect Mask. All/Bezier/Cube/Line/Rectangle/Sphere are built-in Regions and need no external cable.
Outputs and destination
Particles
The particle stream after neighbor-based motion changes, Conditions and Region gating.
Next step: pRender · pFollow · pTurbulence · pFriction · pDirectionalForce · another particle node
This is still particle data, not RGBA. The stream must reach pRender for a visible image.
- Particles
- Particle stream after flocking is evaluated for particles that pass Conditions and Region gating. Feed it to pRender for visible RGBA.
Processing order
- The Particles input receives an existing particle stream from pEmitter or another particle node.
- pFlock forms a local neighbor set using Flock Number and can restrict that set with Calculation Sets.
- Minimum/Maximum Space together with Follow/Attract/Repel produce the motion change.
- Conditions filter which incoming particles may be modified; calculation Sets remain a separate neighbor filter.
- Region Mode gates the effect spatially; Bitmap/Mesh can receive external geometry through the dynamic Region input.
- The Particles output passes the updated stream downstream; pRender is required to convert it into an image.
Baseline flock with no Region cable
pEmitter.Particles → pFlock.Particles → pRender.Particles → MediaOut
With Region Mode = Ignore region, no separate Region input is needed: pFlock works on the particle stream using the chosen Conditions and neighbor settings.
pFlock has one default input: Particles. Bitmap/Mesh add a second dynamic Region input; calculation Sets define neighbor membership while Conditions Sets define which particles are modified. Output remains Particles until pRender.
Parameters
pFlock · Inspector reference
Separate four pFlock layers: neighbor behavior itself, Sets that define neighbor-calculation membership, Conditions that choose affected particles, and Region for spatial gating. Calculation Sets and Conditions Sets look similar but solve different problems.
- Flow
- Particles → pFlock → Particles
- Neighbors
- Flock Number · Follow
- Spacing
- Minimum/Maximum · Attract/Repel
- Sets
- calculation membership ≠ Conditions target
- Region
- built-in or dynamic Bitmap/Mesh
- Render
- Particles → pRender → RGBA
Controls · Neighbor behavior
Set Flock Number and the working Space band first, then increase Follow/Attract/Repel. Attract corrects separation beyond Maximum Space; Repel corrects crowding below Minimum Space.
- Random Seed
Controls > Random SeedSets the random seed used by stochastic parts of pFlock. Keep it fixed while comparing Space and strength controls so the result remains reproducible.
Check / distinguish: Change only this control from its default state and compare before/after.
- Reseed
Controls > ReseedGenerates a new Random Seed. Some reference prose calls this Randomize while captured Inspectors may label it Reseed. Change it after the flock balance is stable.
Check / distinguish: Change only this control from its default state and compare before/after.
- Time Lock
Controls > Time LockLocks time-related procedural randomness where supported by the target build. It does not replace Follow/Attract/Repel and is not a Set filter.
Check / distinguish: Change only this control from its default state and compare before/after.
- Flock Number
Controls > Flock NumberSets how many other particles an affected particle attempts to consider or follow. Higher values produce stronger visible clumping and larger local groups. This is not emitter particle count.
Check / distinguish: Start low with a modest pEmitter Number, then increase gradually.
- Follow Strength
Controls > Follow StrengthControls how strongly a particle wants to follow other particles. Higher values make group motion more energetic and coordinated; lower values make breakaways more likely.
Check / distinguish: Inspect the matte in grayscale and change one threshold at a time.
- Attract Strength
Controls > Attract StrengthPulls particles back when they move farther than Maximum Space from neighbors. Higher values correct excessive separation more quickly.
Check / distinguish: If the flock collapses, inspect Maximum Space before simply lowering every force.
- Repel Strength
Controls > Repel StrengthPushes particles apart when they move closer than Minimum Space. Large values separate neighbors faster but can eject particles from the flock.
Check / distinguish: Tune Minimum Space before using extreme Repel.
- Space Minimum / Maximum
Controls > Space Minimum / MaximumDefines the preferred distance band between particles. Below Minimum, repulsion acts; above Maximum, attraction acts. Narrower ranges appear more organized and wider ranges more chaotic.
Check / distinguish: Tune spacing before pushing Follow/Attract/Repel to extremes.
- Flock Number is neighbor count
Controls > Flock NumberFlock Number sets how many neighboring particles an individual particle considers. It does not replace pEmitter Number.
Check / distinguish: Keep pEmitter Number fixed and change only Flock Number while comparing local group size/density.
- Attract uses Maximum Space
Controls > Attract Strength / Maximum SpaceAttract works at the far boundary: when a neighbor is beyond Maximum Space, the force pulls the particle back toward the group.
Check / distinguish: Temporarily set Repel to zero, increase separation, and inspect Attract by itself.
- Repel uses Minimum Space
Controls > Repel Strength / Minimum SpaceRepel works at the near boundary: when particles get closer than Minimum Space, repulsion increases their separation.
Check / distinguish: Temporarily set Attract to zero and test only the Minimum Space response.
- Tune Space before strength
Controls > Space Minimum / MaximumMinimum/Maximum Space define the desired distance band. Strengths are easier to tune after that band is established.
Check / distinguish: Start with a moderate band and low strengths; increase one control at a time.
Controls · Sets · Neighbor calculation Sets
Use Sets for Calculation / Limit to Specified Sets restricts which particle Sets participate in neighbor lookup/calculation. This is not Conditions Set Mode.
- Use Sets for Calculation
Controls · Sets > Use Sets for CalculationInspector section that separates calculation Sets from the ordinary Conditions Set filter. Limit to Specified Sets and the calculation Set checkboxes inside this section define which memberships participate in neighbor calculations.
Check / distinguish: Change only this control from its default state and compare before/after.
- Limit to Specified Sets
Controls · Sets > Limit to Specified SetsRestricts flock neighbor calculation to explicitly selected calculation Sets. This changes who participates in the neighbor calculation; it is separate from Conditions Set Mode, which controls which particles pFlock modifies.
Check / distinguish: Change only this control from its default state and compare before/after.
- Calculation Set 1–32
Controls · Sets > Calculation Set 1–32Particle Sets used as membership for flocking calculation. These checkboxes live in the Use Sets for Calculation section and must not be confused with Conditions Set 1–32.
Check / distinguish: Change only this control from its default state and compare before/after.
- Calculation Sets are neighbor membership
Controls > Use Sets for CalculationThis block filters which particles may count as neighbors during flock calculation. It does not determine which particles pFlock is allowed to modify.
Check / distinguish: Create two Sets in pEmitter and change only Calculation Set selection while keeping Conditions Set Mode fixed.
- Limit to Specified Sets
Controls > Use Sets for Calculation > Limit to Specified SetsThe checkbox enables explicit restriction of calculation membership to the selected Set 1–32 values.
Check / distinguish: Compare the unrestricted state with one selected Set at the same Flock Number.
Conditions · Which particles pFlock affects
Probability, normalized Age and Conditions Set Mode filter the incoming particles whose state pFlock is allowed to modify.
- Probability
Conditions > ProbabilitySets the per-particle, per-frame chance that pFlock is applied. 1.0 affects every eligible particle. Lower values are re-evaluated on subsequent frames rather than selecting one permanent subgroup.
Check / distinguish: Keep Probability at 1 while tuning the baseline flock.
- Age Start / End
Conditions > Age Start / EndLimits pFlock to a normalized range of particle lifespan. 0.0–1.0 covers the whole life. For example, 0.25–1.0 leaves the first 25 percent without flocking.
Check / distinguish: Change only this control from its default state and compare before/after.
- Set Mode
Conditions > Set ModeDetermines which particle Sets the Conditions tab allows pFlock to modify. Ignore Sets does not filter by membership; Affect Specified Sets targets selected memberships; Ignore Specified Sets excludes them. This is not the neighbor-calculation filter.
Check / distinguish: Change only this control from its default state and compare before/after.
- Conditions Set 1–32
Conditions > Conditions Set 1–32Set memberships used by Conditions Set Mode. They determine which incoming particles are affected by pFlock and serve a different role from Calculation Set 1–32.
Check / distinguish: Change only this control from its default state and compare before/after.
- Conditions Sets are affected particles
Conditions > Set Mode / Set 1–32Conditions Set Mode filters the particles whose motion state pFlock changes. This is separate from neighbor membership used for calculation.
Check / distinguish: Hold calculation Sets fixed and change only Conditions Set Mode/Set selection.
- Probability is per particle per frame
Conditions > ProbabilityProbability gives an eligible particle a chance to be processed on each frame, so it should not be read as a permanent percentage of particles for their entire lifespan.
Check / distinguish: Compare several frames rather than one freeze-frame when Probability is below 1.
- Age is normalized
Conditions > Age Start / EndAge Start/End is expressed as a fraction of lifespan. The same range transfers across particles with different lifetimes.
Check / distinguish: Change Lifespan in pEmitter and verify that the flocking window scales with particle life.
Region · Spatial gating
Region Mode decides how the area gates the effect. Built-in Regions need no cable; Bitmap/Mesh create a dynamic Region input and the stream remains particle data until pRender.
- Region Mode
Region > Region ModeDefines how flocking is gated relative to the selected Region. Use it for ignore/inside/intersecting/not-inside/entering/leaving behavior. It is the condition, not the geometry type.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region
Region > RegionSelects All, Bezier, Bitmap, Cube, Line, Mesh, Rectangle or Sphere geometry. Bitmap and Mesh create the dynamic Region socket; the other listed shapes are built into the node.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: All
Region > Region: AllBuilt-in general Region with no external source. It creates no extra socket. Region = All is not the same thing as Region Mode = Ignore region.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: Bezier
Region > Region: BezierBuilt-in 2D Bezier/polyline Region. The shape is authored inside the node and may be animated or linked without an external Bitmap input.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: Bitmap
Region > Region: BitmapRegion driven by an external 2D image or selected channel. Selecting Bitmap creates the dynamic Region input. It is spatial Region data, not a standard Effect Mask.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: Cube
Region > Region: CubeBuilt-in volumetric 3D Cube Region. Useful for local flocking inside or around a volume without an external mesh branch.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: Line
Region > Region: LineLine Region defined by Start and End XYZ points. The endpoints can be positioned, animated or linked to Paths/Trackers and are useful for diagnosing event/spatial Region modes.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: Mesh
Region > Region: MeshRegion driven by external 3D mesh geometry. Selecting Mesh creates the dynamic Region input. Complex meshes use Region Type, winding controls and optional ObjectID filtering.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region: Rectangle
Region > Region: RectangleFlat rectangular Region with no Z depth. It can still be positioned and rotated in 3D space while remaining a plane.
Check / distinguish: Change only this geometry control and compare position, scale and result bounds.
- Region: Sphere
Region > Region: SphereBuilt-in volumetric spherical Region. A convenient first local Region because it needs no external cable.
Check / distinguish: Change only this control from its default state and compare before/after.
- Start Pick
Region > Start PickInteractive control for choosing the Line Region start point. Use the Viewer for quick placement, then refine coordinates numerically if required.
Check / distinguish: Change only this control from its default state and compare before/after.
- Start X / Y / Z Offset
Region > Start X / Y / Z OffsetXYZ coordinates of the Line Region start point. In 3D particle setups, matching the X/Y projection does not guarantee a real intersection if Z is wrong.
Check / distinguish: Change only this control from its default state and compare before/after.
- End Pick
Region > End PickInteractive control for choosing the Line Region end point. Use it with Start Pick for rapid placement, then animate or link the coordinates if needed.
Check / distinguish: Change only this control from its default state and compare before/after.
- End X / Y / Z Offset
Region > End X / Y / Z OffsetXYZ coordinates of the Line Region end point. Animating Start/End changes the spatial gate without changing Follow/Attract/Repel themselves.
Check / distinguish: Change only this control from its default state and compare before/after.
- Region Type (Mesh)
Region > Region Type (Mesh)Chooses whether a Mesh Region uses its surface or interior volume. This matters when flocking should occur only within the volume or at the surface boundary.
Check / distinguish: Change only this control from its default state and compare before/after.
- Winding Rule / Winding Ray Direction
Region > Winding Rule / Winding Ray DirectionControls inside/outside evaluation for complex or open Mesh Regions. A winding ray crosses mesh surfaces and the winding rule helps Resolve determine the interior.
Check / distinguish: Change only this control from its default state and compare before/after.
- Limit By ObjectID / ObjectID
Region > Limit By ObjectID / ObjectIDRestricts a Mesh Region to a specific Object ID. Useful when the connected mesh stream contains several objects but only one should define the flocking Region.
Check / distinguish: Change only this control from its default state and compare before/after.
- No permanent Region socket
Flow > pFlockIn the default topology pFlock has no blue Effect Mask and no permanent Region cable—only the Particles input.
Check / distinguish: Create a fresh pFlock and inspect topology before selecting Bitmap/Mesh Region.
- Bitmap versus Mesh dynamic input
Region > Bitmap / MeshBitmap and Mesh create one additional Region socket but expect different source classes: 2D image/channel versus 3D mesh.
Check / distinguish: Switch Bitmap ↔ Mesh and verify source type and Region behavior rather than relying only on connector color.
- Built-in Regions need no cable
Region > All / Bezier / Cube / Line / Rectangle / SphereThese shapes are generated inside pFlock. Their spatial gating works without an external Region input.
Check / distinguish: Test Sphere/Rectangle with no second input; that is the normal valid topology.
- Mesh surface, volume and ObjectID
Region > MeshMesh Region can distinguish surface/volume, use winding controls and filter ObjectID, which matters with complex 3D geometry.
Check / distinguish: Prove a simple closed mesh first, then add winding/ObjectID restrictions separately.
Before adjusting the node
- By default pFlock has one orange Particles input; there is no permanent Region/Effect Mask socket.
- Bitmap/Mesh Region creates an additional dynamic Region input; built-in All/Bezier/Cube/Line/Rectangle/Sphere need no cable.
- Flock Number is the number of neighboring particles considered by a particle, not the total particle count in the system.
- Set Minimum/Maximum Space before increasing Follow/Attract/Repel, otherwise instability is hard to diagnose.
- Attract acts beyond Maximum Space; Repel acts below Minimum Space.
- Calculation Sets define neighbor membership for calculation, while Conditions Sets define which incoming particles pFlock may modify.
- Probability is evaluated for an eligible particle on each frame; it is not a permanent random subset for the whole lifespan.
- Age Start/End uses normalized particle age over lifespan, not absolute frame numbers.
- Rectangle remains a 2D Region; Cube/Sphere/Mesh provide spatial variants with a Z component.
- pFlock output is still Particles; pRender is required downstream to obtain an image.
Reference documentation
- Blackmagic Design · Fusion Visual Effects
Official Blackmagic learning material for Fusion logic, masks, compositing and core tools.
- Blackmagic Design · DaVinci Resolve support
Current Resolve/Fusion manuals and support material. Exact control names and placement can vary by version.
Examples
Build a stable flocking baseline
Isolate Space, Follow, Attract and Repel without Region/Probability gating and observe neighbor-aware motion before pRender.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1; pFlock topology and controls cross-checked against the Resolve 21 Particle Nodes reference · Free / Studio; exercises use the native particle toolset · Windows target; live Resolve execution not run in this package
1920 × 1080 · 24 fps · 144 frames · Fusion particle simulation rendered through pRender in 2D for the exercise output
- DaVinci Resolve 21+
- Native pEmitter, pFlock and pRender particle nodes
Nodes and connections
EMIT— pEmitter · pEmitterFLOCK— pFlock · pFlockRENDER— pRender · pRenderOUT— MediaOut · MediaOut
| Source | Destination | Data |
|---|---|---|
pEmitter (EMIT)Particles | pFlock (FLOCK)Particles | particles |
pFlock (FLOCK)Particles | pRender (RENDER)Particles | particles |
pRender (RENDER)Image | MediaOut (OUT)Input | image |
Graph output: MediaOut (OUT)
Parameter values
- pEmitter (EMIT) / Controls / Number
2Keep particle density modest while tuning flock behavior.
- pFlock (FLOCK) / Controls / Flock Number
3Use a small neighbor group for a readable first pass.
- pFlock (FLOCK) / Controls / Follow Strength
0.2Introduce visible but controlled tendency to follow neighbors.
- pFlock (FLOCK) / Controls / Attract Strength
0.08Pull particles back when they exceed Maximum Space.
- pFlock (FLOCK) / Controls / Repel Strength
0.08Push particles apart when they fall below Minimum Space.
- pFlock (FLOCK) / Controls / Space Minimum / Maximum
[0.03,0.08]Establish a narrow preferred spacing band before increasing strengths.
- pFlock (FLOCK) / Conditions / Probability
1Apply flocking to every eligible particle during diagnosis.
- pFlock (FLOCK) / Region / Region Mode
"Ignore region"Remove spatial gating from the baseline.
- pRender (RENDER) / Controls / Output Mode
"2D"Explicitly produce an image for MediaOut; pRender initially defaults to 3D.
- pRender (RENDER) / Controls / View [2D]
"Front"The front view shows X/Y motion without perspective distortion.
- pRender (RENDER) / Controls / Kill Particles That Leave the View
falseLeaving the view must not kill particles and change the force comparison.
- pEmitter (EMIT) / Controls / Random Seed
17A fixed seed preserves the same initial simulation for A/B comparisons.
- pEmitter (EMIT) / Controls / Number
2A small stream keeps individual trajectories readable.
- pEmitter (EMIT) / Controls / Lifespan
120A known lifespan relates normalized Age to measurable frames.
- pEmitter (EMIT) / Controls / Lifespan Variance
0Remove death-time variation for the Age comparison.
- pEmitter (EMIT) / Controls > Velocity / Velocity
0.006Nonzero speed keeps a baseline particle in view into late Age: x=−0.35+0.006×114≈0.334 without forces.
- pEmitter (EMIT) / Controls > Velocity / Velocity Variance
0Exclude random variation in initial speed.
- pEmitter (EMIT) / Controls > Velocity / Angle
0Angle=0 defines the initial direction along X.
- pEmitter (EMIT) / Controls > Velocity / Angle Variance
0All particles start in the same direction.
- pEmitter (EMIT) / Region / Region
"Line"A narrow vertical line creates distinguishable parallel trajectories.
- pEmitter (EMIT) / Region > Line / Start X / Y / Z
[-0.35,-0.1,0]Fix the lower birth-region endpoint in particle coordinates.
- pEmitter (EMIT) / Region > Line / End X / Y / Z
[-0.35,0.1,0]Fix the upper line endpoint and keep depth Z at zero.
- pEmitter (EMIT) / Style / Style
"Blob"A small Blob is visible in 2D and requires no external image.
- pEmitter (EMIT) / Style / Size
0.008The size separates neighboring particles at the working resolution.
- pEmitter (EMIT) / Style > Color / Red / Green / Blue / Alpha
[1,0.35,0.05,1]An opaque warm color establishes the visible source stream.
Reproduce the example
- Before tuning the effect, enter this step's EMIT and pRender settings. View the initial EMIT through pRender, then restore the modifier. After each change press pRender Restart and play from frame 0.
Speed, birth region, style, seed and output mode are explicit, so settings inherited from another composition do not affect the test.
Check: With the modifier bypassed, particles travel right from x=−0.35 and MediaOut receives RGBA. Compare frames 12, 24 and 48; for Age also inspect 78, 96 and 114.
- Build pEmitter → pFlock → pRender → MediaOut.
The Flow carries particle data until pRender converts it into a visible image.
Check: Particle-flow connections run to pRender, followed by an image connection to MediaOut.
- Set Space Minimum/Maximum first, then Flock Number.
Space defines the desired distance while Flock Number defines the local neighbor group size.
Check: Particles maintain a readable spacing band instead of immediately clumping or exploding apart.
- Add moderate Follow, Attract and Repel values and compare playback against zero strengths.
This reveals Attract pulling distant neighbors back, Repel separating close neighbors, and Follow increasing coordinated motion.
Check: The flock stays cohesive without collapsing into a single point.
Expected result
- MediaOut (OUT) · frame 96
A moderately cohesive flock with neighbor-aware motion and no violent collapse or explosion; pFlock remains a particle processor before pRender.
Alpha: pFlock does not create RGBA/alpha; final alpha is produced by pRender from the rendered particles.
When the result differs
- Particles collapse into a tight clump.
Cause: Attract is too strong relative to Maximum Space and Repel.
Correction: Check or widen Maximum Space first, then reduce Attract or carefully raise Repel.
- The flock explodes apart.
Cause: Repel is too strong or Minimum Space is too large.
Correction: Reduce Minimum Space/Repel and compare the same playback range again.
References
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion Flow and MediaOut fundamentals used only for the terminal image connection in these exercises.
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Particle Nodes
Particle Nodes > pFlock and Common Controls: particle input, dynamic Bitmap/Mesh Region input, Flock Number, Follow/Attract/Repel, Minimum/Maximum Space, calculation Sets, Conditions and Region behavior.
- Blackmagic Design — DaVinci Resolve 21 Reference Manual
3D Nodes, 3D Light Nodes, Particle Nodes and USD Nodes. The October 21 revision adds explicit initial conditions; native execution remains pending.
Separate calculation Sets, Conditions and Region
Understand three separate pFlock filters: who participates in neighbor calculation, which particles may be modified, and where the node acts spatially.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1; pFlock topology and controls cross-checked against the Resolve 21 Particle Nodes reference · Free / Studio; exercises use the native particle toolset · Windows target; live Resolve execution not run in this package
1920 × 1080 · 24 fps · 144 frames · Fusion particle simulation rendered through pRender in 2D for the exercise output
- DaVinci Resolve 21+
- Native pEmitter, pFlock and pRender particle nodes
Nodes and connections
EMIT— pEmitter · pEmitterFLOCK— pFlock · pFlockRENDER— pRender · pRenderOUT— MediaOut · MediaOutEMIT2— Blue particles · Set 2 · pEmitterPMERGE— Two particle groups · pMerge
| Source | Destination | Data |
|---|---|---|
Two particle groups (PMERGE)Particles | pFlock (FLOCK)Particles | particles |
pFlock (FLOCK)Particles | pRender (RENDER)Particles | particles |
pRender (RENDER)Image | MediaOut (OUT)Input | image |
pEmitter (EMIT)Particles | Two particle groups (PMERGE)Particle1 | particles |
Blue particles · Set 2 (EMIT2)Particles | Two particle groups (PMERGE)Particle2 | particles |
Graph output: MediaOut (OUT)
Parameter values
- pEmitter (EMIT) / Sets / Set 1
trueAssign the emitted particles to a known upstream Set for the exercise.
- pFlock (FLOCK) / Controls / Limit to Specified Sets
trueRestrict neighbor calculation to explicitly selected calculation Sets.
- pFlock (FLOCK) / Controls / Calculation Set 1
trueUse Set 1 as the neighbor-calculation membership.
- pFlock (FLOCK) / Conditions / Set Mode
"Affect Specified Sets"Separately restrict which incoming particles pFlock is allowed to modify.
- pFlock (FLOCK) / Conditions / Set 1
falseLeaders participate in calculation but are not modified by this pFlock.
- pFlock (FLOCK) / Conditions / Probability
1Keep stochastic gating disabled for this structural exercise.
- pFlock (FLOCK) / Region / Region Mode
"When inside region"Enable flocking only inside the chosen built-in Region.
- pFlock (FLOCK) / Region / Region
"Sphere"Use a built-in Sphere so no dynamic Region cable is required.
- pFlock (FLOCK) / Controls / Flock Number
3Keep neighbor count low enough to make the behavior readable.
- pFlock (FLOCK) / Controls / Space Minimum / Maximum
[0.03,0.08]Maintain a controlled spacing band inside the Sphere.
- pRender (RENDER) / Controls / Output Mode
"2D"Explicitly produce an image for MediaOut; pRender initially defaults to 3D.
- pRender (RENDER) / Controls / View [2D]
"Front"The front view shows X/Y motion without perspective distortion.
- pRender (RENDER) / Controls / Kill Particles That Leave the View
falseLeaving the view must not kill particles and change the force comparison.
- pEmitter (EMIT) / Controls / Random Seed
17A fixed seed preserves the same initial simulation for A/B comparisons.
- pEmitter (EMIT) / Controls / Number
2A small stream keeps individual trajectories readable.
- pEmitter (EMIT) / Controls / Lifespan
120A known lifespan relates normalized Age to measurable frames.
- pEmitter (EMIT) / Controls / Lifespan Variance
0Remove death-time variation for the Age comparison.
- pEmitter (EMIT) / Controls > Velocity / Velocity
0.006Nonzero speed keeps a baseline particle in view into late Age: x=−0.35+0.006×114≈0.334 without forces.
- pEmitter (EMIT) / Controls > Velocity / Velocity Variance
0Exclude random variation in initial speed.
- pEmitter (EMIT) / Controls > Velocity / Angle
0Angle=0 defines the initial direction along X.
- pEmitter (EMIT) / Controls > Velocity / Angle Variance
0All particles start in the same direction.
- pEmitter (EMIT) / Region / Region
"Line"A narrow vertical line creates distinguishable parallel trajectories.
- pEmitter (EMIT) / Region > Line / Start X / Y / Z
[-0.35,-0.1,0]Fix the lower birth-region endpoint in particle coordinates.
- pEmitter (EMIT) / Region > Line / End X / Y / Z
[-0.35,0.1,0]Fix the upper line endpoint and keep depth Z at zero.
- pEmitter (EMIT) / Style / Style
"Blob"A small Blob is visible in 2D and requires no external image.
- pEmitter (EMIT) / Style / Size
0.008The size separates neighboring particles at the working resolution.
- pEmitter (EMIT) / Style > Color / Red / Green / Blue / Alpha
[1,0.35,0.05,1]An opaque warm color establishes the visible source stream.
- pFlock (FLOCK) / Region > Sphere / Center X / Y / Z
[0,0,0]The region center lies on the baseline trajectory; it is not the force-center position.
- pFlock (FLOCK) / Region > Sphere / Size
0.6The region covers the source stream into late Age; inspect its Viewer boundary separately from the force center.
- Blue particles · Set 2 (EMIT2) / Controls / Random Seed
17Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls / Number
2Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls / Lifespan
120Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls / Lifespan Variance
0Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls > Velocity / Velocity
0.006Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls > Velocity / Velocity Variance
0Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls > Velocity / Angle
0Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Controls > Velocity / Angle Variance
0Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Region / Region
"Line"Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Region > Line / Start X / Y / Z
[-0.35,-0.1,0]Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Region > Line / End X / Y / Z
[-0.35,0.1,0]Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Style / Style
"Blob"Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Style / Size
0.008Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Style > Color / Red / Green / Blue / Alpha
[1,0.35,0.05,1]Match the second group's initial conditions; override color, position and Set separately below.
- Blue particles · Set 2 (EMIT2) / Region > Line / Start X / Y / Z
[-0.28,-0.04,0]The second group starts close to the leaders.
- Blue particles · Set 2 (EMIT2) / Region > Line / End X / Y / Z
[-0.28,0.04,0]Nearby placement makes neighbor interaction observable.
- Blue particles · Set 2 (EMIT2) / Style > Color / Red / Green / Blue / Alpha
[0.05,0.35,1,1]Blue distinguishes the affected group from the orange leaders.
- Blue particles · Set 2 (EMIT2) / Sets / Set 1
falseBlue particles must not also belong to calculation Set1.
- Blue particles · Set 2 (EMIT2) / Sets / Set 2
trueAssign Set2 to the second incoming group before pFlock.
- pEmitter (EMIT) / Sets / Set 2
falseKeep the orange stream's membership separate.
- pFlock (FLOCK) / Conditions / Set 2
trueConditions permits changes only to blue particles.
- pFlock (FLOCK) / Controls / Follow Strength
0.2Set nonzero following of Set1 neighbors.
- pFlock (FLOCK) / Controls / Attract Strength
0.08Blue particles respond to their distance from the selected neighbors.
- pFlock (FLOCK) / Controls / Repel Strength
0.08Retain the response to neighbors that are too close.
Reproduce the example
- Before tuning the effect, enter this step's EMIT and pRender settings. View the initial EMIT through pRender, then restore the modifier. After each change press pRender Restart and play from frame 0.
Speed, birth region, style, seed and output mode are explicit, so settings inherited from another composition do not affect the test.
Check: With the modifier bypassed, particles travel right from x=−0.35 and MediaOut receives RGBA. Compare frames 12, 24 and 48; for Age also inspect 78, 96 and 114.
- Assign newly emitted particles to Set 1 in pEmitter.
pFlock does not create membership itself; calculation and Conditions Sets must already exist upstream.
Check: Set 1 is assigned in the emitter before the stream reaches pFlock.
- Merge EMIT and EMIT2 through pMerge. EMIT: Set1=On, Set2=Off; EMIT2: Set1=Off, Set2=On. Keep Calculation Set1 in pFlock Controls and select only Set2 in Conditions. Start with Ignore region, then restore Sphere.
Orange particles supply calculation neighbors; only blue particles may be modified, so the two roles are visible on separate groups.
Check: After Restart compare frames 12/24/48. Disable and restore Calculation Set1, then separately clear Conditions Set2. The first comparison removes the selected neighbors; the second prevents modification of the blue stream.
- Set Region Mode to When inside region and Region to Sphere.
Sphere adds a spatial gate without an external Bitmap/Mesh input, isolating the Region role.
Check: Flocking is active only inside the Sphere while the node topology still has one permanent Particles input.
Expected result
- MediaOut (OUT) · frame 96
With the filters enabled, orange Set1 supplies neighbors while pFlock modifies only blue Set2 in the eligible region. Switching calculation and Conditions produces different control states.
Alpha: Region and Sets affect the particle simulation; alpha still appears only after pRender.
When the result differs
- Flocking disappears after enabling Set filters.
Cause: The selected Sets were never assigned upstream in pEmitter/pSpawn/pChangeStyle.
Correction: Assign Set 1 in the emitter first, then enable calculation/Conditions filters.
- Nothing changes inside the Sphere.
Cause: The Sphere does not overlap the actual 3D particle cloud or other Conditions are blocking the particles.
Correction: Temporarily restore Ignore region/Ignore Sets, verify the baseline, then enable one gate at a time.
References
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion Flow and MediaOut fundamentals used only for the terminal image connection in these exercises.
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Particle Nodes
Particle Nodes > pFlock and Common Controls: particle input, dynamic Bitmap/Mesh Region input, Flock Number, Follow/Attract/Repel, Minimum/Maximum Space, calculation Sets, Conditions and Region behavior.
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: pMerge
Particle Nodes > pMerge [pMg]: current-version particle merge node. Exact two-input/no-control/Set-preservation semantics are cross-checked against Blackmagic's published Fusion particle reference.
- Blackmagic Design — DaVinci Resolve 21 Reference Manual
3D Nodes, 3D Light Nodes, Particle Nodes and USD Nodes. The October 21 revision adds explicit initial conditions; native execution remains pending.
Other outlines from the article
Clean digital swarm
A modest pEmitter population feeds pFlock, which maintains spacing and coordinated movement before pRender.
- pEmitter
- pFlock
- pRender
- MediaOut
Flock around a moving target
pFollow supplies the moving target/spring tendency while pFlock maintains neighbor spacing and group behavior.
- pEmitter
- pFollow
- pFlock
- pRender
Organic swarm
A restrained pTurbulence after a stable pFlock breaks mechanical regularity without replacing the spacing rules.
- pEmitter
- pFlock
- pTurbulence
- pRender
Local flock inside a Sphere
Region Mode limits the behavior to a built-in Sphere while particles outside continue their baseline motion.
- pEmitter
- pFlock (Sphere Region)
- pRender
Mistakes
- Showing a permanent blue Region/Mask input on pFlock. The only default input is the orange Particles socket; Bitmap/Mesh Region is dynamic.
- Feeding a normal MediaIn into the Particles input instead of particle data.
- Expecting a visible RGBA result directly from pFlock instead of downstream pRender.
- Treating Flock Number as the total particle count or as a replacement for pEmitter Number.
- Using excessive Attract with a poorly tuned Maximum Space and collapsing the flock.
- Using excessive Repel instead of tuning Minimum Space and blowing the flock apart.
- Adjusting Follow/Attract/Repel before establishing a useful Minimum/Maximum Space band.
- Treating Use Sets for Calculation as identical to Conditions Set Mode.
- Enabling Limit to Specified Sets before the relevant Sets have been assigned upstream.
- Judging flocking on a single frame rather than over playback.
- Starting with thousands of particles and a large Flock Number, then mistaking slow calculation for a node problem.
- Tuning pTurbulence or pFollow at the same time as pFlock and losing attribution for the motion.
- Confusing Region Mode with Region: one is the condition and the other is the geometry.
- Looking for an external Region cable for Sphere/Line/Rectangle; only Bitmap/Mesh create it.
- Ignoring Z placement of Regions and particle motion in a 3D setup.
Tips
- Start with a modest pEmitter Number and small Flock Number so cause and effect remain visible.
- Tune Space first, then Follow, then Attract and Repel.
- A narrow Minimum/Maximum band usually reads as organized; a wider band reads as looser and more chaotic.
- If the flock collapses, inspect Maximum Space and Attract before changing many unrelated controls.
- If the flock explodes, inspect Minimum Space and Repel.
- Keep Probability at 1 and Region Mode at Ignore region while tuning the baseline.
- Use pFollow for the overall target/path tendency and pFlock for neighbor-aware behavior between particles.
- Add light pTurbulence only after pFlock works predictably on its own.
- Calculation Sets are useful when several swarm groups should coexist without treating every group as neighbors.
- Use Conditions Sets separately when pFlock should modify only a subset of the incoming stream.
- Age gating can transition from free flight into flocking or from flocking back to free motion.
- Sphere is a useful first Region because it is volumetric and needs no external input.
- Treat Bitmap/Mesh Region as a dedicated dynamic Region socket, not an Effect Mask.
- For reusable presets, fix the seed and inspect start/mid/end frames in the target Resolve build because flocking depends on time and density.
Workflow order
- Start with a small pEmitter and establish a readable baseline trajectory without pFlock.
- Connect the emitter Particles output to the orange pFlock Particles input.
- Connect pFlock to pRender; the graph carries particle data until pRender produces an image.
- For the first pass use Probability = 1, full Age, Set Mode = Ignore Sets and Region Mode = Ignore region.
- Begin with a small Flock Number so neighbor calculations are easy to read and inexpensive.
- Set Minimum/Maximum Space before increasing the behavior strengths.
- Add a moderate Follow Strength to coordinate local movement.
- Raise Attract only enough to pull separated particles back without collapsing the group.
- Raise Repel only enough to separate close particles without blowing the flock apart.
- Evaluate several dozen frames of playback; a single still frame is a poor flocking diagnostic.
- For independent groups, assign Sets upstream before enabling Limit to Specified Sets in the calculation section.
- Configure Conditions Set Mode separately if pFlock should modify only part of the incoming particle stream.
- Use Age Start/End when flocking should begin or stop during particle lifespan.
- For local behavior, use a built-in Sphere/Rectangle/Line and choose a Region Mode.
- For Bitmap/Mesh, select the Region type first and then connect the dynamic Region socket that appears.
- Add pFollow/pTurbulence and increase emitter density only after the flock is stable.
- Finish by checking the start, middle and end of the timeline and a few seed variants without changing multiple controls at once.
