Documentation / Node reference / code nodes
code/SDFExtrude
Turns a 2D distance into a 3D one by thickening it along Z.
Sdf3d
Takes the distance to a shape drawn in the XY plane and returns the distance to that shape given a thickness along Z, with flat ends. Wire a 2D primitive's distance into `d2`, feeding that primitive the XY of the sample position, and this returns the solid. The twin of geo/SDFExtrude, for use inside a geo/SDFBuilder sub-network. The result is an exact distance wherever the 2D one is, which is what makes an extruded profile a better field than a prism approximation of the same solid.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector3 | Position to sample the field at. Only its Z is read here; the XY belongs to whatever 2D shape feeds `d2`. Left unwired it reads the builder's own sample position. |
| d2 | Float | Distance to the 2D shape, in its own plane. |
| height | Float | Full thickness along Z: the solid spans half of it either side of the plane. |
See also
- geo/SDFExtrude
- code/SDFRevolve
- code/SDFCircle2D
- code/SDFBoolean
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.