Using the Node Editor
The node editor is a vital part of Cyles4D. Almost everything you do regarding material creation is done here, and many features such ambient occlusion are added this way. Using the node editor effectively is therefore essential to the use of Cycles 4D.
If you have used Xpresso the node editor is similar to that but, as you will see, is more advanced and far more fully-featured. The basic principles are the same though: add nodes, change their settings, and link them together.
- Opening the Node Editor
- Options menu
- Editing the material and nodes
- Aligning nodes
- Other node editor operations
- Editor mini-map
For more information, also see these separate manual pages:
and the node reference pages:
Opening the Node Editor
Create a Cycles 4D object material, then double-click it and the node editor will open. It will contain a default node tree for the material that was created, so for an Object Material it would look like this:
As you can see, it is a blank window with two nodes in it, but you can change that from the Options menu.
Note also the mini-map in the bottom-left corner and the row of five buttons along the top.
You can also open the Node Editor from the Cycles 4D menu. If a Cycles 4D material is already selected in the Cinema 4D materials manager, the node tree will be shown in the editor. If no material is selected the node editor will be empty until you select a material.
The icon strip at the top of the window contains the following icons:
The first two icons allow you to switch between straight wires when connecting nodes (this is the first icon, with the tooltip 'Linear') and curved lines as in Cinema 4D's Xpresso editor (the second icon, tooltip 'Tangent').
The third icon allows you to turn the mini-map on or off - see the mini-map section below..
The final group of five icons are used to sort and/or align nodes in the editor. See the 'Aligning nodes' section below.
The node editor window has a small menu labelled 'Options' containing these entries:
Clicking this option will open an attributes pane in the node editor on the right-hand side. This will display the settings for the selected node:
You can remove this to free up space in the editor by clicking 'Show Attributes' again. If you close the attributes pane you can still edit the node settings in the node itself or in Cinema 4D's attributes manager.
Show Node List
If you click this option, a list of all available nodes for this type of material opens in the node editor in a new pane on the left-hand side:
The colour swatches against each node type are the same as are used in the title bar of a node belonging to this type.
You can add a new node to the editor window either by double-clicking the node in the list or by clicking and dragging the node into the editor window.
You can remove this to free up space in the editor by clicking 'Show Node List' again. If you close the node list pane you can still add nodes by right-clicking in the editor window and selecting a node from the context menu which appears.
Open All/ Close All
These two menu options only apply to the node list. If you click 'Close All' the submenus are all closed leaving just the group names - Color, Converter, and so on. Clicking 'Open All' opens all the submenus up again.
Finding a node in the list
If you want to find a particular type of node you can type its name or part of it in the edit field at the top of the node list. When you hit Enter, the list is shortened to show only those nodes matching what you typed. So for example, typing 'vo' into the field will result in the list showing only those nodes which begin with those letters:
Now only three nodes are seen, the 'Voronoi Texture' node and the two volume shader nodes. Simply clear the text field to show all the nodes again.
Editing the material and nodes
Changing the overall settings of the material is described on the Cycles 4D Materials page.
You can edit the node settings in three places: the node itself, the node editor, or Cinema 4D's attribute manager. To edit the node in the node editor, go to the 'Options' menu and select 'Show Attributes' as described above in the 'Options Menu' section. To select a node, click on it and the material and node settings will appear in the right-hand pane.
As an alternative, you can click a Cycles 4D material to select it in Cinema 4D's material manager, and it will appear in the Attributes Manager as with any Cinema 4D material:
You can then select the Node Settings tab to show the node settings for the node selected in the node editor:
Full details of editing the nodes are given in the 'Editing Node Settings' page.
There are two ways to align nodes automatically in the node editor: the context menu and the align icons at the top of the node editor window.
If you right-click in the node editor window to display the context menu there are a number of entries, most of which are relevant to editing specific nodes. These are discussed on other pages. There is one important sub-menu however: the node alignment menu.
If you select two more nodes in the editor, the menu looks like this:
Note that if no nodes are selected, the only option is 'Sort All'.
The equivalent icons are:
From left to right, these are:
- Sort All
- Sort Horizontally
- Sort Vertically
- Align Horizontally
- Align Vertically
You can hover over any icon with the mouse to show a tooltip indicating which button does what.
This option will try to move the nodes to align them vertically and horizontally. So a node tree that looks like this:
After 'Sort All' becomes this:
Very importantly, note that this only works on nodes connected to one another. Unconnected nodes are not affected.
Sort Vertically, Sort Horzontally
These options distribute nodes evenly over space in the editor window. 'Sort Vertically' does not move the nodes horizontally but redistributes them so that they are equally spaced vertically. 'Sort Horizontally' does the exact opposite.
Align Vertically, Align Horizontally
These options align the nodes by the tops of the nodes (vertical) or the side edges (horizontal).
Moving around in the editor
You can select nodes in the editor and move them around by dragging with the mouse. You can also select more than one node and drag them all round at the same time.
To pan around in the editor you can use the scrollbars which appear when the node editor window is resized below a certain size. If the scrollbars aren't visible (or even if they are, as it's more convenient) then with the mouse over the editor, hold the '1' key and move the mouse to pan around the editor.
You can zoom in or out with the mouse wheel or hold the '2' key and move the mouse to zoom.
These are settings for the material as a whole, not for individual nodes.
See the Cycles 4D Materials page for details.
You can add a node using the node list pane (see above) but you can also use the context menu in the node editor. To add a node, right-click anywhere in the nodes window (the black area) and the context menu appears:
Select the required node from this menu.
The 'Add' submenu is a special case. From this you can add a new frame, group or pivot:
To delete a node, select it and hit the Delete key. Or you can select it, then bring up the context menu and select Cut or Delete (Cut first copies the node to the clipboard, then deletes it).
Note that the Backspace and 'D' keys can also be used to delete nodes.
Sometimes the node may not be deleted when you hit the Delete (or Backspace) key. This is due to a quirk in Cinema 4D's handling of key presses in this environment. If that happens, click the node again and then try the Delete key; alternatively, use the context menu to delete the node.
The context menu also lets you copy a selected node or nodes, and paste the copy back into the node window.
If you select a node and right-click its title bar, a context menu appears. One option is 'Toggle Mute Selected'. This will turn the title bar colour red. While it is red, the node is 'muted' - it won't make any contribution to the material. This can be quite useful when editing materials to see what the effect of a node is.
Repeat the above operation to un-mute the node.
In this image the unmuted (active) node is on the left and the muted equivalent on the right.
Note: you may need to refresh the real time preview window by pausing and restarting it to see the effect of the muted node if you use the mute button.
Node name and colour
You cannot alter the colour of the node title bar but note that different categories of nodes (Color, Input, etc). have different title bar colours to make it easier to find a node. Finally, you can right-click a node to display the context menu, and rename the node by selecting 'Rename Node' from the menu.
Here are the colours for the various node types:
Node groups also have colours and you can change those if desires. See the node groups page for details.
You can resize a node by dragging on the resize handle at the bottom-right of the node:
Node ports (or sockets)
Cycles 4D nodes can have only input ports, only output ports, or both. Different types of ports have different colours to help you identify them more readily::
|Shader (includes ports such as Surface, Volume, etc.)||Green|
You can hide any ports which are not being used by right-clicking the node, then from the context menu choose 'Hide Unused Sockets'. To show them again, bring up the context menu then choose 'Unhide Unused Sockets'.
Making more space
Some of the nodes are quite large and occupy a lot of space in the node editor. You can reduce this by double-clicking the node title bar. It will then shrink to show only the title bar and connections, as shown in the image above demonstrating the node title colours.
This can be very useful to save space in the editor.
You can also close the node list and material settings panes by going to the 'Options' menu and unchecking both entries.
This is exactly the same as in Cinema's Xpresso editor. Drag with the mouse from one of the ports (or 'sockets') you want to connect to the other one. A 'rubber band' line will appear while dragging. When you get close to the second port, the line will snap to the port and the two connected ports will turn orange.
To disconnect two ports, either:
- click and hold the input port then drag away from the port and the connecting line will disappear;
- or hold the Alt key and click and drag across the connection; a red line will appear, and when you release the mouse button the connection will be broken:
- or click and hold on one of the nodes and 'shake' it a few times (waggle the mouse left to right) to disconnect the nodes
Cycles 4D also has a feature whereby nodes can be connected automatically. If you have two nodes connected together, and you create a third node, you can drag the third node over the connecting line and Cycles 4D will automatically connect the original output node to an input port on the new node, and an output port on the new node to the original input node. If you don't like this feature, you can turn it off in the Cycles 4D Preferences.
This usually works quite well and Cycles 4D does a good job of making appropriate connections, but if it gets it wrong you can break the connections it made and make your own.
Note that you aren't restricted to connecting ports only to other ports of the same type. For example, you can connect a colour to a numeric value because Cycles 4D will simply convert the colour to a number. Sometimes such connections aren't useful - connecting a vector output to the surface input of an object material output node, for example, will simply make the material go black - but it can be a time saver in some cases to avoid doing the conversion yourself.
Shortcuts to link nodes
There are other ways to link nodes that may be more convenient in some cases. These include:
Select two nodes and hit the 'F' key. Cycles 4D will try to connect the two nodes together. This works best when the outport of one node is the same type as the inport of another, for exampe, both are Color ports or both are Vector ports. Cycles 4D will not try to connect ports inappropriately, such as Color to Vector so if there are no identical port types, nothing happens.
If the two nodes have more than one identical port pair, for example they both have Color and Vector ports, only one pair will be connected. This may not be the one that you want of course, so this feature has its limitations.
Suppose you have a node with an output Color port and you'd like to connect it to the input Color ports of two more more other nodes. Rather than make each connection individually, you can do this:
- select the nodes you want to connect to
- on the node you want to connect from, right-click on the output port to be connected
- choose 'Connect Selected' from the menu:
The single output port will then be simultaneously connected to the equivalent input ports of the other nodes.
This method is sometimes better than the hotkey because you can specify which output port is to be used. As explained above the hotkey may sometimes choose a pair of ports to connect which aren't the ones you wanted.
Note that only identical ports will be connected - Color to Color, Vector to Vector, etc.
Editing node settings
This topic requires detailed explanation so has a separate page dedicated to it.
As with editing the node settings, node groups also have their own page.
If you have a complex node tree it can occupy a lot of screen space. You can reduce this by enclosing selected nodes in a frame, which can then be collapsed to reduce the space taken up. For example, suppose you have nodes arranged like this:
But you don't need to see all these nodes and you could use the space they occupy. If you select them all and right-click in the node editor the context menu contains the entry 'Frame Selected'.
If you choose 'Frame Selected' the three nodes you selected will all be added to a frame, like this:
This doesn't seem to have done very much but you can double-click the frame title bar to give this:
Which now takes up much less screen space (note that the frame title bar is reduced in width to avoid a long title bar occupying excessive space).
The other way to add nodes to frames is to choose 'Add->Empty Frame' from the context menu, which does exactly that - adds an empty frame to the editor. If you now select the three nodes then right-click on the frame's title bar, one option in the context menu which appears is 'Add Selected Nodes to Frame'. Click that, and the selected nodes are added to the frame. You can use this method to add more nodes to the frame at any time.
You can still edit the attributes of any node in the frame. Double-click the frame to expand it again, and now you can see and edit any of the nodes it contains.
Other frame options
You can do more with frames than this. Right-click on the title bar of a frame, and this context menu appears:
Most of these commands are described elsewhere, but note the following ones:
Toggle Mute Selected
If the frame is selected, choosing this option will mute the frame and all the nodes contained in it.
Add Selected Nodes to Frame
Click this option to add any selected nodes to the frame (the frame itself must not be selected when you do this, as the frame cannot add itself to itself!).
Removes the frame from the node editor and shows the nodes that were contained in it again.
In fact, the frame is just another node, so you can do with it more or less anything you can do with any node. You can even add a frame to another frame. It does not have any attributes of its own that you can change, though.
A pivot is a special node which allows you to connect two ports with a 'joint' - the pivot - in the middle. You can then move the pivot and the connections will follow with it. Here is a typical example:
The pivot is the yellow 'doughnut' shape between the two nodes. In this case it is yellow because the linked ports are Color ports, which are yellow; if they were Vector ports, the pivot would be purple.
To move the pivot, click and hold on the hole in the middle (not the yellow pivot body). You can then drag it elsewhere:
Adding a pivot
To add a new pivot, right-click in the node editor and choose 'Add->Pivot'. To connect, either:
- drag the pivot over an existing connection, which will automatically remake the connection to include the pivot;
- or drag from each port to the pivot to connect it to the pivot (note: the connection area of the pivot is on the left-hand edge for incoming connections and on the right-hand edge for outgoing connections)
Deleting a pivot
If you select the pivot and hit Delete, the pivot is deleted and the connections will be made directly between the ports. You can also click and hold a pivot and shake it, which will not delete the pivot but will break all the connections to and from it.
Editor mini-map (or global view)
With large node trees it is quite easy to lose track of all the nodes - some, perhaps many, may not be visible in the editor. You can still see where other nodes are though, with the mini-map display. This is found in the bottom-left corner of the node editor window:
The white line encloses the area in which all the nodes are contained, while the purple line shows the nodes in the visible area of the editor. The nodes are drawn in the colour of their node tye.
In the image shown, you can see that three nodes are present in the visible area of the editor, while another (actually an output node, from its colour) is present but not visible. The mini-map is interactive, so you can drag the purple area with the mouse to show those nodes not seen in the window.
If you don't like the mini-map display, you can turn it off and on by clicking this icon in the node editor's icon bar: