Slope
Detect edges and compute slope gradients from images.
What it does
Slope measures how quickly brightness changes from pixel to pixel and turns that change into colour. Method picks the operator: Sobel for the best quality, Prewitt for a faster pass, Laplacian for edges that favour no direction. Output picks what is packed: the default Slope mode stores horizontal change, vertical change, edge strength and edge angle together in one image, or isolate Magnitude (edge strength as grey), Direction (edge angle as colour), or a single X or Y gradient.
Slope also reads a Volume, tracing the same gradient in three dimensions, where Direction packs magnitude, azimuth and elevation instead of a flat angle. Fed a 3D scene rather than an image, it renders the scene's depth, normals or object silhouettes first and finds edges in that.
When to use it
A hand-drawn or engraved edge look: feed the Slope or Direction output into a Colour Correct or Gradient step.
Building a normal map from a height or noise image, using the packed Slope output as raw material.
Outline or silhouette detection on a 3D scene: wire Geometry in and choose a Source of Depth, Normal or Object ID instead of Color.
Edge strength on its own as a mask: use Magnitude and raise Threshold to cut weak, noisy edges.
| Parameter | Type | Default |
|---|---|---|
content_in | OneOf([FieldOf(Color), FieldOf(Volume), Collection]) | — |
camera | OneOf([Camera3D]) | — |
source | String | "Color" |
method | String | "Sobel" |
output | String | "Slope" |
strength | Number | 1 |
threshold | Number | 0 |
invert | Boolean | false |
depth_weight | Number | 1 |
normal_weight | Number | 1 |
id_weight | Number | 1 |
spatial_strength | Field | — |
Gotchas
Threshold affects Magnitude mode only. It is ignored everywhere else, including the default Slope output.
The Camera and Source controls appear only once a 3D scene is wired in. With an image input they stay hidden and Slope reads the image directly.
Invert flips black and white in every output mode, not only Magnitude, so it gives light edges on a dark background or the reverse.
Worked example
Add a Slope node and wire an image into it. Leave Method on Sobel and Output on Slope for the default packed result.
Switch Output to Magnitude to isolate edge strength, then raise Threshold to drop faint, noisy edges.
Turn on Invert for light edges on a dark background.
To trace edges on a 3D scene instead, wire a Geometry input in and pick a Source such as Normal or Object ID for a clean silhouette pass.