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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Vector | vec | [0.25, 0.25, 0] |
Outputs: The distance to the rectangle edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Vector | vec:≥0 | [0.5, 0.5, 0.5] |
| Frame Thickness | Number | ≥0 | 0.1 |
Outputs: The distance to the frame edges.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Vector | vec:≥0 | [0.25, 0.25, 0.25] |
Outputs: The distance to the box surface. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Major Radius | Number | any | 0.5 |
| Minor Radius | Number | any | 0.1 |
| Angle (radians) | Number | any | 1.5708 |
Outputs: The distance to the arc surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 1 |
| Radius | Number | any | 0.25 |
Outputs: The distance to the capsule surface, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
Outputs: The distance to the circle edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 1 |
| Base Radius | Number | any | 0.5 |
Outputs: The distance to the cone surface, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Cylinder SDF
Creates a cylinder standing upright along the Y axis.
Inputs: Position, height, and radius.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 1 |
| Radius | Number | any | 0.5 |
Outputs: The distance to the cylinder surface. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Vector | vec | [0.5, 0.3, 0.2] |
Outputs: The distance to the ellipsoid surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Gyroid SDF
Creates a wavy 3D lattice that repeats infinitely.
Inputs: Position, wall thickness, and pattern scale.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Thickness | Number | any | 0.2 |
| Scale | Number | any | 6.5 |
Outputs: The distance to the lattice surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.5 |
Outputs: The distance to the heart outline, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
Outputs: The distance to the hexagon edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 0.5 |
| Radius | Number | any | 0.5 |
Outputs: The distance to the prism surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Icosahedron SDF
Creates a 20-sided die shape, a solid with triangular faces.
Inputs: Position and size.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.5 |
Outputs: The distance to the surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| C Parameter | Vector | vec | [-0.4, 0.6, 0, 0] |
| Iterations | Number | any | 8 |
| Bailout | Number | any | 2 |
Outputs: The distance to the fractal surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
| Sides | Number | 3+ | 6 |
Outputs: The distance to the polygon edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Octahedron SDF
Creates an 8-sided diamond shape, like two pyramids joined at their bases.
Inputs: Position and size.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.5 |
Outputs: The distance to the octahedron surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Normal | Vector | vec | [0, 1, 0] |
Outputs: The distance to the plane (positive on one side, negative on the other).
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 1 |
| Base Size | Number | any | 0.5 |
Outputs: The distance to the pyramid surface, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Dimensions | Vector | vec:≥0 | [0.5, 0.5, 0.5] |
| Sharpness | Number | 0-1 | 1 |
Outputs: The distance to the surface, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Round Box SDF
Creates a box with rounded corners, like a rounded rectangle in 3D.
Inputs: Position, box dimensions, and corner roundness.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Vector | vec:≥0 | [0.5, 0.5, 0.5] |
| Corner Radius | Number | ≥0 | 0.1 |
Outputs: The distance to the surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 1 |
| Base Radius | Number | any | 0.5 |
| Top Radius | Number | any | 0.1 |
| Roundness | Number | any | 0.05 |
Outputs: The distance to the surface, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Rounded Cylinder SDF
Creates a cylinder with rounded edges at the top and bottom, like a pill.
Inputs: Position, radius, height, and roundness.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 1 |
| Radius | Number | any | 0.5 |
| Roundness | Number | any | 0.1 |
Outputs: The distance to the surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Point A | Vector | vec | [-0.3, 0, 0] |
| Point B | Vector | vec | [0.3, 0, 0] |
| Thickness | Number | any | 0.1 |
Outputs: The distance to the line edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.5 |
Outputs: The distance to the sphere surface. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.3 |
| Inner Ratio | Number | 0-1 | 0.45 |
| Points | Number | 3+ | 5 |
Outputs: The distance to the star edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.7 |
Outputs: The distance to the tetrahedron surface, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Major Radius | Number | any | 0.5 |
| Minor Radius | Number | any | 0.1 |
Outputs: The distance to the torus surface. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
Outputs: The distance to the triangle edge, negative inside. Use it with SDF to Solid or SDF to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
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).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Height | Number | any | 0.5 |
| Radius | Number | any | 0.5 |
Outputs: The distance to the prism surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |