Skip to main content
Documentation
Node Editor

SDF Primitive Nodes

Signed distance fields for 3D shapes such as boxes, spheres, cylinders, and tori, and for flat 2D shapes such as circles, hexagons, and stars.

This category contains 30 nodes.

Nodes

Box 2D SDF

Creates a flat rectangle in the XY plane. The node ignores the Z axis, so the shape extends as an infinite slab through depth.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y) and size (half-width in X and half-height in Y, with the Z of Size ignored).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeVectorvec[0.25, 0.25, 0]

Outputs: The distance to the rectangle edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Box Frame SDF

Creates a hollow box frame: the edges of a box without its faces, like a wireframe cube.

Inputs: Position, box dimensions, and edge thickness.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeVectorvec:≥0[0.5, 0.5, 0.5]
Frame ThicknessNumber≥00.1

Outputs: The distance to the frame edges.

NameTypeRange
Signed DistanceNumbersdf

Box SDF

Creates a box. Size sets how far the box extends from its center in each direction.

Inputs: Position (usually from Pixel Position) and size (half-width in X, Y, Z).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeVectorvec:≥0[0.25, 0.25, 0.25]

Outputs: The distance to the box surface. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Capped Torus SDF

Creates a partial ring or arc, like a donut with a section cut out. The arc angle sets how much of the ring is visible.

Inputs: Position, ring size, tube thickness, and arc angle.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
Major RadiusNumberany0.5
Minor RadiusNumberany0.1
Angle (radians)Numberany1.5708

Outputs: The distance to the arc surface.

NameTypeRange
Signed DistanceNumbersdf

Capsule SDF

Creates a capsule standing upright along the Y axis. It is a cylinder with a hemispherical cap on each end, like a pill. Its body is centered on the origin. A height of twice the radius or less gives a sphere.

Inputs: Position, height (the full extent along Y, from the tip of one cap to the tip of the other), and radius (the radius of the cylinder, and of both caps).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany1
RadiusNumberany0.25

Outputs: The distance to the capsule surface, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Circle 2D SDF

Creates a flat circle in the XY plane. The node ignores the Z axis, so the shape extends as an infinite tube through depth. Connect it to a Solid or Stroke node to use it in your effect.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y) and radius.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusNumberany0.25

Outputs: The distance to the circle edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Cone SDF

Creates a cone standing upright along the Y axis. The circular base lies flat in the XZ plane and the tip points up. Its body is centered on the origin, so the base sits half the height below it and the tip half the height above.

Inputs: Position, height (the full extent along Y, from base to tip), and radius (the radius of the circular base).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany1
Base RadiusNumberany0.5

Outputs: The distance to the cone surface, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Cylinder SDF

Creates a cylinder standing upright along the Y axis.

Inputs: Position, height, and radius.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany1
RadiusNumberany0.5

Outputs: The distance to the cylinder surface. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Ellipsoid SDF

Creates an egg shape or stretched sphere. Give X, Y, and Z different radii to stretch it.

Inputs: Position and a radius for each axis.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusVectorvec[0.5, 0.3, 0.2]

Outputs: The distance to the ellipsoid surface.

NameTypeRange
Signed DistanceNumbersdf

Gyroid SDF

Creates a wavy 3D lattice that repeats infinitely.

Inputs: Position, wall thickness, and pattern scale.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
ThicknessNumberany0.2
ScaleNumberany6.5

Outputs: The distance to the lattice surface.

NameTypeRange
Signed DistanceNumbersdf

Heart 2D SDF

Creates a flat heart in the XY plane, centered on the origin with the point facing down. The node ignores the Z axis, so the shape extends as an infinite prism through depth.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y) and size (roughly the height of the heart).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeNumberany0.5

Outputs: The distance to the heart outline, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Hexagon 2D SDF

Creates a flat hexagon in the XY plane, with horizontal edges at the top and bottom and corners to the left and right. The node ignores the Z axis, so the shape extends as an infinite prism through depth.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y) and radius (distance from the center to each corner).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusNumberany0.25

Outputs: The distance to the hexagon edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Hexagonal Prism SDF

Creates a 6-sided prism standing upright along the Y axis, like a pencil or a honeycomb cell. The hexagon lies in the XZ plane, with two corners on the X axis and flat edges facing along Z.

Inputs: Position, height (the full extent along Y), and radius (distance from the center of the hexagon to each corner).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany0.5
RadiusNumberany0.5

Outputs: The distance to the prism surface.

NameTypeRange
Signed DistanceNumbersdf

Icosahedron SDF

Creates a 20-sided die shape, a solid with triangular faces.

Inputs: Position and size.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeNumberany0.5

Outputs: The distance to the surface.

NameTypeRange
Signed DistanceNumbersdf

Julia Set SDF

Creates a 3D fractal shape. Change the C parameter to get a different fractal.

Inputs: Position, detail level (iterations), and shape parameter.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
C ParameterVectorvec[-0.4, 0.6, 0, 0]
IterationsNumberany8
BailoutNumberany2

Outputs: The distance to the fractal surface.

NameTypeRange
Signed DistanceNumbersdf

N-gon 2D SDF

Creates a flat regular polygon in the XY plane: triangle, square, pentagon, hexagon and up. One corner points up. The node ignores the Z axis, so the shape extends as an infinite prism through depth.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y), radius (distance from the center to each corner), and the number of sides (3 or more).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusNumberany0.25
SidesNumber3+6

Outputs: The distance to the polygon edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Octahedron SDF

Creates an 8-sided diamond shape, like two pyramids joined at their bases.

