---
title: "Dust effect in three.js from a sprite sheet"
description: "Play a dust effect in three.js today: a snippet loads the packed RGBA sprite sheet on a THREE.Sprite and steps the texture offset. Steps and code."
canonical: https://appliedmanifold.com/effects/threejs-dust/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Effects](https://appliedmanifold.com/effects/)
3.  [three.js VFX](https://appliedmanifold.com/effects/threejs-vfx/)
4.  three.js dust

EFFECTS // THREE.JS

# How to make a dust effect in three.js

In three.js, you can play a dust burst that plays once, a landing ring or thrown earth. A snippet loads the packed RGBA sprite sheet on a THREE.Sprite, sets the texture repeat to one eighth, and removes it after the last frame. Godot 4 gets a ready scene that relights the smoke.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [What the sheets hold →](https://appliedmanifold.com/docs/pyrofx/outputs/)

-   Godot 4 Available
-   Unity Manual setup
-   Unreal Engine Manual setup
-   Roblox Studio Manual setup
-   **three.js** Available

A draft compile is from $0.05, and new accounts start with $5 of usage.

**DUST\_RINGFINAL**

![First frame of the dust\_ring bake](/bakes/dust_ring/poster.webp)

Dust ring, 10.5 x 2.2 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-dust_ring)

01 // WHAT YOU GET

## What you get for dust in three.js

Two examples carry dust. The dust ring spreads out low along the ground for 2.1 seconds, about 10.5 m wide and only 2.2 m tall, like a blast wave or a heavy landing. The impact throws earth up with a flash and a little smoke in 2 seconds.

Each compile is four 2048 px PNG sheets of 64 frames on an 8 x 8 grid, a `layout.json` with the timing, and previews. The sheets carry lighting from six directions and the flame separately, not one painted color image, so three.js needs a small material to show them.

02 // HOW TO

## Play the dust in three.js

1.  Ask your agent for the effect (for example "a dust puff about 2 m wide when a character lands") with `export.pack` writing the light from above into RGB and opacity into alpha, so one PNG holds gray shading you can tint. (`main_pos.png` as it comes holds three light directions in RGB, not a color.) Load it with `TextureLoader` and set `texture.repeat.set(1 / 8, 1 / 8)`.
2.  Put it on a `THREE.Sprite` with a `SpriteMaterial` (`transparent: true`, `depthWrite: false`) so it always faces the camera. Normal blending suits smoke; tint it with the material color.
3.  Each frame, pick the tile: column `i % 8` and row `Math.floor(i / 8)`, then set `texture.offset.set(col / 8, 1 - (row + 1) / 8)`.
4.  The dust's frames crowd its fast start, so pick `i` from the clock: `i = layout.frame_times_s.findIndex((t) => t >= elapsed)`. When that returns -1, after 3 s, call `sprite.removeFromParent()` and `material.dispose()`.
5.  Set `sprite.scale.set(s, s, 1)` with `s` the meters per tile from `layout.json`, a little over 10.5 m for the dust, so it shows at its real size.

03 // REAL OUTPUT

## Compare the dust examples

**IMPACTFINAL**

![First frame of the impact bake](/bakes/impact/poster.webp)

Impact, 3.5 x 2.8 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-impact)

These clips are final-quality compiles of the shipped examples, played from their own sheets. Your agent can start from any of them.

04 // ADJUST IT

## Adjust the dust for your scene

Dust reads best close to the ground, so line the bottom of the effect up with your terrain. Ask your agent for a smaller ring for a character landing, a sandier color for a desert map, or a taller spray for a vehicle.

Both are one-shots that end once the dust has settled.

05 // WHICH ONE

## Pick a dust example

-   `dust_ring`: A ring of dust kicked out by a blast or landing. Plays once, 10.5 x 2.2 m, 2.1 s.
-   `impact`: A shell hitting dry ground: flash, thrown earth, a little smoke. Three emitters in one box. Plays once, 3.5 x 2.8 m, 2.0 s.

Each one has its own page: [Dust ring](https://appliedmanifold.com/effects/threejs-dust-ring/), [Impact](https://appliedmanifold.com/effects/threejs-impact/).

06 // RELATED

## Related pages

-   [Godot dust Godot 4A dust burst that plays once, a landing ring or thrown earth, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-dust/)
-   [Unity dust UnityA dust burst that plays once, a landing ring or thrown earth, played in Unity by hand today.](https://appliedmanifold.com/effects/unity-dust/)
-   [Unreal dust Unreal EngineA dust burst that plays once, a landing ring or thrown earth, played in Unreal Engine by hand today.](https://appliedmanifold.com/effects/unreal-dust/)
-   [Roblox dust Roblox StudioA dust burst that plays once, a landing ring or thrown earth, played in Roblox Studio by hand today.](https://appliedmanifold.com/effects/roblox-dust/)
-   [three.js fire three.jsA looping fire, from a burning wreck to a fire whirl or a window fire, played in three.js with a documented snippet.](https://appliedmanifold.com/effects/threejs-fire/)
-   [three.js explosion three.jsAn explosion that plays once, a ground fireball or a shell impact, played in three.js with a documented snippet.](https://appliedmanifold.com/effects/threejs-explosion/)
-   [Dust sprite sheetThe dust ring and the impact as one-shot dust sprite sheets, precomputed in the color of your ground for Godot 4 or for setup by hand.](https://appliedmanifold.com/effects/dust-sprite-sheet/)
-   [Soft particlesSoft particles fade a flat effect quad where it meets scene geometry by comparing depths, which hides the hard cut line.](https://appliedmanifold.com/learn/soft-particles/)
-   [Play an explosion once three.jsPlay an explosion sprite sheet once in three.js, then remove the sprite and free its material and texture.](https://appliedmanifold.com/guides/threejs-play-once/)
-   [OutputsWith the default export, each view writes four sheets, `<view>_pos.png`, `_neg.png`, `_colour.png` and `_aux.png`, plus `layout.json`, two still previews, the animated `preview_anim.png` and `bake_report.json`. Sheets are 8 x 8 tiles of 256 px by default.](https://appliedmanifold.com/docs/pyrofx/outputs/)

[All pages in three.js VFX →](https://appliedmanifold.com/effects/threejs-vfx/)

[← three.js smoke](https://appliedmanifold.com/effects/threejs-smoke/)[three.js steady fire →](https://appliedmanifold.com/effects/threejs-steady-fire/)

07 // FAQ

## Questions about dust in three.js

[All questions →](https://appliedmanifold.com/faq/)

**README.THREEJS\_DUST**

### How do I import a dust sprite sheet into three.js?

Load the PNG with TextureLoader, set repeat to one eighth on both axes and put it on a SpriteMaterial with transparent true.

### How do I randomize the starting frame of several three.js dust sprites?

Give each sprite its own texture with texture.clone() and start its frame counter at a random integer from 0 to 63.

### How do I play a dust burst once and remove it in three.js?

Pick each frame from layout.frame\_times\_s, stop after frame 63, then call sprite.removeFromParent() and material.dispose().

### What resolution does each dust frame use?

Each frame is 256 px square on a 2048 px sheet by default, which is plenty for dust seen from a few meters away.

## Compile your first effect

You pay per compile and see the price before it runs. New accounts start with $5 of usage.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Outputs →](https://appliedmanifold.com/docs/pyrofx/outputs/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
