VecFlow0.1.0
FlowsOperators

Value Test

Send particles on to another event by one of their values: above a number, below one, between two, or set to yes or no.

VecFlow 0.1.0

Particles whose value is above or below a number (a part of a vector's), or set to yes or no, go along the wire.

Add it
EventAdd OperatorTestsValue Test
Sends on
Along its wire: particles whose value passes the test.
Influence
Yes: it works only on particles whose value is above a half.

When to use it

To branch on anything a particle carries: those tagged hit, those with more than three bounces, those whose heat has dropped below a half. Give them the value with Set Value, then test it here.

Set it up

A flow of 3 events. Bouncing: Birth, Position, Gravity, Collide; Collide: ground, bounce 0.6 sends to Hit. Hit: Set Value, Value Test, Age Test, Gravity, Collide; Value Test: bounces above 2.5 sends to Done; Age Test: at 0 s since entering sends to Bouncing. Done: Colour, Gravity, Collide.BouncingCollide: ground, bounce 0.6Birth: 50 per frame from 1. 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: 50 per frame from 1Position: Spout, box. Place new particles in an object's box, on its surface or inside it, or along a curve (a tube round it)Position: Spout, boxGravity: 9.81 m/s². Pull particles down, or any way you point itGravity: 9.81 m/s²Collide: ground, bounce 0.6. 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: ground, bounce 0.6InHitValue Test: bounces above 2.5Age Test: at 0 s since enteringCollide: groundSet Value: bounces: add 1. Set one of the flow's values (listed under Values in the sidebar), or the particle's own position, velocity, speed, scale, colour, spin or shape, as particles enter the event (or every step, for all in it): to a number, a random one, a chance, something of the particle's, another value, the distance to an object, the time or the flow's gas where it is. Shaders read exported values as attributesSet Value: bounces: add 1Value Test: bounces above 2.5. Particles whose value is above or below a number (a part of a vector's), or set to yes or no, go along the wireValue Test: bounces above 2.5Age Test: at 0 s since entering. Particles reaching an age go along the wireAge Test: at 0 s since enteringGravity: 9.81 m/s². Pull particles down, or any way you point itGravity: 9.81 m/s²Collide: 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: groundInDoneCollide: groundColour: red. Set the colour of particles entering the eventColour: redGravity: 9.81 m/s². Pull particles down, or any way you point itGravity: 9.81 m/s²Collide: 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
Balls that turn red on their third bounce: each hit adds 1 to 'bounces' and sends them straight back, until there are three.BirthForcesPhysicsLooksTests

Here bounces is a Whole Number value starting at 0. The Value Test comes before the Age Test, so the first test to pick a particle out wins.

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.

One of the flow's values (added under Values in the sidebar); Set Value can also set the particle's own position, velocity, speed, scale, color, spin or shape.

All

Which part of the vector to use.

  • All: The whole vector.
  • X
  • Y
  • Z
  • Length: How long it is.

Shown when The value is a Vector.

Above

How the value is compared.

  • Above
  • Below
  • Between

Shown when The value is a Number, Vector or Whole Number.

Above
Keyframable
0.5

Passes when the value is above this.

Shown when The value is a Number, Vector or Whole Number, and Test is Above or Between.

Below
Keyframable
1

Passes when the value is below this.

Shown when The value is a Number, Vector or Whole Number, and Test is Below or Between.

On

Send those set to yes; off sends those set to no.

Shown when The value is a Yes or No.

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.

Numbers and vectors

A Number or Whole Number is tested Above a number, Below one, or Between two. A Vector is tested by one Part: X, Y, Z or its length. So with a vector value set from velocity, Z below -5 picks those falling faster than 5 m/s.

Yes or No

A Yes or No is tested by Is Yes: on sends those set to yes, off those set to no.

The wire

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

Works with

  • Set Value above it in the stack, or in an event before: the test sees what it set.
  • Influence: weighed by another value, only particles whose value is above a half are tested.

Problems you may see

Error

event: operator: 'value' is a vector: pick a Part of it to test

Error

event: operator: nothing is above number and below number

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

On this page