code/SDFSample geo/SDFBuilder
Documentation / Node reference / code nodes
code/SDFSample
Reads the field wired into this geo/SDFBuilder, at any position.
Sdf3d
A geo/SDFBuilder with nothing on its inputs authors a field from scratch. Wire a field into it and this node hands that field to the sub-network, so the builder MODIFIES it instead.
Read it at the sample position and add to it to displace the surface. Read it at a moved position to warp the shape. Combine it with a primitive through code/SDFBoolean to blend. The position input is what tells those apart: same node, different place to read.
The builder has four inputs, and the input index picks which one this node reads. Read two of them at the same position and mix the distances to morph one shape into the other. An input holding several SDF objects reads as their union.
It only works inside a geo/SDFBuilder, and only when the input it reads is wired. Anywhere else it reports an error rather than a distance.
Parameters
| Name | Type | What it does |
|---|---|---|
| P | Vector3 | Where to read the input field. Left unwired it reads the builder's own sample position, which is the identity: the builder passes the input straight through. |
| inputIndex | UInt8 | Which of the builder's inputs to read, 0 to 3. Input 0 is the one whose objects the builder modifies one by one; the others are read whole, wherever this node asks. |
Examples
Scenes you can open in the editor that teach this node.
code/SDFSample geo/SDFBuilder
See also
- geo/SDFBuilder
- code/Globals
- code/Output
- code/Noise
- 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.