Documentation / Node reference / code nodes

code/SDFTube

The distance to a cylinder or cone with flat caps.

Sdf3d

Returns the signed distance from a sampled position to a tube whose axis runs along Y and whose ends are flat: a cylinder by default, a cone frustum when the bottom gets its own radius, and a true cone when that radius is 0. The twin of geo/SDFTube, for use inside a geo/SDFBuilder sub-network where the distance can be combined with anything else the CODE library computes. The params match the geo node's, so moving a shape between a graph and a builder needs no relearning.

Parameters

Name Type What it does
useBottomRadius Bool Give the bottom its own radius: different from the top makes a cone frustum, 0 makes a cone.
P Vector3 Position to sample the field at. Left unwired it reads the builder's own sample position.
t Vector3 Tube center.
height Float Full length along the axis: the tube spans half of it above and below the center.
radiusTop Float Radius of the top cap. Also the radius of the whole tube unless the bottom gets its own.
radiusBottom Float Radius of the bottom cap, read only when useBottomRadius is on.

See also

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.