This project contains a snow simulation engine using the material point method (MPM) algorithm.
You can view this demo online so long as your browser supports WebGPU!
This project features a material point method (MPM) particle engine for dynamic cohesion and fracture, with...
- a position-based material point method (PBMPM) variant for stability.
- an explicit MPM variant for speed.
MPM enables:
| Elastic deformation and stress forces to simulate soft materials | Plastic deformation to simulate fracture and tearing | Hardening to simulate the "packing" behavior of snow |
![]() |
![]() |
Additionally, the particles are also affected by:
- A rigid collider mesh, with triangle-based intersection.
- Repulsion and attraction forces spawned at your pointer (RMB).
| Grabbing with attraction | Exploding with repulsion |
![]() |
![]() |
Data from the simulation can be rendered out using the following methods:
Additionally, when Points or Marching Cubes are selected, the scene is rendered with screen-space ambient occlusion.
This is a SvelteKit project with a simulation powered by WebGPU.
After cloning this repository:
- Setup:
npm i(Node.js) ordeno i(Deno) - Run:
npm run devordeno task dev
Existing simulation systems in 3D tools like Blender are somewhat limited. There are simulations for mesh-based solids (cloth/rigid body) and simulations for particle-based solids (soft body), liquid (fluid), and gas (smoke). However, at present, there isn't exactly a solution for fragile materials like snow or jelly that only sometimes stay together and sometimes break apart.
The closest practical solution there is is to pre-fracture a mesh, sometimes manually if there are not many pieces or otherwise using a "cell fracture" mechanism which tends to be pretty easy to spot visually. In movies, simulations have evolved to use certain techniques which better support semi-solid materials. For this project, we'll focus on the "material point method", which is an algorithm often leveraged for snow, as with Frozen in 2013. One goal of this project is to implement and describe this technique in an accessible and customizable way, both to demonstrate its benefits as well as lay the groundwork for engine implementations for artistic use in tools like Blender.
An additional point of interest is animated characters. Even in industry tooling, characters made of a simulatable material like sand, snow, or water often simply consist of a mesh styled to look like the material, with a particle system on its surface. A large amount of manual labor is necessary to model simple interactions with other characters or meshes in a believable way, such as controllers to decide when and where to fracture the mesh into pre-factured pieces or blend between the mesh and a particle system. We'd like to investigate how easily a simulation can achieve similar results; importing meshes and animations to the scene, while maintaining ease of artistic control, is an additional point of interest.
Hey kid, want some implementation details...?
| Volumetric raymarching | Surface raymarching |
![]() ![]() |
![]() ![]() ![]() |
| Small grid cell size, large timestep with elastic deformation | Ditto, with plastic deformation |
![]() |
![]() |
Collision tests
![]() |
![]() |
![]() |
- A Material Point Method For Snow Simulation. The 2013 Disney paper proposing MPM for simulating snow.
- Breakpoint. A DirectX implementation of 3D PBMPM with mixed material types, along with a mesh shading renderer.
- GPUMPM. A CUDA implemenation of MPM, associated with the 2019 paper GPU optimization of material point methods.
- PB-MPM. The original WebGPU proof-of-concept implementation of 2D PBMPM with various material types, associated with the original 2024 paper introducing PBMPM, A Position Based Material Point Method. (although internal forces seem to be broken at the moment, as of 2025-11-21...)
- Principles towards Real-Time Simulation of Material Point Method on Modern GPUs. A 2021 paper covering GPU optimizations of MPM.
- The Material Point Method for Simulating Continuum Materials. A 2016 paper introducing MPM.
Project intermediate presentations
- Chart.js. Performance graphs
- SASS. CSS preprocessing
- SvelteKit. UI/reactivity
- THREE.js. gLTF/gLB loading
- Vite. Bundling and development environment
- wgpu-matrix. Helper classes for operations involving WGSL builtins on the CPU
- Free Low Poly Forest by purepoly. Scene model
- Horse Statue 01 by Rico Cilliers. Particle scatter model
- Kloofendal Misty Morning (Pure Sky) by Greg Zaal. Environment map





















