Creates a black-and-white mask from an ID map, selecting every cell whose ID matches a chosen value or falls within a range of values.
When to Use
- Isolating a region: Pick out one material, biome, or region so it can drive a blend, a texture, or any other masked effect.
- Groups of labels: Use Range mode to grab a group of related labels at once, such as all the rock types if they are numbered consecutively.
What is an ID map?
An ID map is a grid where each cell holds a whole-number label instead of a height: for example 1 for grass, 2 for rock, 3 for sand. Unlike a heightfield, the numbers are categories, not amounts, so they are never blended or smoothed. ID maps come from a File Input set to the ID Map type, from the Cell ID output of Crystallize with Cell ID Type set to Integer ID Map, or from converting a heightfield with ID Convert.
How to Use
Connect an ID map to the ID Map input and set the ID you want. The output is white where the ID matches and black everywhere else.
- Bring in an ID map, for example a biome or material map with a File Input set to Type: ID Map
- Connect it to the ID Map input of Select by ID
- Set Target ID to the label you want to isolate
- Use the mask output to drive a texture blend, a Combiner mask, or the mask input of a filter so the effect applies only to that region
Inputs
| Port | Type | Required | Description |
|---|---|---|---|
| ID Map | ID map (byte or integer grid) | Required | The labeled map to select from |
Outputs
| Port | Type | Description |
|---|---|---|
| Primary Output | Heightfield (mask) | White (1) where the ID matches, black (0) everywhere else, at the same resolution as the ID map |
Parameters
Match
Chooses how cells are selected.
- Default: Equals
- Options:
- Equals: Selects cells whose ID is exactly the Target ID
- Range: Selects cells whose ID is between Min ID and Max ID, including both ends
Target ID
The ID to select. Visible when Match is Equals.
- Default: 0
- Range: a number field you can scrub from 0 to 255; larger IDs can be typed directly for integer ID maps
Min ID
The lowest ID included in the selection. Visible when Match is Range.
- Default: 0
- Range: a number field you can scrub from 0 to 255; larger IDs can be typed directly
Max ID
The highest ID included in the selection. Visible when Match is Range.
- Default: 255
- Range: a number field you can scrub from 0 to 255; larger IDs can be typed directly
If Min ID is greater than Max ID, the two are swapped, so the range still selects the IDs between them.
Tips and Tricks
- The mask has hard, pixel-sharp edges because IDs are matched exactly. Run it through a Blur if you need a soft transition between regions.
- To select several unrelated IDs, use one Select by ID per ID and combine the masks with a Combiner set to Add.
- The default Target ID is 0, and in Range mode the defaults (0 to 255) select every byte ID, so the first result you see may be all black or all white until you set the IDs you want.