Falling Sand 2D + 3DDocumentation · Geometry Nodes falling-sand sandbox for Blender 4.5+

1Files and requirements

FileWhat it is
FallingSand_GN.blendThe 2D pixel canvas (256 × 144 cells) with a demo level, emitters and five brushes.
FallingSand3D_GN.blendThe 3D voxel box (64 × 64 × 48 voxels) with a demo level, emitters, five brushes, ground, light and camera.

Both files work in Blender 4.5 LTS and newer (tested with 4.5 and 5.2). There is nothing to install: the simulation is made of Geometry Nodes only. Each file contains a README text block (Scripting workspace or any Text Editor) with a short version of this page.

2Quick start

  1. Open FallingSand_GN.blend or FallingSand3D_GN.blend. The viewport opens in Material Preview, looking through the camera.
  2. Press Space with the mouse over the 3D Viewport. The simulation starts at frame 1 and runs while the timeline plays.
  3. Go back to frame 1 (Shift+Left) to reset it. Changes to the level or to the canvas settings show up from frame 1.
The demo files use Play Every Frame (Playback ▸ Sync). The simulation advances one step per played frame, so with frame dropping it would simply run fewer steps.
The 2D demo in Blender with a brush selected and its FS Emitter modifier open

3Painting with brushes

Each demo has five brushes parked next to the canvas or box: Sand, Water, Fire, Stone and Eraser. A brush is just an object in the Emitters collection with an FS Emitter modifier.

  1. Start playback.
  2. Click a brush to select it, press G and move it over the canvas or into the box. It paints every frame it overlaps. In 3D, press Z after G to move it up and down only.
  3. Right-click (or Esc) puts it back where it was; left-click leaves it there and it keeps emitting.

To change what a brush paints, open its FS Emitter modifier (Properties ▸ Modifiers) and change Element, Mode, Rate or the object's scale. Duplicate a brush (Shift+D) to make more.

4Emitters and levels

The canvas (2D) and the box (3D) read two collections:

CollectionWhenDefault element
LevelStamped into the grid once, on the first frame. Use it for terrain, walls, pools and piles.Stone
EmittersWritten into the grid every frame, between the emitter's start and end frame.Sand

Objects without an FS Emitter modifier use the default element. What counts as covered:

Positions are read relative to the canvas or box object, so you can move the whole setup around. In 3D every level object is tested on its own, so overlapping shapes stamp their exact union.

FS Emitter modifier

InputDefaultWhat it does
ElementSandSand, Water, Stone, Wood, Oil, Lava, Fire, Smoke, Steam, Acid, Gunpowder or Eraser (clears cells).
ModeAddAdd fills only empty cells. Replace overwrites whatever is there. Level objects always replace.
Rate0.5Chance per covered cell per frame (0–1). Level objects ignore it and fill completely.
Stroke Width1.0Radius multiplier for curve and Grease Pencil strokes.
ActiveOnTurns the emitter off without deleting it (can be keyframed).
Start Frame1First frame it emits.
End Frame0Last frame it emits; 0 keeps it emitting forever. The demo emitters stop after a few seconds so the scene settles.

5The 2D canvas

The FS Canvas object carries an FS Canvas Geometry Nodes modifier. It outputs a grid of faces in the XY plane, one face per cell, centred on the object, with the cell value in the face attribute fs_cell. The material FS Pixels turns that into colours.

InputDefaultWhat it does
Width / Height256 / 144Cells across and up (4–4096, rounded up to even numbers).
Cell Size0.05Size of one cell in scene units.
Steps per Frame4Simulation steps per frame (1–64). More is faster motion and costs more time.
Seed0Changes the random choices; the same seed always gives the same result.
Level / EmittersFS Level / FS EmittersThe two collections described above.
Solid WallsOnLeft, right and bottom edges are solid. Off: material falls out of the canvas.
Solid CeilingOffTop edge is solid. Off: smoke and steam leave at the top.
PauseOffFreezes the simulation while the timeline keeps playing.
MaterialFS PixelsMaterial for the cells.
Start from an image or a painted state: if the canvas object's own mesh has exactly Width × Height vertices with an integer point attribute fs_init (element id per cell, x-major order), it is used as the start state.

6The 3D box

