Documentation / Node reference / code nodes
code/SDFImprint
Marks one distance with a second: a raised pad, a recess, a groove or an engraving.
Sdf3d
Input 0 is the SHAPE and input 1 is the TOOL. Only the shape comes out, displaced by `amount` wherever the tool covers it: positive raises a pad, negative sinks a recess, so one signed slider covers both directions. The twin of geo/SDFImprint, for use inside a geo/SDFBuilder sub-network.
The profile decides what the tool leaves behind. RAMP is a graded push with a smoothstep across the band, and it is the one that reads as a stamped or embossed marking. GAIN is the same ramp with one exponent on it. GROOVE cuts a square recess along the tool's surface, TONGUE raises the square pad that fits it, and ENGRAVE cuts a V whose width follows its depth and which therefore reads no width at all.
RAMP and GAIN are not safe distance bounds, so a march that consumes this graph shortens its step for the whole object. Keeping `width` in the same order as `amount` is the cure, and it is also what looks right.
Parameters
| Name | Type | What it does |
|---|---|---|
| profile | UInt8 RAMP · GAIN · GROOVE · TONGUE · ENGRAVE | What the tool leaves behind. RAMP and GAIN push the surface across a graded band, GROOVE and TONGUE cut and raise a square step, ENGRAVE cuts a V. |
| sdf0 | Float | Distance to the SHAPE. This is what comes out, displaced. |
| sdf1 | Float | Distance to the TOOL. It does not come out; it decides where the shape is displaced. |
| amount | Float | How far the tool pushes the shape. Positive raises a pad, negative sinks a recess. |
| width | Float | HALF the band the transition runs over, in the tool's own distance, so the tool's surface sits in the middle of it. Keep it in the same order as the amount, or the march pays for it. |
| gain | Float | The ramp's exponent: 1 is a straight slope, larger is progressively closer to a step, with the band unchanged. |
See also
- geo/SDFImprint
- code/SDFBoolean
- code/SDFSeam
- code/SDFOffset
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.