The Visual Compositor Window
Introduction
The Visual Compositor window shows the Compositor Graph of the selected GameObject, as indicated by the GameObject name located at the top.
When we select a newly created VisualCompositor component, two nodes (Render and Layer), which are connected by an edge, will be automatically created as shown in the figure above.
Ports
The small circles on the left and right sides of the nodes are called input and output ports.
They can be connected to ports in other nodes to form edges.
Edges
Edges connect output ports to input ports in order to create the functionality of the graph.
Click and drag an output port to the input port of another node to connect them.
Navigation
Selecting
Selecting nodes is done with the left mouse button. We can also select multiple nodes by left clicking an empty area, and dragging to draw a rectangle around the nodes we want to select. We can then reposition all selected nodes by left clicking on a selected node and dragging to the new position.
Zooming
We can zoom the view in and out, using the scroll wheel on the mouse.
Panning
We can pan the view by middle-clicking in an empty space, and dragging in the appropriate direction.
Minimap
As we pan the view, some nodes will disappear off the edge of the window.
We can find them using the minimap, which will grow and shrink in scale so that it can display the entire graph.
Creating and Deleting Nodes
To create a node:
- Show the search box by
- Right clicking in an empty area and choose Create Node, or
- Pressing the spacebar key.
- Select the node to create in the search box.
We can filter nodes by name in the search box.
The types of supported nodes can be seen in the nodes documentation.
To delete a node, select it, and then press the delete key.
Special Nodes
Group
Group is a special node which can contain other nodes.
Other than helping organize our graph, it has no other functionality.
We can drag nodes into the group node, which will add them to the group.
To remove a node from a group, press shift while dragging the node outside of the group.
Layer
Layer is a special node, which represents a part of the composition final output.
Multiple layers are arranged in a stack, and we can re-order individual layer nodes as required.
If a layer is detached from the stack, it is no longer used in the composition, and
it can be dragged back into the stack when needed.