The FS3 Box object carries an FS3 Box modifier. The box is centred on the object in X and Y and starts at its origin in Z. The voxels live in a point cloud with the point attribute fs_cell; the display turns the visible ones into cubes that carry fs_cell as an instance attribute for the FS3 Voxels material.

InputDefaultWhat it does
Width / Depth / Height64 / 64 / 48Voxels along X, Y and Z (2–1024, rounded up to even numbers).
Cell Size0.1Size of one voxel in scene units.
Steps per Frame1Simulation steps per frame (1–64). Each step moves things up to two cells.
Seed0Changes the random choices.
Level / EmittersFS3 Level / FS3 EmittersThe two collections described above.
Solid Walls / Floor / CeilingOn / On / OffWhich sides of the box are solid. Open sides let material fall or rise out.
PauseOffFreezes the simulation.
DisplayCubesCubes: instanced cubes on visible voxels. Points: a point cloud, lighter for big boxes. Raw: every voxel with its fs_cell, for your own node setups.
Voxel Scale1.0Shrinks the displayed cubes (0.05–1) for a grainier look.
Show BoundsOnDraws the box edges in the viewport (they never render).
MaterialFS3 VoxelsMaterial for the cubes or points.
The 3D demo in Blender with the FS3 Box modifier

7Elements

ElementMovesReacts
SandFalls, slides off slopes, sinks through liquids.Dissolved by acid.
WaterFalls and flows sideways, levels out.Boils into steam next to lava (and slowly next to fire). Puts fire out.
StoneStatic.Slowly dissolved by acid.
WoodStatic.Catches fire from fire and lava, dissolved by acid.
OilFlows, floats on water.Catches fire quickly.
LavaA slow, heavy liquid.Sets wood, oil and gunpowder on fire, boils water, turns into stone when it touches water.
FireRises and flickers.Burns out over time, mostly into smoke. Water turns it into steam.
SmokeRises and drifts.Fades away.
SteamRises and drifts.Condenses back into water or fades.
AcidFlows like water.Dissolves stone, sand, wood and gunpowder, and is used up doing it.
GunpowderFalls and piles like sand.Flares up into fire very quickly, dissolved by acid.
EraserAn emitter setting, not an element.Clears the cells it covers (use Mode: Replace).

8Use it in your own scene

The easiest way is to append the whole setup:

  1. In your file choose File ▸ Append, open FallingSand_GN.blend (or the 3D file), go into Collection and append Falling Sand (or Falling Sand 3D). The canvas or box, its material, the level, the emitters and the brushes come with it.
  2. Delete the demo level and emitter objects you do not need and add your own to the Level and Emitters collections.

To start from scratch instead:

  1. Append the node group FS Canvas (or FS3 Box), the node group FS Emitter and the material FS Pixels (or FS3 Voxels).
  2. Add any object (a single vertex or an empty mesh is fine), add a Geometry Nodes modifier and pick FS Canvas or FS3 Box.
  3. Make two collections, set them as Level and Emitters in the modifier and set the Material.
  4. Add objects to the collections. Give them a Geometry Nodes modifier with FS Emitter to choose their element.
Hide the level and emitter objects in renders (Object Properties ▸ Visibility ▸ Renders) so only the simulation shows up. The demo objects are already set up this way.

9Rendering and baking

10Speed and memory

SetupBlender 5.2Blender 4.5
2D, 256 × 144, 4 steps12 ms per frame14 ms per frame
2D, 512 × 288, 4 steps22 ms per frame–
3D, 64 × 64 × 48, 1 step, Cubes15 ms per frame16 ms per frame
3D, 96 × 96 × 64, 1 step, Cubes31 ms per frame–

Simulation time only, measured without the viewport on a Ryzen 9 7950X. The time grows with the number of cells and with Steps per Frame. Empty space is cheap; the rules only run where something can change.

Memory

Like every simulation zone, the canvas keeps every played frame in memory so you can scrub back. It stores one value per cell per frame: about 150 KB per frame for the 256 × 144 canvas and about 1–3 MB per frame for the 64 × 64 × 48 box. Going back to frame 1 or changing a setting clears it. For long animations, bake to disk.

11Tips and limits

12How it works

Each cell stores one integer: element + 16 × extra, where extra is a colour variation, a liquid's flow direction, or the remaining life of fire, smoke and steam.

Simulation and Repeat zones in the FS3 Box node tree