Skip to content

Commit

Permalink
Documentation Nodes NodeGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
bonalex01dev committed May 21, 2021
1 parent 25ac341 commit 30cd537
Show file tree
Hide file tree
Showing 16 changed files with 208 additions and 3 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
160 changes: 157 additions & 3 deletions Documentation/source/guide/getstarted-environment-nodegraph.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,163 @@
.. for help on writing/extending this file, see the reStructuredText cheatsheet
http://github.com/ralsina/rst-cheatsheet/raw/master/rst-cheatsheet.pdf
Navigating inside the node graph
Navigating inside the Node Graph
================================

.. toctree::
:maxdepth: 2
Pan the nodes view: ``middle mouse drag``

zoom the nodes view: ``ALT + middle mouse drag``

Frame all nodes: shortcut ``f``

Frame only selected nodes: shortcut ``f``

.. image:: _images/Environment/environment-big-node-graph.gif

Mini Node Graph
The bottom right rectangle shows a minified view of the graph.

Click and drag the yellow rectangle to change the part of the graph that is displayed

.. image:: _images/Environment/environment-mini-node-graph.gif




Node Graph Tidiness
===================

Rearrange Nodes
---------------
- Select several nodes connected in chain
- press shortcut ``L``
Nodes are automatically aligned vertically without moving the last one

.. image:: _images/Environment/environment-rearrange-node-graph.gif

Natron's Tidy Nodes
-------------------

Natron has a couple of nodes devoted entirely to script housekeeping.

Backdrop
::::::::

A Backdrop is a flat colored sheet that can be placed behind a bunch of nodes. This is useful for making a complex script easier to read. I use backdrops in many of my. The other useful thing about a backdrop, is that its entire contents can be moved about by simply dragging on its header bar.
Colored backdrops in a node graph.

.. image:: _images/Environment/environment-nodegraph-backdrop.gif

Create a backdrop
- Tools Palette "Other"
- Select "Backdrop
or
- Press ``Tab``
- Type "bac"
- Select Backdrop in the list

Backdrops can be color coded.
A common convention is:

- Grey Mattes
- Blue CG
- Green Live action footage
- Yellow Made in Nuke
- Pink Other


.. note:: A backdrop can be used as a sticky note to store text information inside nuke's project.

Use the "Control"/"label" text field to type in

Dot
:::

A Dot can be added to any arrow that runs between nodes. This can be used to maintain tidiness. One general rule of node graph tidiness is that arrows should run vertically or horizontally, not diagonally. To add a dot, hold down the 'command' key and click the yellow dot that appears.

.. image:: _images/Environment/environment-dot-drag.gif

Group
:::::

Many nodes can be grouped together to make the graph easier to read.

- select the Nodes
- hit ``CTRL+G``.
The nodes will be replaced by a group node containing them all.

Its content is automatically opened in a new node graph tab called "Group"
To reopen later this node graph click the eye icon in the top bar of the group node.

.. image:: _images/Environment/environment-nodes-group-opengraph.gif

Nodes properties
----------------

Nodes naming
::::::::::::

Label everything (using NoOps with preview enabled, BackDrops etc)

Rename the "Label" of a node not the "script name"

.. image:: _images/Environment/environment-nodes-rename.gif

Previews
::::::::

A node can show a thumbnail of it's output by ticking the Preview checkbox.


.. image:: _images/Environment/environment-nodes-preview.gif

.. note:: If a node graph has many previews it can slow down the display. You can disable the auto refresh of these previews disabling the "Auto Previews" checkbox of the project settings (shortcut ``S`` in the node graph)

.. image:: _images/Environment/environment-nodes-autopreview.gif


Hide input
::::::::::

When nodes have very long connections they can make the node graph difficult to read. To avoid this you can hide the input arrow of a node.

The input arrows only disappear when the node is not selected.

To make the script easy to read you often enable the preview and rename the node with the input hiddens

.. image:: _images/Environment/environment-nodes-hide_input.gif

Nodes placement convention
--------------------------

Scripts should be readable: laid out in a rational and consistent manner. This is to enable their easy reading by you and anyone else who might review your script.

A common convention is:

- Main input feed from the top.

the B input of the merge that is transmitted when the node is disabled
- Masks feed in from the right

usually labelled mask
- Image secondary inputs feed in from the left.

the A input for the Merge
- Favour vertical connections for main branches.

They allow naming the nodes without overlap and take less screen room. The autoarrange functions is coded for this.
- Favour horizontal connections over diagonal ones to connect several branches.

Dots can be used to make this happen.
- Put everything inside backdrops.

This useful even for moving groups of nodes, to ensure you don't forget part of a function
- Label everything.

Using backdrops, postage stamps, and the Labels of the nodes.
- Don't change the script name.

This can be confusing for humans and the expression engine.
It's not a viable option because no two nodes can have the same name. Hence Natron does some automatic renaming when duplicating nodes

For more in depth information on Nodes see :doc:`Nodes <getstarted-environment-nodes>`
51 changes: 51 additions & 0 deletions Documentation/source/guide/getstarted-environment-nodes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,56 @@ Merge nodes can have many inputs added when required to allow many merge operati
.. image:: _images/TheNodes-Image/node_multiple_inputs.gif
:width: 600

Creating nodes
--------------
Nodes can be created in 3 ways

- Use their shortcut
``G`` Grade

``T`` Transform

``B`` Blur

``C`` ColorCorrect

``R`` Read

``W`` Write

``.`` Dot

``O`` Roto

``P`` Rotopaint

``M`` Merge
- Pick the node in the tools palette under each category.

.. image:: _images/toolbar_02.jpg

- Call the Node search menu with ``tab`` then type some letters to make the list of the names appears

.. image:: _images/Environment/environment-nodes-node_select.gif

Duplicating Nodes
-----------------

Nodes can be duplicated by copying (shortcut ``CTRL+C``) and pasting (shortcut ``CTRL+V``)

This create two independent copies.

If you want the two copies to process different images with the same parameters even when they are changed the nodes can be cloned (shortcut ``ALT+K``).

The link between the nodes is shown with a pink arrow.

.. image:: _images/Environment/environment-nodes-clones.gif


.. note::
- Even Group (New in v2.4) and Roto can be cloned (which is not possible in nuke)
- Beware that parameters of the group are clones dynamically updated but not the internal structure of nodes inside the group

Connections
------------
To connect a node to another:
Expand All @@ -51,6 +101,7 @@ select it, press ``ctrl+shift+x``
.. image:: _images/TheNodes-Image/node_extract.gif

**community scripts**

To connect distant nodes, select output node, input node, press ``y``

.. image:: _images/TheNodes-Image/node_distant_connect.gif
Expand Down

0 comments on commit 30cd537

Please sign in to comment.