3dSynth

Docs / Node Sculptor

Open in the interactive docs reader

SDF · Cylinder

Finite cylinder SDF with axis along Z:

d_xy = length(p.xy) - radius
d_z  = |p.z| - height/2
d    = min(max(d_xy, d_z), 0) + length(max(d_xy, 0), max(d_z, 0))

Capped at top and bottom — rays that miss the side wall will still hit the caps.

Node

Interactive preview is available in the interactive reader.

Sockets

center (in)
Vector3. Origin override.
radius (in)
Float.
height (in)
Float.
sdf (out)
SDF.

Parameters

Center
Cylinder origin (midpoint between caps). Default: [0, 0, 0].
Radius
Side-wall radius. Default: 5.
Height
Full height — cylinder spans z ∈ [-height/2, +height/2] around center. Default: 10.

Tips