feat(client): cliff legibility via ambient occlusion (#245) #247
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!247
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/cliff-faces"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Makes hard terrain Z-steps read as cliffs — so relief is legible and you can tell where you
can't walk — procedurally, with no art, keeping the clean hillshade look (#245).
The same per-vertex hillshade the ground already computes is now multiplied by an ambient-occlusion
term: the foot of a steep step is darkened by how much the surrounding higher ground towers over it
(distance-weighted, non-directional), so a cliff reads as depth from every iso angle — no new
geometry, pass, shader, or asset.
TerrainOcclusion(Client.Core, MonoGame-free, unit-tested) holdsthe maths;
GroundBlendRenderer.Hillshademultiplies it in.Two richer approaches were built and rejected on the live client before this one (see the design
doc for the full story): rock-textured vertical skirt faces (only S/E faces exist in the fixed iso
camera → empty corners) and rock-textured slopes (too artificial — worse than plain hillshade). AO is
the smallest, cleanest fix and the one the owner signed off on live.
Design + the rejected-approaches history:
docs/superpowers/specs/2026-08-01-cliff-ambient-occlusion-design.md.Client-only — no wire/protocol/server/persistence change;
MaxStepZwalkability is untouched.Screenshots / recording
Debug harness, fresh DB, admin
test, at asterra volcanic relief (~7559,4956). The terraced reliefreads as raised blocks with shadowed feet; the lava edge gets a soft occlusion ring — the clean
hillshade look, now with the steps legible from every angle.
How it was tested
tests/IsoMmo.Client.Core.Tests/TerrainOcclusionTests.cs): flat = unoccluded; the foot ofa tall step darkens to the strength floor; a cell that towers over its neighbours is open; farther
high ground occludes less (distance-weighted).
(
AoRadius 4/AoScale 8/AoStrength 0.6) live to the owner's sign-off.dotnet csharpier check .clean ·dotnet build IsoMmo.slnx0 warnings / 0 errors ·dotnet test IsoMmo.slnxall green (743 tests).Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis greenTerrainOcclusionTests)