logo80lv
Articlesclick_arrow
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_login
Log in
0
Save
Copy Link
Share

Creating Snow Deformation System For Large Terrains In Godot

The developer behind the story-driven survival game Frost Kin explained his approach.

Frost Kin takes place in a mythical Arctic wasteland, where players must transfer their brother's soul between different wild creatures as its core gameplay mechanic. Alongside its unique premise, the game also features a beautiful art style. It's being developed entirely by one person, Fabian, also known as Studio Flugmaschine, who is working on it full-time using Godot 4.3. He's been sharing regular development updates on Reddit, with his latest showcasing a snow deformation system that works across large terrains.

We reached out to Fabian to learn more, and he explained that this isn't his first attempt at creating something like this. Since almost everything players do in Frost Kin happens in the snow, he felt that the world would look like a static backdrop if it didn't react to their actions. Snow is more than part of the environment: it's a canvas players can shape as they explore, leave clues behind, find their way when they're lost, or hunt prey.

Here's a closer look at how the snow system in Frost Kin currently works:

The Goal

The snow had to do several things: show every step as a dent, slowly fill it back in, and run on a normal PC in Godot 4.3. Originally, I tried using a high-poly terrain mesh and modifying it where the player walked via a vertex shader. This became very inefficient for large terrains, since this approach required a consistently high poly count. In the current version, the terrain itself is very low-poly, and a secondary high-poly mesh is overlaid on the terrain, centered on a point close to the player and adjusted in height with raycasts.

The system is made up of three layers that share one source of truth.

  1. The trail map remembers what pressed into the snow, where, how deep and when.
  2. The underlying terrain mesh shows trails through shading alone, without any 3D trickery.
  3. The additional 3D snow mesh is a dense mesh around the player that turns trails into real geometry.

Other scripts read the same trail map. When the player wades through deep snow, she slows down and visibly struggles. In fresh tracks, she walks normally. The camera stays above the snow surface, not the ground underneath it, by adding the snow height as a safety margin to the collision point with the terrain.

Layer 1: The Trail Map

Everything that presses into the snow writes into one map. It's a 1024x1024 texture with 12.5 cm per texel, covering a 128 m tile. The map wraps over the world like a tiled floor, so it never has to follow the player. Each texel also stores which tile it was written for, so a trail never reappears 128 m away.

Each texel holds two things: when it was pressed, and how deep (or how high, for the rim of pushed-aside snow). The snow fills trails back in over about two minutes. In a storm, that clock runs many times faster, quickly erasing all trails from the level. The shader works out the fade from the stored time, so old texels never need to be touched again.

Stamping. A stamp presses a round dent with a soft wall, plus a raised rim around it. A dent only overwrites shallower snow, and a rim never fills a dent. Only the 256x256 chunks that changed are uploaded to the GPU, at most 30 times a second.

Creatures carry at least one stamper node, which works in one of three ways:

  • Feet: the player and larger creatures press with each foot on its own. A foot presses only while its sole is below the snow surface, and only as deep as it reaches. A planted foot makes a full print, a foot dragged through deep snow leaves a shallow furrow, a lifted foot nothing.
  • One point: the hare presses where it lands, so its hops leave gaps. The tip of a thrown spear works the same way.
  • Dead bodies: a creature that dies presses a long dent along its body and keeps it pressed while it lies there. Without this feature, killed creatures would eventually be covered in snow.

Fast moves press along the whole path since the last frame, so a swinging foot leaves a groove instead of dots. Fires melt a 3 m circle down to the ground.

Layer 2: The Terrain

The terrain shows trails by shading only. It bends its normals along the slope of the trail map and tints pressed snow slightly darker and bluer. This works out to 40 m, far beyond the 3D snow, so trails never just stop in the distance.

Two things keep the shaded trails from looking like a decal:

  • Wobble: two layers of noise shift where the map is read, so trail edges come out ragged instead of following the 12.5 cm grid.
  • Depth variation: some stretches of a trail are pressed shallower than others.

Pressed snow is also smoother. Its roughness drops from 1 to 0.5 at the bottom of a trail, so trodden snow catches a little light where fresh powder doesn't. The low-poly terrain never hides itself. An early version hid the terrain wherever it expected the 3D snow to be. Every place where the two disagreed became a see-through hole. Now the terrain always draws, just 5 cm lower near the player so it doesn't poke through the bottom of deep trails.

Layer 3: The 3D Snow Mesh

Around the player lies the real snow surface: three nested square meshes that sit on top of the terrain and turn trails into dents.

