-
Notifications
You must be signed in to change notification settings - Fork 50
Heightmap
The heightmap shader treats the first layer of voxels as a 2D height-map texture and extrudes upwards to create a 3D volume. The height is determined by the relative luminance of each voxel.
| Parameter | Description |
|---|---|
| Blur | Blurs the height-map by the number of voxels specified. Used to smoothes any noise in the original texture. The default value of 0 does not blur, and values up to 10 increase the blurring and the smoothness of the result. |
| Auto Balance | When 1, the range is remapped according to the selected colors in the palette. When 0, the range is not changed by the palette. See below for more information. |
| Reverse | When 0, the luminance of a voxel determines how far it is extruded. When 1, this is reversed and darker voxels are extruded instead. |
![]() |
![]() |
| Height-map texture | Results |
![]() |
![]() |
Blur: 0
|
Blur: 3
|
|---|---|
![]() |
![]() |
Blur: 6
|
Blur: 10
|
![]() |
![]() |
![]() |
Auto Balance: 0
|
Auto Balance: 1
|
|---|
The heightmap shader uses the relative luminance of a voxel to determine its height. By default, the maximum luminance is white (1.0) and minimum is black (0.0).
The maximum height is determined by the volume size.
For example, if you import a height-map texture that ranges from black (0.0) to 50% grey (0.5), the heightmap shaders can do two things:
- If Auto Balance is
1and you select the colors in the palette used by the height-map texture, the shader will treat the colors relatively and calculate a new maximum and minimum ranges for you. - If Auto Balance is
0, the shader will treat values absolutely (no changes), meaning the highest point will be 50% of the volume.
If Auto Balance is 1, any unselected colors that were used by the texture are ignored when generating the volume. This can lead to odd results.
![]() |
![]() |
Reverse: 0
|
Reverse: 1
|
|---|
All content in this wiki is licenced under the CC BY-NC-SA 4.0 license. Code snippets are dual-licenced under the MIT License.









