SDF Primitive Nodes
Signed Distance Field primitive shapes including boxes, spheres, cylinders, and tori for creating 3D spatial effects.
Signed Distance Field primitive shapes including boxes, spheres, cylinders, and tori for creating 3D spatial effects.
This category contains 30 nodes.
Nodes
Box 2D SDF
Creates a flat rectangle in the XY plane. The Z axis is ignored, so the shape extends as an infinite slab through depth.
Inputs: Position (usually from Pixel Position, only X and Y are read) and size (half-width in X, half-height in Y; Z of Size is ignored).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Vector | vec | [0.25, 0.25, 0] |
Outputs: Distance to the rectangle edge, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Box Frame SDF
Creates a hollow box frame shape - just the edges without the 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: Distance to the frame edges.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Box SDF
Creates a box/rectangle shape. Size controls how far the box extends in each direction from center.
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: Distance to the box surface. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Capped Torus SDF
Creates a partial ring or arc shape. Like a donut with a section cut out - adjust the angle to control how much 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: Distance to the arc surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Capsule SDF
Creates a capsule standing upright along the Y axis: a cylinder with a hemispherical cap on each end, like a pill. The body is centred on the origin. A height of twice the radius or less leaves 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: Distance to the capsule surface, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Circle 2D SDF
Creates a flat circle in the XY plane. The Z axis is ignored, so the shape extends as an infinite tube through depth. Connect to Solid or Stroke nodes to use in your effect.
Inputs: Position (usually from Pixel Position, only X and Y are read) and radius.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
Outputs: Distance to the circle edge, negative inside. Use with Shape to Solid or Shape 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. The body is centred 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: Distance to the cone surface, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Cylinder SDF
Creates a cylinder shape standing upright (along 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: Distance to the cylinder surface. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Ellipsoid SDF
Creates an egg or stretched sphere shape. Set different radii for X, Y, Z to control the stretching.
Inputs: Position and radii for each axis.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Vector | vec | [0.5, 0.3, 0.2] |
Outputs: Distance to the ellipsoid surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Gyroid SDF
Creates a complex wavy 3D lattice pattern. An organic-looking mesh structure 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: Distance to the lattice surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Heart 2D SDF
Creates a flat heart in the XY plane, centred on the origin with the point facing down. The Z axis is ignored, so the shape extends as an infinite prism through depth.
Inputs: Position (usually from Pixel Position, only X and Y are read) and size (roughly the height of the heart).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.5 |
Outputs: Distance to the heart outline, negative inside. Use with Shape to Solid or Shape 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 Z axis is ignored, so the shape extends as an infinite prism through depth.
Inputs: Position (usually from Pixel Position, only X and Y are read) and radius (distance from the centre to each corner).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
Outputs: Distance to the hexagon edge, negative inside. Use with Shape to Solid or Shape 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 centre 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: Distance to the prism surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Icosahedron SDF
Creates a 20-sided die shape. A geometric solid with triangular faces.
Inputs: Position and size.
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.5 |
Outputs: Distance to the surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Julia Set SDF
Creates a complex fractal shape. Adjust the C parameter to explore different organic-looking 3D fractals.
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: 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 Z axis is ignored, so the shape extends as an infinite prism through depth.
Inputs: Position (usually from Pixel Position, only X and Y are read), radius (distance from the centre 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: Distance to the polygon edge, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Octahedron SDF
Creates a diamond-like 8-sided 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: Distance to the octahedron surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Plane SDF
Creates an infinite flat surface. Useful for dividing space into two halves or creating floors/walls.
Inputs: Position and normal (direction the plane faces).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Normal | Vector | vec | [0, 1, 0] |
Outputs: 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. The body is centred 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 centre 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: Distance to the pyramid surface, negative inside. Use with Shape to Solid or Shape 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, and is extruded along Y with flat ends. The body is centred on the origin.
Inputs: Position, dimensions (the half extent along each axis: centre to corner in X and Z, centre 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: Distance to the surface, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Round Box SDF
Creates a box with smooth 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: 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 centred 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: Distance to the surface, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Rounded Cylinder SDF
Creates a cylinder with smooth rounded edges on top and bottom. Like a pill shape.
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: 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 Z axis is ignored, so the shape extends as an infinite slab through depth.
Inputs: Position (usually from Pixel Position, only X and Y are read), the two endpoints (only their X and Y are read), 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: Distance to the line edge, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Sphere SDF
Creates a sphere shape. Connect to Solid or Stroke nodes to use 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: Distance to the sphere surface. Use with Shape to Solid or Shape 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 Z axis is ignored, so the shape extends as an infinite prism through depth. Inner Ratio controls how deep the notches cut: near 1 the star rounds out into a polygon, near 0 it becomes a spiky asterisk.
Inputs: Position (usually from Pixel Position, only X and Y are read), radius (distance from the centre 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: Distance to the star edge, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Tetrahedron SDF
Creates a regular tetrahedron: a pyramid built from four equal triangles, standing with one corner pointing up along Y and the opposite face lying flat in the XZ plane below it. The body is centred on the origin, so the flat face sits a third of the size below it.
Inputs: Position and size (the distance from the centre to each of the four corners).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Size | Number | any | 0.7 |
Outputs: Distance to the tetrahedron surface, negative inside. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Torus SDF
Creates a donut/ring shape. Major radius is the ring size, minor radius is the tube thickness.
Inputs: Position, major radius (ring size), minor radius (tube thickness).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Major Radius | Number | any | 0.5 |
| Minor Radius | Number | any | 0.1 |
Outputs: Distance to the torus surface. Use with Shape to Solid or Shape to Stroke.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |
Triangle 2D SDF
Creates a flat equilateral triangle in the XY plane, pointing up. The Z axis is ignored, so the shape extends as an infinite prism through depth.
Inputs: Position (usually from Pixel Position, only X and Y are read) and radius (distance from the centre to each corner).
| Name | Type | Range | Default |
|---|---|---|---|
| Position | Vector | vec | [0, 0, 0] |
| Radius | Number | any | 0.25 |
Outputs: Distance to the triangle edge, negative inside. Use with Shape to Solid or Shape 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 centre 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: Distance to the prism surface.
| Name | Type | Range |
|---|---|---|
| Signed Distance | Number | sdf |