Loom: generative woven cloth from a JSON file

A weaver's grid is a small computer. One set of threads runs vertical, the other horizontal, and at every crossing one of them sits on top. Nicolas Loizeau turned that old logic into a Python tool and named it loom. Point it at a JSON file and it returns cloth.
Two renderers read the same file. plain.py draws a flat image, one square per crossing, instant. render.py builds every thread as 3D yarn inside Blender, adds film grain and a background, and takes about a minute to finish a frame. The results look like fabric you could reach out and touch.
The patterns come from cellular automata. Elementary rules 0 to 255, the totalistic T rules, and the reversible second-order rules where rule 90 grows from random start rows. Each rule is a generator; the settings file names it and its parameters. A twill is just a diagonal rib, but the automata weave shapes no hand loom ever made.
Every image carries its own recipe. The seed and full settings are written inside the file, so a rendered cloth can be redone exactly: python render.py out/batch/001.jpg. One settings file, two worlds, and a hundred random runs with batch.py if you want a pile of cloth to pick through.
The example renders show what the yarn model can do: twist angles, slubs, frayed tips, loose fibres, wobble. Threads overlap, drape, and catch the light from an area lamp. This is a loom that prints in fibre rather than thread, and the whole thing is open on GitHub for anyone to run.
Weaving was the first information technology. The drawdown is a bitmap, the shuttle a pointer, the pattern a program. This tool simply closes the loop.
Find it here: https://github.com/nicolasloizeau/loom
■ Filed from The Foundry: the Fern, Fire wing of the city.