Harmonic Field

Compute smooth harmonic fields from pinned boundary values on meshes.

What it does

Harmonic Field builds a smooth scalar field from up to three pins placed in space. Each pin has a position, a value and an optional influence radius.

The field blends between the pins, so the value changes smoothly with distance from each one, and settles to Boundary Value everywhere the pins do not reach. A radius keeps a pin's influence local; at 0 the pin blends across the whole field. The output is a scalar field. Wire it into Sample Field, Displace, or Gradient Of to turn the pin layout into a driving value, a deformation, or a direction.

When to use it

ParameterTypeDefaultWhat it does
boundary_valueNumber0Value assigned to the domain boundary (outside all pins)
resolutionNumber128Solver grid resolution — higher = more accurate but slower
pin_1_positionVec3(0, 0, 0)Position of pin 1 in world space (X, Y, Z)
pin_1_valueNumber1Scalar value at pin 1
pin_1_radiusNumber0Influence radius of pin 1 (0 = single cell)
pin_2_positionVec3(100, 0, 0)Position of pin 2 in world space (X, Y, Z)
pin_2_valueNumber0Scalar value at pin 2
pin_2_radiusNumber0Influence radius of pin 2 (0 = single cell)
pin_3_positionVec3(50, 100, 0)Position of pin 3 in world space (X, Y, Z)
pin_3_valueNumber0Scalar value at pin 3 (set to boundary_value to effectively disable)
pin_3_radiusNumber0Influence radius of pin 3 (0 = single cell)
rasterizeBooleanfalseEagerly bake field to a GPU raster texture at the specified resolution
raster_widthNumber512Raster output width in pixels
raster_heightNumber512Raster output height in pixels

Gotchas

Pin 3 is optional. A value equal to Boundary Value counts as no pin and drops it from the blend.

A radius above 0 keeps a pin's effect local. At radius 0 a pin's influence reaches across the entire field, which can wash out the other pins if their values differ sharply.

Resolution, Bake Field to Image, and the raster width/height controls are not yet wired to the output. The field is computed analytically at whatever resolution the downstream node samples it, so changing these currently has no effect. Pin positions, values and radii shape the result.

Worked example

  1. Add a Harmonic Field. Move Pin 1 and Pin 2 to opposite sides of your scene and set contrasting values (e.g. 0 and 1).

  2. Give each pin a radius to keep its influence local, or leave radius at 0 for a broad blend across the whole field.

  3. Enable Pin 3 by giving it a value different from Boundary Value, and position it to pull the blend toward a third point.

  4. Wire the output into a Sample Field or Displace node.

See also

Vector Field · Derive · SDF · Scalar fields