12,400 Grains
Ready · Hover/Drag to Disturb
Drag or hover your cursor across the sand to blow it away
Custom Text / Content
Physics Dynamics
Wind Direction & Style

How the Blowing Sand Particle Dissolve Works

A technical breakdown of vector flow fields, raster point sampling, and real-time grain fluid dynamics.

1. Offscreen Path Rasterization & Grain Distribution

To turn any SVG vector or typographic glyph into millions of sand grains, the engine first draws the high-contrast silhouette onto a private, unrendered HTML5 Canvas. We sample the alpha channel of every pixel coordinate via ctx.getImageData(). Wherever the alpha exceeds an ambient threshold (e.g. alpha > 128), we generate a discrete sand particle with initial resting coordinates (originX, originY).

// Particle Initialization Structure struct Grain { x: Float32, y: Float32, // Current spatial position vx: Float32, vy: Float32, // Linear velocity vectors originX: Float32, originY: Float32, // Structural anchor target mass: Float32, // Inertia factor (0.8 - 1.4) color: Hex32, // Color variation across grains settled: Boolean // Cohesion clamp }

By giving each grain a randomized mass between 0.75 and 1.35, individual particles detach at different rates during a wind event, preventing the logo from sliding away as a rigid plate and creating the iconic granular desert dust plume.

2. Euler Integration with Curl & Turbulence Fields

In nature, desert dunes do not move along a single straight line. Gusts of wind encounter micro-vortices and atmospheric turbulence. In this simulation, each particle's velocity updates every frame using modified semi-implicit Euler integration:

3. Cohesion vs. Dissipation: The Reform Mechanism

When you click Reform, the wind force shuts off and a Hookean spring vector pulls every particle back toward its starting location:

// Spring recovery toward target origin const dx = grain.originX - grain.x; const dy = grain.originY - grain.y; grain.vx += dx * cohesionRate; grain.vy += dy * cohesionRate; grain.vx *= damping; grain.vy *= damping;

This allows brands to create hypnotic loopable hero animations where the logo is scattered into a gust of dust before snapping crisply back into legibility.

Frequently Asked Questions

Can I use this blowing sand effect for my own custom brand logo?

Yes! You can enter any custom text or brand monogram directly into the studio. For complex SVG logos, the same canvas rasterization technique works by loading an SVG image object, painting it to the offscreen buffer, and sampling pixel locations to seed the sand particles.

Does this require WebGL or does it run on pure 2D Canvas?

This studio uses a high-performance 2D Canvas pipeline optimized with typed arrays (Float32Array) and batched fillRect renders. It achieves a silky smooth 60fps on both desktop GPUs and mobile phones without requiring heavy external 3D libraries or shaders.

How can I export my animation for production web deployment?

You can instantly download high-resolution PNG frames using the "Export PNG" button in the navigation. The complete lightweight JavaScript simulation code can also be copied directly into any React, Vue, Webflow, or vanilla HTML project.

Why does sand dissipation look better than a standard CSS fade?

CSS opacity dissolves look generic and digital. Particle dissipation introduces genuine physics: individual grains have mass, momentum, and drag. This physical reality evokes organic materials like sand, stardust, smoke, and volcanic ash, giving landing pages a premium, cinematic feel.