---
title: "layout.json: how your engine reads a sprite sheet"
description: "layout.json sits next to every sheet with the grid, frame times, playback rate, loop flag, size in meters, ground point and the scales to decode channels."
canonical: https://appliedmanifold.com/effects/sheets/layout-json/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Effects](https://appliedmanifold.com/effects/)
3.  [Sprite sheets](https://appliedmanifold.com/effects/sheets/)
4.  layout.json

SHEET FORMAT // LAYOUT.JSON

# What layout.json holds and how to read it

Next to every sprite sheet you get `layout.json`, a small file that tells your engine how to play it: the grid, frame count, frame times, playback rate, whether it loops, and how big it is in meters. Your Godot 4 scene reads it for you, and in other engines you copy its numbers into the flipbook settings.

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

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

**WINDOW\_FIREFINAL**

![First frame of the window\_fire bake](/bakes/window_fire/poster.webp)

Window fire, 3.9 x 4.7 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-window_fire)

01 // FIELDS

## What the file records

-   Playback: `grid`, `tile_px`, the frame count, the frame order and frame times, `fps` (the playback rate), `life_s` and `loop`.
-   Placement, per camera view: `pitch_deg` (the camera angle), `metres_per_tile` (how wide one tile is in the world) and `ground_anchor_uv` (where the ground point sits in the tile).
-   Decoding: the scales that turn stored values back into flame brightness, motion and depth, such as `scales.emit_max_hdr`.
-   `coverage_per_frame`: the share of each tile that is not transparent, which follows how much screen the effect fills.

02 // GODOT 4

## Read for you in Godot 4

When your agent wires a compile, `pyro_sheet.gd` reads `layout.json` and sets the shader's parameters and the quad's size in meters, with the origin on the ground. You open the file only when you want to check a number.

03 // OTHER ENGINES

## Use it by hand

1.  Open `layout.json` and note the grid, 8 x 8 by default, and `fps`.
2.  Set your engine's flipbook to that grid and rate, and set it to loop only if `loop` is true.
3.  Make the quad `metres_per_tile` wide and tall, and move it so the `ground_anchor_uv` point sits on the ground.
4.  To add the flame, square the alpha of `main_neg.png`, multiply it by `scales.emit_max_hdr`, and multiply the flame color from `main_colour.png` by the result.

04 // RELATED

## Related pages

-   [Grid and framesHow a sprite sheet grid orders its frames, how engines read rows and columns, and how Spatial Compiler records grid and frame times.](https://appliedmanifold.com/effects/sheets/grid-and-frames/)
-   [Flame brightnessHow the sheets keep a white-hot flame core in 8 bits with a square-root encoding, how to decode it, and what the flame warnings mean.](https://appliedmanifold.com/effects/sheets/flame-brightness/)
-   [Motion vectorsHow motion vectors blend flipbook frames without ghosting, where they sit in Spatial Compiler's sheets, and what cross-fade blending offers in other engines.](https://appliedmanifold.com/effects/sheets/motion-vectors/)
-   [Sprite sheet UV math three.jsTurn a frame number into texture offset and repeat values for a three.js sprite sheet, in JavaScript and in GLSL.](https://appliedmanifold.com/guides/threejs-sprite-sheet-uv/)
-   [Godot window fire Godot 4A window fire venting flame and smoke from a burning room, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-window-fire/)
-   [Flipbook textureA flipbook texture packs an animation's frames into one grid image that your engine plays cell by cell on a quad.](https://appliedmanifold.com/learn/flipbook-texture/)
-   [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 Sprite sheets →](https://appliedmanifold.com/effects/sheets/)

[← Loop without a jump](https://appliedmanifold.com/effects/sheets/seamless-loop/)[Motion vectors →](https://appliedmanifold.com/effects/sheets/motion-vectors/)

05 // FAQ

## layout.json questions

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

**README.SHEETS\_LAYOUT\_JSON**

### How do I calculate UV coordinates for a sprite sheet with rows and columns?

Scale the UVs by 1 over the grid, 1 over 8 for these sheets and offset them by the cell column and row.

### How do I choose the texture size and grid dimensions for a Niagara flipbook?

Copy them from layout.json. Its grid field gives the Sub Image Size and tile\_px times the grid gives the full texture size.

### How do I set the number of rows and columns for a three.js flipbook texture?

Read grid from layout.json and call texture.repeat.set with 1 over columns and 1 over rows, then move texture.offset per frame.

### How big is a sprite sheet quad in Godot?

It is as wide and tall as metres\_per\_tile in layout.json, which pyro\_sheet.gd sets for you with the origin at the ground anchor.

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