Concepts
The terms used throughout the ZigZag editor, and what each one is for.
A ZigZag project is a graph of operators. Operators make and process data, parameters control how they do it, and connections carry data and values from one operator to the next. This page defines the terms, in the order they build on each other.
Graphs
A graph is a canvas that holds operators and the connections between them. Every project has one graph at the top, the root graph, which is what opens when a project is loaded. The graph is where you build: operators are added to it, moved around on it, and connected on it.
A graph is itself an operator. The Graph operator holds a whole graph inside it, so graphs nest. From the outside it connects like any other operator. Inside it has operators and connections of its own, and a double click steps in. This is how a part of a project is grouped behind a single block with a few inputs, outputs and parameters of its own. Graph Inputs and Graph Outputs are the operators inside that bring the graph’s inputs in and send results out.
Connections in a graph never run in a circle. An operator’s output cannot reach back to its own input, however many operators lie in between. Feedback is the operator for a chain that works on its own result.
Operators
An operator is a block that does one job: it generates something, such as a texture or a signal, or it takes something in and puts a changed version out. Blur blurs a texture, Beat fires on every beat, Window shows a texture on screen. The add operator dialog, opened with Tab, lists every operator by category, and the reference has one page per operator.
An operator has three kinds of things on it:
- Data inputs and data outputs are where data, such as a texture, enters and leaves.
- Parameters are the settings that control how the job is done.
- A name, which starts as the operator’s type and can be changed.
Operators run every frame. A change anywhere in the graph, a parameter dragged or a new connection made, shows in every result downstream right away.
Data
Data is what operators produce and consume: a texture, a mesh, a material, a model. Each kind is a data type, and each data type has a page describing it: Texture, Mesh, Material, Model. Data lives on the graphics card and is never typed in by hand. It only exists as the output of some operator.
A data output is where an operator hands its result out. One output can feed any number of inputs, so one texture can be blurred, shown in a window and blended with another at the same time.
A data input is where an operator takes data in. An input has a data type and accepts only outputs of that type, so a texture never lands on a mesh input. A plain input holds one connection. Connecting another output to it replaces the first. Some operators, such as Mixer, have an input that takes any number of connections and grows a row for each.
What an operator does with an input that has nothing connected is on the data type’s page and in the operator’s own page. Most operators produce nothing until every input they need is connected.
Parameters
A parameter is a setting on an operator: a number, an on/off switch, a color, a vector, a choice from a list, a piece of text, a button, a transform, or a reference to something else in the graph. Each kind is a parameter type, and each has a page describing how it is operated and what it accepts: Float, Int, Bool, Enum, Trigger, Reference and the others.
Parameters are edited in place on the operator: click a number and type, drag it with the middle mouse button, pick from a list, press a button. The value is saved with the project.
A vector parameter, such as a position or a size, is made of components: X and Y, or X, Y, Z and W. Each component can be edited, and connected, on its own.
Parameters can also be connected to each other. A parameter on one operator can drive a parameter on another, so the number a Beat operator counts can set the angle of a rotation, or one color can be shared by three operators. Some parameters exist only to carry a result out, such as the width and height that Texture.Info reports. A parameter that is driven by a connection is disabled in the editor and drawn in another color, since its value now comes from elsewhere. A trigger is the exception: it can still be pressed, since a press is added to the ones that come in. The parameter type pages say what happens when a value of one type arrives at a parameter of another.
A few parameters change the shape of their operator, such as a mode that decides which other parameters exist. Those cannot be driven by a connection and have no input port.
Operators keep rarely needed parameters hidden as advanced. The button at the bottom of an operator shows them. A parameter with a connection is always shown.
Ports
A port is the spot on an operator where a connection attaches. It is an editor concept: ports are how connections are made and shown, and nothing in a project is a port.
- A data port sits on the operator for each data input and data output, in the color of its data type. Texture ports are orange, mesh ports light blue, material ports green and model ports pink.
- A parameter port is the small square at the left end of a parameter row for its input, and at the right end for its output. Parameters on one row, such as the components of a vector, share one port per side.
Hovering a port shows its name and description. Dragging from a port starts a connection; dropping it on a port that fits makes one. A click on a port also starts a connection, which then follows the mouse until the next click; Esc drops it. A connection can also be started by dragging from the parameter itself instead of its port. Dragging from one component connects only that component. Right-click a port for Disconnect, which removes every connection on it.
Connections and wires
A connection joins two things in the graph so that something flows between them. There are two kinds:
- A data connection joins a data output to a data input of the same data type. Data flows from the output to the input, every frame.
- A parameter connection joins an output parameter to an input parameter. The value of the first drives the second. A vector feeding a vector drives it component by component, and a single number feeding a vector drives every component. Which components link is chosen when the connection is made.
A connection runs between two operators in the same graph, never into or out of a nested graph. A graph’s own inputs and outputs are what carry data across that border.
A wire is how the editor draws a connection: a line from one port to the other, in the port’s color. Hovering a wire lights it, together with the ports it joins, so a connection can be followed across a busy graph. Deleting a wire, or disconnecting either of its ports, removes the connection.
Other terms
| Term | Meaning |
|---|---|
| Project | The document you save. Stored as a .zigzagproj file in JSON. It holds the root graph and everything in it. |
| Viewport | A pan and zoom view of a graph. You can open several, on the same graph or on different ones. |
| Data viewer | A live preview of the data on an output, updated every frame. |
| Window | A window of its own showing a texture, created by the Window operator. It can go fullscreen on any display. |