Inputs: Position and size.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeNumberany0.5

Outputs: The distance to the octahedron surface.

NameTypeRange
Signed DistanceNumbersdf

Plane SDF

Creates an infinite flat surface. Use it to divide space into two halves or to build floors and walls.

Inputs: Position and normal (the direction the plane faces).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
NormalVectorvec[0, 1, 0]

Outputs: The distance to the plane (positive on one side, negative on the other).

NameTypeRange
Signed DistanceNumbersdf

Pyramid SDF

Creates a pyramid standing upright along the Y axis. The square base lies flat in the XZ plane, squared to the X and Z axes, and the tip points up. Its body is centered on the origin, so the base sits half the height below it and the tip half the height above.

Inputs: Position, height (the full extent along Y, from base to tip), and base size (the half width of the square base, from its center to the middle of an edge).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany1
Base SizeNumberany0.5

Outputs: The distance to the pyramid surface, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Rhombus SDF

Creates a diamond-shaped column standing upright along the Y axis. The diamond lies in the XZ plane, with a corner on the X axis and a corner on the Z axis. It extends along Y with flat ends, and its body is centered on the origin.

Inputs: Position, dimensions (the half extent along each axis: center to corner in X and Z, center to the flat end in Y), and sharpness (1 for knife-sharp corners, 0 for fully rounded).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
DimensionsVectorvec:≥0[0.5, 0.5, 0.5]
SharpnessNumber0-11

Outputs: The distance to the surface, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Round Box SDF

Creates a box with rounded corners, like a rounded rectangle in 3D.

Inputs: Position, box dimensions, and corner roundness.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeVectorvec:≥0[0.5, 0.5, 0.5]
Corner RadiusNumber≥00.1

Outputs: The distance to the surface.

NameTypeRange
Signed DistanceNumbersdf

Rounded Cone SDF

Creates a tapered cone standing upright along the Y axis, flat at both ends with its two rims rounded off. The base lies in the XZ plane, and the body is centered on the origin. Give the two radii different values for a taper, the same value for a rounded cylinder, or a top radius of zero for a point. Roundness rounds the rims inwards, so each flat end is roundness narrower than the radius given for it.

Inputs: Position, height (the full extent along Y), base radius and top radius (the radii of the cone at its two ends, measured before the rims are rounded), and roundness (how far the fillet reaches, capped at half the height).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany1
Base RadiusNumberany0.5
Top RadiusNumberany0.1
RoundnessNumberany0.05

Outputs: The distance to the surface, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Rounded Cylinder SDF

Creates a cylinder with rounded edges at the top and bottom, like a pill.

Inputs: Position, radius, height, and roundness.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany1
RadiusNumberany0.5
RoundnessNumberany0.1

Outputs: The distance to the surface.

NameTypeRange
Signed DistanceNumbersdf

Segment 2D SDF

Creates a flat capsule between two points in the XY plane: a line with rounded ends. The node ignores the Z axis, so the shape extends as an infinite slab through depth.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y), the two endpoints (the node reads only their X and Y), and thickness (the full width of the line).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
Point AVectorvec[-0.3, 0, 0]
Point BVectorvec[0.3, 0, 0]
ThicknessNumberany0.1

Outputs: The distance to the line edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Sphere SDF

Creates a sphere. Connect it to a Solid or Stroke node to use it in your effect.

Inputs: Position (usually from Pixel Position) and radius (size).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusNumberany0.5

Outputs: The distance to the sphere surface. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Star 2D SDF

Creates a flat star in the XY plane, with one point facing right along the X axis. The node ignores the Z axis, so the shape extends as an infinite prism through depth. Inner Ratio sets how deep the notches cut. Near 1, the star rounds out into a polygon, and near 0, it becomes a spiky asterisk.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y), radius (distance from the center to each outer point), inner ratio (0-1), and the number of points.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusNumberany0.3
Inner RatioNumber0-10.45
PointsNumber3+5

Outputs: The distance to the star edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Tetrahedron SDF

Creates a regular tetrahedron: a pyramid of four equal triangles. It stands with one corner pointing up along Y and the opposite face flat in the XZ plane below it. Its body is centered on the origin, so the flat face sits a third of the size below it.

Inputs: Position and size (the distance from the center to each of the four corners).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
SizeNumberany0.7

Outputs: The distance to the tetrahedron surface, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Torus SDF

Creates a donut or ring. The major radius is the ring size, and the minor radius is the tube thickness.

Inputs: Position, major radius, and minor radius.

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
Major RadiusNumberany0.5
Minor RadiusNumberany0.1

Outputs: The distance to the torus surface. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Triangle 2D SDF

Creates a flat equilateral triangle in the XY plane, pointing up. The node ignores the Z axis, so the shape extends as an infinite prism through depth.

Inputs: Position (usually from Pixel Position, of which the node reads only X and Y) and radius (distance from the center to each corner).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
RadiusNumberany0.25

Outputs: The distance to the triangle edge, negative inside. Use it with SDF to Solid or SDF to Stroke.

NameTypeRange
Signed DistanceNumbersdf

Triangular Prism SDF

Creates a 3-sided prism standing upright along the Y axis, like a Toblerone bar stood on end. The equilateral triangle lies in the XZ plane, with one corner pointing along +Z.

Inputs: Position, height (the full extent along Y), and radius (distance from the center of the triangle to each corner).

NameTypeRangeDefault
PositionVectorvec[0, 0, 0]
HeightNumberany0.5
RadiusNumberany0.5

Outputs: The distance to the prism surface.

NameTypeRange
Signed DistanceNumbersdf