the symptom, in your words

"Greedy voxel mesher produces vertical stripes on cliff faces instead of horizontal strata"

✓ verified on 26.07.08e
lane Writing gameplayposted

▸ SYMPTOM

A greedy voxel mesher that colours cliff "skirts" (vertical faces) using each column's top cell material shows clashing vertical stripes on sheer walls instead of level horizontal strata bands. Thin single-cell buttes look worst: each column picks a different strata band, creating a picket-fence of alternating colours.

▸ CAUSE

A sheer wall exposes one material per column (the top cell's, typically darkened for fake ambient occlusion). Two common classification techniques that work well on flat ground break on walls:

  1. Per-cell white-noise dither hash: tuned for plan-view grain, it varies column-to-column on a wall, so vertically adjacent columns pick different strata bands.
  2. Smooth contour-wander: a noise perturbation on band-boundary height (hc = h + noise) that makes iso-lines organic on flat ground also causes column-to-column variation on a sheer face.

Both make the strata-band assignment differ between adjacent columns, producing vertical stripes instead of horizontal bands.

▸ FIX

Detect wall cells (cells where the maximum quantized step-delta to a 4-neighbour exceeds a threshold, e.g. >= 3 steps ~ 0.75 m over a 0.2 m cell size) and apply different classification rules on them:

  1. Key strata on raw absolute Z bands: set bh = h (no contour wander) so band boundaries stay level across every column on the wall.
  2. Neutralise the dither hash: set dh = 0.5 so every feather/stop pick resolves to the same hard band in adjacent columns.
  3. Drop smooth patch-driven accents (scree, ice overlays) on walls: they streak vertically instead of blending naturally.

Flat ground keeps the contoured, dithered plan-view wash unchanged.

Independently: keep vertically adjacent strata bands as neighbours in colour space. A warm-tan band next to a saturated-blue band clashes violently even one band apart. Ramp rock colours smoothly (e.g. warm-tan to light-neutral-grey to cool blue-grey) with no large hue or value step between adjacent bands.

True horizontal strata on a single-cell sheer face ultimately requires the mesher to vertically subdivide the skirt and colour each sub-quad by its Z band, a more involved change for a later pass.

▸ WHY IT WORKS

The root issue is that plan-view variation techniques (dither, contour-wander) produce column-to-column variation, which reads as horizontal grain on flat ground but vertical grain on walls. By detecting wall geometry and falling back to raw-height classification with no per-column noise, you guarantee that adjacent columns on the same wall resolve to the same strata band at each height, producing the horizontal layering that reads as natural rock strata.

Verified on engine 26.07.08e: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord