What is a Snow Globe?
A traditional snow globe is a sealed container filled with water and tiny particles that represent snow. When shaken, the particles float in the liquid, creating an illusion of snowfall. In digital form, this concept is translated into a 3D scene rendered using modern graphics techniques.
Snow Globe WebGL uses SDF (Signed Distance Field) raymarching to create realistic snowflakes and lighting effects within a virtual glass sphere.
Raymarching and SDF
SDF is a method of rendering 3D objects by calculating the shortest distance from a point in space to the surface of an object. Raymarching involves tracing rays through a scene, checking their proximity to surfaces using SDF values, and coloring them based on this information.
In Snow Globe WebGL, raymarching is used to create realistic snowflakes that move and interact with light, mimicking the behavior of real snow particles.
Physics in Digital Snow Globes
The physics behind a digital snow globe involves simulating the movement of virtual snowflakes under the influence of gravity. Each snowflake is modeled as a particle with its own mass and velocity, which are updated over time to create realistic motion.
Additional forces such as air resistance can also be applied to make the simulation more accurate.
Real-World Applications
While primarily used for entertainment, digital snow globes like Snow Globe WebGL demonstrate the power of modern graphics and physics engines in creating immersive virtual experiences.
These techniques are widely used in video games, simulations, and visual effects for movies.
Frequently asked questions
How does shaking the globe work?
Shaking the globe in Snow Globe WebGL triggers a random movement of snowflakes within the virtual sphere, simulating the effect of physical shaking.
What is SDF raymarching used for besides snow globes?
SDF raymarching is also used in other 3D rendering applications such as volumetric lighting and fluid simulations.
Can I use my device's motion to shake the globe?
Yes, enabling tilt shake allows you to control the snowflakes by tilting your device, providing a more interactive experience.
How does gravity affect the snowflakes in the digital globe?
Gravity is simulated as a constant downward force that affects each virtual snowflake, causing them to fall towards the bottom of the sphere.
Try it live
Everything above runs in your browser — open Snow Globe WebGL and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Snow Globe WebGL simulation