VecFlow0.1.0
FlowsOperators

Distance Test

Send particles on to another event when they're nearer to an object, or farther from it, than a distance.

VecFlow 0.1.0

Particles nearer to or farther from an object than a distance go along the wire.

Add it
EventAdd OperatorTestsDistance Test
Sends on
Along its wire: particles nearer to (or farther from) the object than the distance.
Influence
Yes: it works only on particles whose value is above a half.

When to use it

  • Nearer than: something passing sets particles off: a rake through leaves, a hand through a swarm, a car through dust.
  • Farther than: particles that stray too far, to remove them or bring them back.

Set it up

A flow of 2 events. Resting: Birth, Position, Pin, Distance Test; Distance Test: nearer than 0.4 m to Rake sends to Blown. Blown: Speed, Gravity, Drag, Turbulence, Collide.RestingDistance Test: nearer than 0.4 m…Birth: 300 all at once. Make new particles: some every frame, all at once, one on each vertex of an object's mesh (for cloth and ropes: bind them with Bind, Mesh Edges), one on each piece of it (to smash: glue them with Bind, Pieces), or the event's Liquid filling itBirth: 300 all at oncePosition: Lawn, surface. Place new particles in an object's box, on its surface or inside it, or along a curve (a tube round it)Position: Lawn, surfacePin: hold still. Hold particles still, or move them with an object. Bound and bumping particles give way to them. Kinematic rigid bodies move and turn with the objectPin: hold stillDistance Test: nearer than 0.4 m to Rake. Particles nearer to or farther from an object than a distance go along the wireDistance Test: nearer than 0.4 m…InBlownCollide: groundSpeed: 2 m/s up, spread 1.5. Set the speed of particles entering the event, along a direction (an object's own axes when given), or add it to how they comeSpeed: 2 m/s up, spread 1.5Gravity: 9.81 m/s². Pull particles down, or any way you point itGravity: 9.81 m/s²Drag: 2. Slow particles to the speed of the air, which moves with the windDrag: 2Turbulence: 2. Push particles around in swirlsTurbulence: 2Collide: ground. Bounce off an object, a collection's objects or the ground, friction slowing their sliding and their spin where they touch. The ones that hit go along the wireCollide: groundIn
Leaves on a lawn, still until the rake passes within 0.4 m: then they're tossed up and drift down again.BirthForcesPhysicsLooksTests

Settings

As the flow editor’s sidebar shows them. Changing any of them marks the bake old; those marked Keyframable can also change through a bake.

None

The object this operator works with.

Origin

What the distance is measured to.

  • Origin: The object's origin.
  • Surface: The nearest point of the object's surface.
On

Send the nearer ones; off sends the farther ones.

Distance
Keyframable
1 m0 to 20

How far: to the object for a test, between particles for a bind, or along the ray for a raycast.

InfluenceEmpty

One of the flow’s number values, to weigh it by, particle by particle. Empty for all of it, on all of them. See Influence.

To

  • Origin: the distance to the object's origin, wherever it goes. Any object will do, an empty too.
  • Surface: the distance to the nearest point of its surface, as it moves and deforms. It needs an object with a surface: a mesh, curve, text and the like.

Distances are measured in the world, so a scaled object measures true. The object is where it is halfway through each substep.

With Nearer Than on it sends the nearer ones; off, the farther ones.

The wire

Not wired, a Distance Test does nothing: particles stay. The first test in the stack that picks a particle out wins.

Works with

  • Delete, in the event it sends to, for particles that stray too far.
  • Set Value From Distance gives each particle its distance as a number, to weigh a force by.
  • Influence: weighed by a value, only particles whose value is above a half are tested.

Problems you may see

Error

event: operator: 'object' has no surface

Errors stop a bake; warnings don’t. Every message is on the Messages page.

On this page