Height Modes in a Layer Stack
A Heightmap becomes more flexible once more than one Pixel Layer is involved.
At that point, the important question is not only what height a layer contains. It is also how that height should interact with the result below it.
Why This Matters
When several Pixel Layers are stacked in the same Heightmap, each layer contributes to an accumulated result.
Height Mode controls how the current layer affects that accumulated height.
This lets layers do different jobs:
- Replace the height result.
- Leave the height result unchanged.
- Build upward from the result below.
- Cut downward into the result below.
Where Height Mode Applies
Height Mode matters when multiple Pixel Layers are stacked in the same Heightmap.
Each layer is evaluated as part of the layer stack.
The current layer can then decide how its own height affects the accumulated result from the layers below it.
You can change Height Mode in the Inspector.
The Four Height Modes
Foxel supports four Height Modes:
- Set
- Keep
- Add
- Subtract
Set
Set uses the current layer’s height and discards lower height information.
Use this when the current layer should define the result directly instead of combining with what is underneath.
For example, use Set when a layer should establish a new height shape that replaces the previous stacked result.
Keep
Keep ignores the current layer’s height and keeps the accumulated result below.
Use this when the layer should still exist for other reasons, but its height should not change the final stacked result.
For example, a layer may still contribute color or material information while leaving height unchanged.
Add
Add adds the current layer’s height to the result below.
Use this when the layer should build upward on top of the existing relief.
For example, use Add for raised details, ridges, surface buildup, or extra height accents.
Subtract
Subtract subtracts the current layer’s height from the result below.
Use this when the layer should cut into or reduce the accumulated height.
For example, use Subtract for grooves, dents, carved details, or lowered surface areas.
Why Height Modes Are Useful
Height Modes make stacked height workflows more flexible than a single flat height source.
They let each layer decide how it should affect the final height result.
A layer can:
- Replace height with Set.
- Ignore height with Keep.
- Build upward with Add.
- Cut downward with Subtract.
This makes Pixel Layer stacks useful for constructing more complex heightmaps from separate editable parts.
Use 3D Preview To Judge The Result
Height is often easier to understand as relief than as numbers.
Use the 3D preview while testing different Height Modes.
To toggle the 3D view, use View 3D Model or press Shift + Tab.
This makes it easier to see whether a layer is replacing, preserving, raising, or lowering the final result.
What To Remember
- Height Mode matters when several Pixel Layers are stacked.
- The current layer changes the accumulated result below it.
- Set replaces lower height.
- Keep ignores the current layer’s height.
- Add builds upward.
- Subtract cuts downward.
- Height Mode is changed in the Inspector.
- 3D preview helps you judge the final relief.