Skip to content

Node Types

vassvik edited this page Mar 18, 2018 · 14 revisions

There are three categories of nodes available:

  • generators,
  • transformations,
  • compositions.

A generator node takes no input and produces some output, a transformation takes one input and produces one output, and a composition takes two inputs and produces one output.

The node graph contains a set of nodes connected by links and describes how vectors are generated and manipulated. A node graph have to contain at least one generator node as a starting point to be valid. Each node holds a set of vectors used for calculations, which are used as inputs for connected output nodes.

The following section will explain how each node functions in detail.

Generator Nodes

Coil

This node simulates the magnetic field induced by a current going through a wire loop, as described by the Biot-Savart law. In practice this calculates a vector field curling around a closed ring of some size and orientation. The vectors are strong near the ring and fades in strength further away from it.

Parameters

  • Origin: The position of the center of the ring.
  • Orientation: Pitch (X) and roll (Y) rotation angles (in degrees).
  • Radius: The size of the ring, half the diameter.
  • Strength: A scaling factor effecting the relative size of the vectors.

NOTE: Due to the physical nature of the calculations for this node, the arrows themselves might look very large when they overlap with the ring of the coil. This is not a bug. This might be avoided by moving the origin of the ring slightly.

Constant

Sets all the vectors to a the same value. The default value is points along the positive X direction.

Fade

Points vectors away (repelling) or towards (attracting) a line or a point source. A "point fade" is radially symmetric", and a "line fade" is cylindrically symmetric. The strength and direction of a vector is based on the distance from the point or line source and is controlled by the min, max and exponent parameters.

The size of the vectors are

d = min + (max - min)*length(v)^exponent

where v is the position relative to the source. A negative d means it points towards the source, and a positive means it points away from it.

Note: Combine with a Rotate node to get curly fields.

Random

Gives each vector random values in some interval. The random values are sampled from a "background field" where you specify the number of vectors in each direction that is independent of the global vectors. This is done to prevent the random field being dependent on the number of vectors.

Transformation Nodes

Negate

Negates each vector, flipping its direction.

Normalize

Normalizes each vector, making their length 1.

Power

Scales the length of each vector by some exponent. Works similar to the exponent in the fade node.

Rotate

Rotate each vector in-place around some specific axis by some constant angle.

Scale

Scales each vector by some scaling factor, per-axis.

Swizzle

Permutes the components of a vector. For example, Swizzle(1, 0, 2) swaps the X and Y component of the vector, Swizzle(1, 1, 1) sets each component equal to the Y component, etc.

Translate

Adds a constant offset to each vector.

Composition Nodes

Add

Adds the two input vectors.

Cross

Calculates the cross product between the two input vectors.

Divide

Divides the first input by the second input

Multiply

Multiplies the first input by the second input

Select

This node divides the bounding box into two parts by some shape (box, sphere, cylinder, plane) , where the vectors inside the shape is set by the first input and the vectors outside are set by the second input. Optionally you can blend based on the distance from the shape surface.

Subtract

Subtracts the second input from the first input