LEARN // EFFECTS

What is a flipbook texture

A flipbook texture is one image that holds every frame of an animation in a grid, so your engine plays the effect by showing one cell after another on a flat quad. You tell the engine the rows and columns, and it shifts the texture coordinates each frame. Most fire and smoke in games plays this way.

  • 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.

FIREFINAL
First frame of the fire bake
Fire, 4.1 x 7.0 m, compiled with Spatial Compiler. Spec →

01 // HOW IT WORKS

How the engine reads the grid

Every cell in a flipbook has the same size, and the frames run left to right, then top to bottom. An 8 x 8 grid holds 64 frames. On a 2048 x 2048 px texture each cell is 256 px, and at 30 frames per second the 64 frames play in a little over 2 seconds.

To show frame n, the shader shrinks the texture coordinates to one cell (1/8 of the width and height on an 8 x 8 grid) and offsets them to column n mod 8 and row n / 8, rounded down. The engine needs the grid size and a frame number or playback rate, and nothing else from the image.

02 // IN YOUR ENGINE

Where you set the grid in each engine

  • Godot 4: on a StandardMaterial3D, set Billboard Mode to Particle Billboard, then Particles Anim H Frames and V Frames. The ParticleProcessMaterial Animation Speed sets playback.
  • Unity: the Particle System's Texture Sheet Animation module, Mode Grid, with Tiles X and Y.
  • Unreal Engine: Sub UV > Sub Image Size on the Niagara Sprite Renderer, plus a material with the Particle SubUV node.
  • Roblox Studio: ParticleEmitter.FlipbookLayout, with the presets Grid2x2, Grid4x4 and Grid8x8, or Custom with FlipbookSizeX and FlipbookSizeY.
  • three.js: texture.repeat.set(1 / 8, 1 / 8) and a new texture.offset for every frame.

When the grid you enter does not match the image, you see slices of two frames at once, or a frame that slides across the quad. See grid and frames.

03 // REAL OUTPUT

Two flipbooks from real compiles

The fire is a 2 s loop and the smoke plume a 4 s loop, each 64 frames on an 8 x 8 grid.

SMOKE_PLUMEFINAL
First frame of the smoke_plume bake
Smoke plume, 7.0 x 10.8 m, compiled with Spatial Compiler. Spec →

04 // SPATIAL COMPILER

Flipbooks your agent can compile

Ask your agent for a fire, smoke, explosion or dust effect and you get flipbook textures on an 8 x 8 grid of 256 px cells by default, with a layout.json that records the grid, frame count and playback rate. In Godot 4 the effect arrives in a ready scene, such as Godot fire.

06 // FAQ

Flipbook texture questions

All questions →

README.FLIPBOOK_TEXTURE
How does a flipbook texture work in a game engine?

The engine displays one grid cell at a time at a set rate by scaling texture coordinates and offsetting them by row and column.

How do I set the row and column count for a flipbook?

Enter the grid size in your engine flipbook settings, such as H Frames and V Frames in Godot or Tiles X and Y in Unity.

How does a shader know how many frames are in a sprite sheet?

You provide the column and row counts in material settings or your script reads the frame layout from a data file like layout.json.

Should all frames in a flipbook have the same dimensions?

Yes, because a flipbook shader divides the texture into equal cells, so matching frame sizes and positions prevent jumping during playback.

How do flipbook textures work in Roblox?

Upload the sheet, assign it to ParticleEmitter Texture and choose a FlipbookLayout like Grid8x8 or Custom with FlipbookSizeX and FlipbookSizeY.

Compile your first effect

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

All effects, guides and explainers →