Compare
Turns a varying value into a yes or no, for selecting part of a surface.
threshold, select, mask, greater than, less than, cutoff, if- Category
- Fields
- Outputs
- field
- Runs live in
- Godot, Roblox
Feed it something that changes across a surface, such as a height or a noise, and set a threshold. Everything above it comes out as 1 and everything below as 0, which is what a selection is.
That is how you say only the top faces, or only the parts above the waterline, or only every third copy. Wire the result into the Selection socket of whatever should act on part of the shape.
Equal never means exactly equal, because numbers that look the same are rarely identical underneath. It matches anything within a small window instead, which is what makes picking one particular copy by its number work at all.
Inputs
| Socket | Type | Wiring |
|---|---|---|
| value | field, optional |
Parameters
| Name | Type | Default | Available when | What it does |
|---|---|---|---|---|
| Operation | greaterThan | lessThan | equal | greaterThan | always | |
| Threshold | number | 1 | always | |
| Epsilon | number | 0.001 | Operation is equal |
1 of these 3 parameters only apply in some settings. The Available when column says which.
Watch out
A selection that comes out empty usually means the threshold is outside the range of the values feeding it. Check what the field actually produces before adjusting the threshold.
Built with this node
- My selection does nothingFix
- Select parts of a meshHow-to
- Vary copiesHow-to
- Change Only Some Facesteaches this
- Panel Only the Faces You Pickeduses it
See also
- mapRangeFor a soft edge instead of a hard one. Compare gives a sharp boundary; a remapped field fades.
- deleteGeometryThe most common consumer: remove whatever the comparison selected.