---
title: "Smoke effect in three.js from a sprite sheet"
description: "Play smoke 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-smoke/
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 smoke

EFFECTS // THREE.JS

# How to make smoke in three.js

In three.js, you can play smoke that loops as a leaning plume or rises once after a blast. A snippet loads the packed RGBA sprite sheet on a THREE.Sprite, sets the texture repeat to one eighth, and loops it or removes it. 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.

**SMOKE\_PLUMEFINAL**

![First frame of the smoke\_plume bake](/bakes/smoke_plume/poster.webp)

Smoke plume, 7.0 x 10.8 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-smoke_plume)

01 // WHAT YOU GET

## What you get for smoke in three.js

Two smoke examples cover steady and one-time smoke. The smoke plume leans with the wind and loops every 4 seconds, about 7 m wide and 10.8 m tall, like smoke from a chimney or a wreck. The smoke column climbs, spreads and thins over 5 seconds after a burst, about 8.2 by 9.9 m.

Each compile is three 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, not one painted color image, so three.js needs a small material to show them.

02 // HOW TO

## Play the smoke in three.js

1.  Ask your agent for the effect (for example "dark smoke rising from a burning car, looping") 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.  Wrap the plume with `i % 64` (64 frames in 4 s). The column's frames crowd its start, so pick its frame with `layout.frame_times_s.findIndex((t) => t >= elapsed)` and remove the sprite when that returns -1, at 6 s.
5.  Set `sprite.scale.set(s, s, 1)` with `s` the meters per tile from `layout.json`, a little over 10.8 m for the smoke, so it shows at its real size.

03 // REAL OUTPUT

## Compare the smoke examples

**SMOKE\_COLUMNFINAL**

![First frame of the smoke\_column bake](/bakes/smoke_column/poster.webp)

Smoke column, 8.2 x 9.9 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-smoke_column)

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 smoke for your scene

Lighting matters most for smoke, because a flat sprite looks wrong the moment your sun moves. Ask your agent for thicker or thinner smoke, a different color, or more lean in the wind.

Put the plume where something keeps burning and play the column once after an explosion ends.

05 // WHICH ONE

## Pick a smoke example

-   `smoke_plume`: Chimney or wreck smoke leaning with the wind. Loops, 7.0 x 10.8 m, 4 s loop.
-   `smoke_column`: Smoke left after a burst. It climbs, spreads and thins. Plays once, 8.2 x 9.9 m, 5.0 s.

Each one has its own page: [Smoke plume](https://appliedmanifold.com/effects/threejs-smoke-plume/), [Smoke column](https://appliedmanifold.com/effects/threejs-smoke-column/).

06 // RELATED

## Related pages

-   [Godot smoke Godot 4Smoke that loops as a leaning plume or rises once after a blast, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-smoke/)
-   [Unity smoke UnitySmoke that loops as a leaning plume or rises once after a blast, played in Unity by hand today.](https://appliedmanifold.com/effects/unity-smoke/)
-   [Unreal smoke Unreal EngineSmoke that loops as a leaning plume or rises once after a blast, played in Unreal Engine by hand today.](https://appliedmanifold.com/effects/unreal-smoke/)
-   [Roblox smoke Roblox StudioSmoke that loops as a leaning plume or rises once after a blast, played in Roblox Studio by hand today.](https://appliedmanifold.com/effects/roblox-smoke/)
-   [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/)
-   [Smoke sprite sheetThe looping smoke plume and one-shot smoke column as sprite sheets that relight in Godot 4 and play by hand in other engines.](https://appliedmanifold.com/effects/smoke-sprite-sheet/)
-   [Six-way lightingSix-way lighting stores smoke lit from six directions in two textures, so a shader can relight the flipbook from your scene light.](https://appliedmanifold.com/learn/six-way-lighting/)
-   [Smoke blending three.jsBlend flipbook smoke over a three.js scene with normal blending, no depth writes and a small shader that reads the sheet.](https://appliedmanifold.com/guides/threejs-smoke-blending/)
-   [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 explosion](https://appliedmanifold.com/effects/threejs-explosion/)[three.js dust →](https://appliedmanifold.com/effects/threejs-dust/)

07 // FAQ

## Questions about smoke in three.js

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

**README.THREEJS\_SMOKE**

### Is there a smoke effect for three.js?

Yes. Ask your agent for dark smoke rising from a burning wreck, starting from the smoke\_plume or smoke\_column example.

### How do I import a smoke 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 smoke 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 make smoke sprites blend cleanly over a three.js scene?

Set transparent true and depthWrite false on the material, draw smoke after opaque objects and sort overlapping sprites back to front.

### How many frames does a smoke effect use?

The smoke compiles use 64 frames: the plume loops every 4 seconds and the column plays over 5 seconds.

## 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/)
