How-to guides
Turn a PNG into a grid
Convert an existing texture into an editable grid.
To edit a texture that exists only as a PNG, such as your own earlier work, convert it:
texturescript togrid old_corn.png corn.grid
The grid gets a palette section with one key per colour, lettered by lightness from darkest to
lightest, so the grid reads like a shading map. Pixels with alpha of 128 or more count as
opaque. --name sets the name in the header comment; it defaults to the PNG's.
Render the result to check the round trip:
texturescript grid corn.grid out/corn.png
texturescript diff out/corn.png old_corn.png
togrid gives each colour its own key, not a material ramp. To bring the texture into a family
palette, replace the palette section with the output of palette and re-key the grid.
Do not convert vanilla textures into files you commit. See Keep game assets out of git.