ITUR

Vector Math

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

SettingWhat it doesDefault
AFirst vector. Normalize uses only this one.0, 0, 0
BSecond vector. Scale uses only its X as the multiplier; Normalize ignores it.0, 0, 0
OperationAdd: 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.
  • Add
  • Subtract
  • Multiply
  • Scale (B.x)
  • Normalize
  • Cross
  • Dot Product
  • Distance

Outputs

Vector, Length

Tips

See also

Particle InfoVector to FlowCombine XYZMath