Skip to main content

Distance Volumes

All distance nodes accept three optional blocks:

  • profile_scale { … } — scale factor applied before the SDF (tapers, squash-and-stretch).
  • profile_offset { … } — linear offset (world units) subtracted from the SDF (grooves, panels).
  • volume { … } — runs only where the (possibly deformed) SDF is ≤ 0, letting you assign materials or patterns.

Same as in shapes we also have these two helper variables (they shadow the shape variables);

  • sdf – the raw signed distance (negative inside, positive outside).
  • inside – convenience alias for -sdf (positive inside, zero on the surface).

Sphere

  • at: centre — default: segment origin (point_at(0)).
  • radius(float): sphere radius — default: 0.5.
Sphere
Loading...
Ready

Simple ball shape.


Box

  • at: centre.
  • size (vec3): half-sizes (x y z) — default: vec3(0.5).
  • rounding (float): edge bevel radius — default: 0.0.
Box
Loading...
Ready

Cuboid with optional bevel.


Capsule

  • from (vec3): axis start.
  • to (vec3): axis end.
  • radius (float): cylinder/hemisphere radius — default: 0.5.
Capsule
Loading...
Ready

Cylinder capped by hemispheres.


Cylinder

  • from (vec3): axis start.
  • to (vec3): axis end.
  • radius (float): cylinder radius.
Cylinder
Loading...
Ready

Flat-capped cylinder.


Cone

  • from (vec3): axis start.
  • to (vec3): axis end.
  • radius1 (float): base half-diameter — default: 0.5.
  • radius2 (float): top half-diameter — default: 0.25.
Cone
Loading...
Ready

Linear taper.


Vesica

  • from (vec3): axis start.
  • to (vec3): axis end.
  • radius (float): lens half-thickness — default: 0.5.
Vesica
Loading...
Ready

Lens / rugby-ball shape.


NgonFrustum

  • from, to (vec3): axis ends.
  • sides (int ≥ 3): number of sides — default: 4.
  • base (float): inscribed radius at from.
  • top (float): inscribed radius at to.
  • phase (float radians): rotation offset — default: 0.
NgonFrustum
Loading...
Ready

Extruded regular N-gon; sides = 4 gives a pyramid frustum.


RectFrustum

  • from, to (vec3): axis ends.
  • base_wh (vec2): width × height at from.
  • top_wh (vec2): width × height at todefault: same as base_wh.
  • angle (float radians): rotation — default: 0.
RectFrustum
Loading...
Ready

Rectangular frustum; equal sizes produce a straight box column.