MeshVertex spacingCoversTrails
Inner10 cm0-10 mReal dents
Middle ring20 cm10-20 mShaded only
Outer ring40 cm20-30 mShaded only

All three move together in 40 cm steps, so every vertex always sits on the same world points and nothing swims. The mesh also sits up to 5 m ahead of the player in the direction the camera looks, so more snow lies in view.

Finding the ground. The mesh needs to know where the ground is. It raycasts the terrain once per 0.5 m cell and stores the results in a small wrapping texture centered on the player. Only the row of cells that comes into range is raycast, at most 200 a frame, nearest first. Each cell also stores how flat the ground is (from the terrain's own normals) and whether there's a height jump.

Where snow lies. The snow is full up to 50°, thins out to nothing at 55°, and from there the terrain blends into rock over 5 more degrees. At a cliff or overhang, the system finds the exact edge between two cells with a few extra raycasts. The snow then runs right up to the lip as one clean line, at any angle to the grid. Heights are never blended across a cliff, so the snow doesn't hang down the face like a curtain.

Hiding the seams. Where the snow stops, its edge dips 30 cm into the ground so the terrain covers it. Between the meshes, each vertex blends how soft its edges are over the last 2.5 m before the next ring. Otherwise the snow line jumped every time a ring border swept over it.

For production, this means that the entire level can be one relatively low-poly mesh. Once exported, the shader material determines where rock and snow should be by comparing the normal vector to the up vector, and this information is then used by the snow system as well to place the 3D snow.

Making It Look Like Snow

The terrain and the 3D snow use one shader with two modes, so they always agree on color, light, and where snow ends.

  • Sparkle: the world is split into tiny cells. Some hold a single crystal facet at a random tilt, which flashes only when it mirrors a light into the camera. Sparkles appear only in light, fade out with distance, and are rarer in trodden snow.
  • Snow to rock: instead of a hard border, the surface blends from snow into rock between 55° and 60°. Color, reflections and the snow's direct light all fade together.
  • The snow fringe: terrain faces often turn from flat to steep at a single triangle edge, which left a hard line where 3D snow met rock. Rock near the 3D snow now keeps a snowy look for up to 1 m, measured in 3D from the nearby snow cells. Noise breaks the falloff into ragged patches, so it doesn't read as a soft circle.
  • Rims: the raised ring of pushed-aside snow around each dent catches light on one side and shadow on the other, which is most of what makes a print read as a print.

Performance Lessons

The worst frames, with a herd of bison in Level 2, took about 60 ms of script time before optimization. Most of it went to trail stamping and to the 3D snow updating its ground. Four changes fixed it:

  1. Stamp less. A herd's feet touched thousands of texels a frame (one bad frame: about 17,000). Stampers now check how far they moved before anything else, and the stamp loop skips cells without a square root.
  2. Don't move what doesn't need to move. The ground window used to follow the mesh, so every camera turn meant thousands of new raycasts. Centering it on the player made camera turns free.
  3. Spread the work. Raycasts and flatness updates are capped per frame and done nearest first. A cell still waiting simply shows the terrain for a frame or two.
  4. Stop the catch-up chain. After a slow frame, Godot runs physics several times in the next one, and each run did all the snow work again. One hitch became a chain. Capping physics at 3 steps per frame stopped it.

What didn't make it. A depth camera under the player rendered exact footprint shapes. It looked promising, but reading the image back to the CPU every frame cost too much, so it's switched off.

What I Learned

Emotionally, the world needs to be more than just scenery. It needs to interact and sometimes resist your actions. In worlds with lots of foliage, this can be achieved with swaying grass and dark forests. In my setting, snow takes on that role, and therefore my deformation system is not just a cosmetic addition – it makes the world feel more responsive and alive.

On the technical side: let every system read the same truth. The terrain, the 3D snow, the player's wading and the camera all ask the same trail map and the same snow depth rule. When something looked wrong, it was almost always two parts that disagreed, and the fix was to make one follow the other.

Frost Kin

Frost Kin

Frost Kin

Wishlist Frost Kin here. Subscribe to our Newsletter, join our 80 Level Talent platform, Discord, and follow us on Twitter, LinkedIn, Telegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.

Are you a fan of what we do here at 80 Level? Then make sure to set us as a Preferred Source on Google to see more of our content in your feed.

Subscribe to 80 Level Newsletters

Latest news, hand-picked articles, and updates

Built for the Game & Digital Art Industry
Get Our Media Kit

Comments

0

arrow
Type your comment here
Leave Comment
Built for the Game & Digital Art Industry
Get Our Media Kit