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.

  • 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
Window fire, 3.9 x 4.7 m, compiled with Spatial Compiler. Spec →

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.

05 // FAQ

layout.json questions

All questions →

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.

All effects, guides and explainers →