A TouchDesigner network that grows itself.
TDEmbryo writes TouchDesigner networks from a genome. You give it a vocabulary of operator types; it decides which to create, how to wire them, what to set their parameters to, and which node becomes the picture. One integer — the seed — reproduces a whole network exactly. Change it and you get a different creature.
It is a Cartesian Genetic Programming engine, ported from the Embryo addon for Grasshopper — https://github.com/johnharding/Embryo.
Everything it grows — TOPs, CHOPs, SOPs, POPs, DATs, materials — resolves into a
single output called embryoOut. One visual result, always.
TouchDesigner 2025.33070 or compatible. Nothing else — no pip installs, no external dependencies. The engine is pure Python plus TouchDesigner's own API.
# TouchDesigner textport (Alt+T / Option+T)
import sys; sys.path.insert(0, '/full/path/to/TDEmbryo')
import install_touchdesigner as inst
inst.install()An embryo COMP appears in /project1. Pulse Generate. That is the whole setup —
paths are worked out for you.
Re-running the installer is safe: existing parameters keep their values and a GenePool you have customised is left alone.
Pulse Variants and Variantcount genomes are grown side by side, each numbered —
anything from 1 to 25, nine by default. Find one you like, set Pick to its number,
pulse Pickvariant — that genome becomes the current one. Pulse Variants again
and the next batch are its children.
Keep choosing and the population walks toward what you keep picking. Savedna keeps a genome as a small JSON file.
If you would rather let a metric choose, Evolve hill-climbs: mutate, score the image, keep the improvements.
Three parameter tabs. Full reference in MANUAL.md.
| tab | what lives there |
|---|---|
| Embryo | what gets grown — Seed, Nodecount, how deep the wiring reaches, how much of the network animates, how non-TOP families reach the picture |
| Actions | what you do — Generate, Mutate, Evolve, the variant browser, Clear |
| Setup | paths — where the package lives, where genomes are saved, and a code-reload button for editing the engine |
- The GenePool is a child COMP. Whatever operators you drop in is the vocabulary. The nodes are never wired and never cook — they exist to name types.
- The genome is five sets of genes: which operator, where its inputs come from, what its parameters are, which node is the output, and how geometry reaches the picture.
- Dead genes are kept. Cells that do not reach the output stay in the genome, inert, reachable by a later mutation. That is how the search escapes a dead end.
- CHOPs are not seen, they are felt. The CHOP branch becomes a driver, and a share of the network's parameters are rewritten as expressions reading it — so the whole graph animates from one source.
- Geometry gets rendered. SOPs and POPs are given a camera, a light and a material automatically, so 3D lands in the same single output as everything else.
All generated operators are tagged, so Clearnet removes exactly them and nothing of yours.
| name | role |
|---|---|
embryoNode_* |
the genome cells |
embryoConverge_*, embryoStage_* |
the merge tree that resolves loose ends |
embryoDrive |
the CHOP that animates the network |
embryoGeo, embryoCam, embryoLight, embryoRender |
the render path for geometry |
embryoOut |
the output |
embryoBrowser |
the variant browser (survives Clearnet) |
embryoDna |
the current genome, as readable JSON |
TDEmbryo/
├── embryo/ the engine
├── EmbryoExt.py bridge between the COMP and the package
├── install_touchdesigner.py installer
├── MANUAL.md full manual
├── LICENSE MIT
└── docs/ images for this page
- The GenePool carries operator types, not their settings. A
moviefileinTOPin the pool with your movie selected still produces a default one in the network. - Variant thumbnails are still frames. To judge whether a variant moves, pick it
and watch
embryoOut. - A genome only reproduces its network against the same GenePool. The genes index that vocabulary; load a genome under a different pool and you get a valid but different result.
- The fitness metric is not taste. It rewards contrast, detail, entropy and
colour. Use
Evolveto escape a dull region, then choose by eye.
TDEmbryo is a port of Embryo — "Genetic Programming for Grasshopper" by John Harding. Cartesian Genetic Programming is due to Julian Miller.
MIT — see LICENSE. Use it, change it, ship it; keep the notice.
