Operations on 3D vectors (positions, directions, velocities): add, scale, normalize, cross, dot, distance.
What it is for
For building your own forces and fields: the direction from each particle to a point, the distance to a centre, a velocity turned sideways. Used with Particle Info and Vector to Flow.
How it works
The node applies the chosen Operation to the vectors A and B. Vector carries the resulting vector and Length its length. Dot Product and Distance give a single number: Length carries it, and Vector repeats it on X, Y and Z. The node's title shows the operation. In a chain that feeds a force, the node is computed for each particle, so a per-particle source upstream (Particle Info, Noise) gives a per-particle result. In the inputs read once for the whole system (Time Scale, Appearance, effects) it gives one number, and per-particle sources count as 0 there.
Connections
Plug vectors into A and B: Particle Info > Position or Velocity, a Combine XYZ, a Noise > Color, or type them. The Vector output goes into a vector input (a force's Center or Axis, the Vector of a Vector to Flow); the Length output goes into any number input, often through a Map Range.
Settings
| Setting | What it does | Default |
|---|---|---|
| A | First vector. Normalize uses only this one. | 0, 0, 0 |
| B | Second vector. Scale uses only its X as the multiplier; Normalize ignores it. | 0, 0, 0 |
| Operation | Add: A + B. Subtract: A - B (the arrow that goes from B to A). Multiply: X by X, Y by Y, Z by Z. Scale: A multiplied by the X of B. Normalize: A brought to a length of 1, keeping its direction (a zero vector stays zero). Cross: a vector at right angles to both A and B. Dot Product: a number that tells how much A and B point the same way (0 when they are at right angles). Distance: the distance between the points A and B.
|
Outputs
Vector, Length
Tips
- Custom attraction: Subtract with a target point in A and Particle Info > Position in B, then into Vector to Flow. Each particle moves towards the point.
- Falloff by distance: Distance between Position and a centre, then Map Range (near = 1, far = 0), into the Strength of a force. The force then acts only near the centre.
- Cross of an axis (for example 0, 0, 1) with the direction to the centre gives a sideways direction: the base of a hand-made swirl.