EFFECTS // THREE.JS
How to make a dust ring in three.js
In three.js, you can play a 10 m ring of dust thrown out by a landing or a blast. 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.
- 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.
01 // WHAT YOU GET
What you get for dust ring in three.js
The dust ring is a ring of dust kicked out along the ground by a blast or a heavy landing. It spreads to about 10.5 m wide but stays low, about 2.2 m tall, and plays once over 2.1 seconds. Its camera looks down from 35 degrees, so the ring reads as lying on the ground.
You get four PNG sheets of 64 frames, a layout.json with the timing, and previews, which three.js plays through a small material.
02 // HOW TO
Play the dust ring in three.js
- Ask your agent for the effect (for example "a small dust ring when a character lands, played once") with
export.packwriting the light from above into RGB and opacity into alpha, so one PNG holds gray shading you can tint. (main_pos.pngas it comes holds three light directions in RGB, not a color.) Load it withTextureLoaderand settexture.repeat.set(1 / 8, 1 / 8). - Put it on a
THREE.Spritewith aSpriteMaterial(transparent: true,depthWrite: false) so it always faces the camera. Normal blending suits smoke; tint it with the material color. - Each frame, pick the tile: column
i % 8and rowMath.floor(i / 8), then settexture.offset.set(col / 8, 1 - (row + 1) / 8). - The dust ring's frames crowd its fast start, so pick
ifrom the clock:i = layout.frame_times_s.findIndex((t) => t >= elapsed). When that returns -1, after 3 s, callsprite.removeFromParent()andmaterial.dispose(). - Set
sprite.scale.set(s, s, 1)withsthe meters per tile fromlayout.json, a little over 10.5 m for the dust ring, so it shows at its real size.
03 // ADJUST IT
Adjust the dust ring for your scene
Use it under explosions, helicopter landings and ground slams. Ask your agent for a smaller ring for a character landing, a sandier color for a desert or a slower spread for a heavy vehicle.
04 // SETTINGS
Settings in the dust ring spec
A ring-shaped source throws cold dust outward at 14 m/s for 0.15 s, and drag slows it so it settles. Front pacing gives the fast first moments more frames.
Ask your agent to change these and compile again; the full dust_ring spec lists every value.
How do I play a dust ring once and remove it in three.js?
Pick each frame from layout.frame_times_s, stop after frame 63 at 2.1 seconds, then call sprite.removeFromParent() and material.dispose().
How do I make a realistic dust ring in three.js?
Start from a simulated ring instead of manual particles. A ring source throws cold dust outward while drag slows its spread.
How do I keep a dust ring in proportion in three.js?
Keep the Sprite square because every tile is square. Set sprite.scale.set(s, s, 1) using the meters per tile from layout.json.
What resolution does each dust ring 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.