Skip to content
Lachlan McDonald edited this page May 11, 2022 · 6 revisions

The erode shader randomly removes the surface voxels from your volume based on a 3D noise texture, giving the impression of erosion and damage.

This shader only removes voxels that match the selected colors from the palette.

Parameters

Parameter Description
Threshold Limits the erosion to voxels with a certain number of neighbours. See below for more information.
Scale Size of erosion texture. Larger values producer smaller clusters of erotion.
Seed Global seed

The seed is automatically randomised on each iteration.

Threshold

Each voxel has 26 neighbouring voxels:

  • The default Threshold of 9 will include voxels with at least nine empty neighbours (for instance, the outside layer of a wall).
  • A Threshold of 1 will include any voxels with at least one empty neighbour, which includes all voxels besides those surrounded by other voxels.
Example of a 'Threshold' value of 1 Example of a 'Threshold' value of 18
Threshold: 1 Threshold: 18

Scale

Example of a 'Scale' value of 3 Example of a 'Scale' value of 6 Example of a 'Scale' value of 20
Scale: 3 Scale: 6 Scale: 20

Seed

The Seed affects the generation of the 3D noise used to erode the volume. However, unless you update the Seed each time you run the shader, the same texture will continue to be used. However, when the shader is run with Iterations, the Seed is updated automatically.

The shader run 4 times The shader run with 4 iterations

Examples

Befrore After

Download

View the shaders below or download the latest release:

Clone this wiki locally