terrainSystem.package
- ..
- .metadata254 B
- README.md2.6 KB
- mat.yaml2.0 KB
- preview.png30.0 KB
This package holds more than this page lists. See all of its files in its world.
README.md
terrainStandard (material)
The default material for the terrain system. It is the
~terrainSystem.shaders.terrainSplat shader with ground_fill at 1 and no
layer bound, so the whole ground is the share no layer claims and is painted by
altitude and slope: four colour bands climbing with height, a cliff over steep
faces, noise breaking each band's edge and a slow macro variation
(zero_terrain_ground_bands). A landscape that states its vertical reach (a
.terrainData does) has the bands begin at fractions of it (ground_altitudes,
0.18, 0.5 and 0.78 of the relief), so the same ground reads alike on a hill and
on a massif; the peak's snow is drawn only where the ground lies down. It carries the shader's geomorph hook and shades
with the landscape's own normal per pixel.
Bands
| Slot | Property | Default | Role |
|---|---|---|---|
| 0 (valley) | layer0_color | green | Low ground, grass, valley floor. |
| 1 (mid) | layer1_color | tan | Mid-band: dry grass / scrub between grass and rock. |
| 2 (high) | layer2_color | grey | High band: rock, exposed cliff face. |
| 3 (peak) | layer3_color | white | Peaks: snow, ice. |
| cliff | cliff_color | dark brown | Steep faces, whatever the altitude. |
Tunables
| Property | Role |
|---|---|
ground_altitudes | Fractions of the landscape's relief where the mid, high and peak bands take over. |
layer1_height, layer2_height, layer3_height | World Y where the bands take over, for a landscape that states no relief. |
blend_width | Width of each altitude transition, for a landscape that states no relief. |
slope_start, slope_end | Cosine of the surface normal's Y where the cliff blend begins and where it fully overrides. |
detail_scale, detail_amp | Frequency and strength of the noise breaking each band's edge. |
macro_scale | Frequency of the macro variation. |
smoothness, metallic | Surface response. |
Authors who want different colours or heights override the respective
floats. / colors. blocks in their own material on terrainSplat.
Customizing per terrain
asset.create("material", "alpine_meadow", {
shader = "@builtin::systems.terrainSystem.shaders.terrainSplat",
properties = {
ground_fill = 1,
layer0_color = { 0.18, 0.45, 0.22, 1 }, -- meadow green
layer1_color = { 0.35, 0.42, 0.30, 1 }, -- scrub
layer2_color = { 0.55, 0.55, 0.55, 1 }, -- granite
layer1_height = 12, layer2_height = 24, layer3_height = 38,
},
})