Skip to content

Reality Engine - deformable terrain

The ground remembers where you stepped

Four loads cross a strip of dry sand and a strip of fresh snow. Each one presses down with a real contact pressure - weight divided by footprint area - and the heightfield sinks by exactly that much. Nothing is a painted decal: every rut is the terrain yielding under Bekker pressure-sinkage, and the trail is just the record it keeps.

Bekker pressure-sinkage sand + snow soils plastic compaction grazing-sun self-shadow ray-traced heightfield pure C# / BCL-only

Two lanes, one variable each. The scene is built to isolate what drives sinkage. Lane A holds mass fixed at 80 kg and swaps foot area - a 0.02 m squared heel versus a 0.16 m squared snowshoe - so only pressure through area changes. Lane B holds area near 0.04 m squared and swaps mass - a 400 kg load versus a 50 kg one - so only pressure through weight changes. Same physics, four honest answers.

The numbers the sim reports. In fresh snow the 400 kg load ploughs a 219 mm rut; the 50 kg load leaves 61 mm. In dry sand the narrow heel bites 12 mm while the broad foot barely dents the surface and instead just packs it down (compaction climbs, depth stays shallow). A low, raking sun rakes the field so each shallow depression self-shadows and reads as a real dent, not a texture.

Where the physics comes from. Soil response is driven by OnlyCSharp 1.7's Engineering.Geotechnical and EarthScience.SoilScience catalogs; the only other reuse is the GIF byte-encoder, a seeded PCG32 RNG, and Perlin noise for the ground texture. The renderer, the contact model, and the terrain solver are original. It builds warnings-as-errors, 0/0, and the self-test passes green.

Four loads walk left to right across a snow strip and a sand strip, each leaving a distinct line of sinkage footprints behind it
The Crossing - four loads, four trails

The beauty render. Four contact points sweep across the field at 3 m/s - snow above, sand below - and each frame stamps the current footprint into the heightfield, so the trail grows behind them exactly as deep as the pressure warrants. The heavy load's rut in snow is unmistakably deeper than the light one right beside it.

Technique: per-frame Bekker contact stamp into a 220x220 heightfield, plastic compaction + idle recovery, low grazing sun for self-shadowing, 32-frame loop at 380x300.

A two-by-two debug panel showing pressure, sink depth, compaction and contact-mask fields as the loads cross
The Four Fields

The same crossing, read as raw state. Top-left is contact pressure, top-right is sink depth, bottom-left is cumulative compaction, bottom-right is the live contact mask - each footstep writing its dashed line into every field at once.

Technique: false-colour field dump of the solver's internal grids, one panel per quantity, same 32-frame timeline.

The final frame of the crossing, all four footprint trails complete across snow and sand
The Finished Trail

The last frame, all four crossings complete. Read left to right: the deep, widely spaced snow ruts up top, the shallower packed sand prints below, and the raking light catching every rim. This still is the whole argument in one image.

Reads: snow 219 mm vs 61 mm; sand 12 mm heel vs a near-flat, heavily compacted broad print.

The final frame of the four-field debug panel, showing the completed pressure, depth, compaction and contact lines
Fields, Settled

The four-field view at rest. With every footstep laid down, the depth and compaction panels show four clean, differentiated tracks - proof the difference you see in the beauty render is a difference in the solver's numbers, not the shading.

Technique: final-frame snapshot of the pressure / depth / compaction / contact grids.