Distance

Stores in an attribute how far each vertex is from a point, a line or a sphere.

Outputs

NameTypeDescription
Mesh OutputMeshThe mesh with the distance attribute added.

Inputs

NameTypeDescription
Mesh InputMeshThe mesh to measure.

Parameters

NameTypeDescription
Attribute NameStringThe name the distances are stored under.
ShapeEnumWhat the distance is measured to.Choices: Point, Line, Sphere
CenterVector 3Where the shape is. The point itself, a point on the line, or the center of the sphere.
DirectionVector 3Which way the line runs. Only used by the Line shape.
RadiusFloatThe radius of the sphere. Only used by the Sphere shape.
Shape TransformTransform 3DMoves, turns and scales the shape as a whole.

Distance measures how far every vertex is from a shape and stores the result as an attribute, one number per vertex. On its own it changes nothing visible. Fed into Move it makes a bulge or dent that fades out with distance, and through a material it can color a mesh by how close it is to something.

Point gives the straight distance to the center. Line gives the distance to a line through the center in the given direction, with no ends, so it is the same all along the line. Sphere gives the distance to the surface of the sphere. That one is negative inside the sphere and positive outside, so 0 is exactly on the surface.

The shape transform moves the whole shape, and a transform that scales it unevenly turns the sphere into an egg or the point into an oval field. Connect a Transform 3D to it to animate the shape through the mesh.

Keywords: falloff, field, radius, proximity, mask, gradient, sdf