Documentation / Node reference / code nodes

code/SDFTorus

An SDF torus, a whole ring or an arc of one.

Sdf3d

The twin of geo/SDFTorus, for use inside a geo/SDFBuilder sub-network, where every input can be DRIVEN by another node. The arc form reduces to the whole ring at a full turn, so the toggle is not what makes a whole torus correct: it is what keeps one cheap, since the arc costs a branch and a longer expression on every march step.

Parameters

Name Type What it does
open Bool Sweep an arc instead of a whole ring. A whole ring is the cheaper field, so leave this off unless the arc is wanted.
P Vector3 Position to measure from. Left unwired it reads the builder's own sample position.
t Vector3 Where the torus sits.
R Float Ring radius: from the center to the middle of the tube.
r Float Tube radius.
angle Float Swept angle of the arc, in DEGREES, read only when the ring is open. The arc is centered on +Z, so the gap faces -Z. The snippet wants the half aperture as a sine and a cosine, and that conversion rides the generated code, so the angle can be driven from an input.

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.