# Material graph text format `craft-material-graph` parses text material graphs and evaluates them to float RGBA images. The loose file extension is `.tcgraph`. This page describes format 3, the version written by `graph::FORMAT_VERSION`. ## Lines One directive per line. `#` starts a comment that runs to the end of the line; blank lines are ignored. Values are whitespace-separated tokens; a value with spaces is written in double quotes. | Directive | Meaning | |---|---| | `format ` | The format version the text was written with. Texts without it are version 1. A version newer than the runtime's is refused with an error. | | `size []` | The graph's nominal size in pixels (the height defaults to the width). An evaluation may ask for another size (1 to 8192); node results scale with it. | | `seed_offset ` | Added to every random seed in the graph. | | `meta ""` | Free key/value data. `meta kind "function"`, `"fxmap"` or `"patterns"` marks a subgraph as a function graph, an FX-map program or a pattern program; `meta label` names the graph. | | `node [key=value ...]` | A node. `id` is a whole number, unique in its graph; `kind` is one of the node kinds below. `key=@` connects input slot `key` to node `id`, `key=@.` to a named output of a node with several. A number value is a parameter; anything else is a text parameter. `_x=` and `_y=` are the node's position in an editor. | | `output [.]` | A graph output named `name`, taken from node `id`. Graphs may instead carry `output` nodes (`usage`, `identifier`). | | `subgraph ` ... `end` | A graph defined inside this one, in the same format, used by `subgraph` nodes (`graph=""`), by `pixel_processor`/`value_processor` nodes (`fn=""`), by `fx_map` (`program=""`) or by `pattern_program` (`program=""`). | | `resource ` | Bytes carried by the text (an image a `bitmap` node reads by `file=""`). | | `expose