Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:06,020 --> 00:00:09,020
Let's have a basic look at how we can work
with the node editor.
2
00:00:09,020 --> 00:00:13,120
This will be a very brief introduction, and
for the rest, I'll mention important shortcuts
3
00:00:13,120 --> 00:00:14,780
throughout the course.
4
00:00:14,780 --> 00:00:18,510
You can also see all the keys I'm pressing
in the bottom right corner, in case you want
5
00:00:18,510 --> 00:00:21,330
to know some shortcut that I didn't mention.
6
00:00:21,330 --> 00:00:26,170
The result of this node tree is not important,
it's just a random setup to demonstrate how
7
00:00:26,170 --> 00:00:28,390
we can interact with the node editor.
8
00:00:28,390 --> 00:00:33,160
The node editor supports the same basic keys
as the 3D viewport.
9
00:00:33,160 --> 00:00:38,480
We can add nodes with Shift+A. This menu has
all the nodes organized in categories, and
10
00:00:38,480 --> 00:00:42,530
also gives us a convenient search feature,
for when we want to quickly add a node without
11
00:00:42,530 --> 00:00:47,910
knowing which category it belongs to.
12
00:00:47,910 --> 00:00:52,470
We can also delete nodes with the standard
X key, and if we want to delete a node, while
13
00:00:52,470 --> 00:00:59,350
preserving the connection that goes through
it, we can use Ctrl+X.
14
00:00:59,350 --> 00:01:06,350
The standard G, R, and S transformation keys
are also all supported.
15
00:01:06,350 --> 00:01:10,572
Since we enabled the Node Wrangler add-on
in the Setup Chapter, we can look at the output
16
00:01:10,572 --> 00:01:13,709
of a specific node by Ctrl+Shift+clicking
it.
17
00:01:13,709 --> 00:01:20,549
And if we do that several times, it will cycle
through its outputs.
18
00:01:20,549 --> 00:01:25,060
One very useful feature for organizing the
node tree, is the Reroute, which we can create
19
00:01:25,060 --> 00:01:28,229
by Shift+right clicking and dragging across
a node link.
20
00:01:28,229 --> 00:01:31,229
This allows us to shape the path of our node
links.
21
00:01:31,229 --> 00:01:35,450
If we do this while dragging across several
links that are connected to the same socket,
22
00:01:35,450 --> 00:01:39,850
it will group them, allowing us to have fewer
links crossing all over our node tree.
23
00:01:39,850 --> 00:01:44,950
A good tip when organizing the node links,
is to avoid almost parallel links crossing
24
00:01:44,950 --> 00:01:46,259
over each other.
25
00:01:46,259 --> 00:01:49,329
This makes it very hard to see which link
goes to where.
26
00:01:49,329 --> 00:01:53,880
Here we could avoid this crossing altogether,
but when a crossing is inevitable, it's preferable
27
00:01:53,880 --> 00:01:58,459
to have links crossing at more perpendicular
angles, which makes the crossing more obvious,
28
00:01:58,459 --> 00:02:01,340
and therefore easier to follow.
29
00:02:01,340 --> 00:02:05,349
Also avoid links that cross over a socket,
as it can make it seem like its connected
30
00:02:05,349 --> 00:02:07,840
to the socket, when it's not.
31
00:02:07,840 --> 00:02:14,220
Generally, I would just avoid having connections
crossing over nodes altogether.
32
00:02:14,220 --> 00:02:18,800
Another thing that is hard to read, is having
a link connected to a socket at a very vertical
33
00:02:18,800 --> 00:02:19,800
angle.
34
00:02:19,800 --> 00:02:23,590
This can make it hard to see which socket
the link is connected to, so it can be worth
35
00:02:23,590 --> 00:02:28,220
adding some Reroutes, just to make it more
readable.
36
00:02:28,220 --> 00:02:32,060
These tips are not really critical for the
end result of your shaders, but they can make
37
00:02:32,060 --> 00:02:35,500
your life much easier when working with large
and complex node trees.
38
00:02:35,500 --> 00:02:41,610
The extra effort will pay off by making your
work much faster down the line.
39
00:02:41,610 --> 00:02:44,260
Frames are another useful organizational tool.
40
00:02:44,260 --> 00:02:49,110
We can frame the selected nodes by pressing
Ctrl+J. This allows use to have a visual indication
41
00:02:49,110 --> 00:02:52,930
of which nodes are related to a specific part
of the shader.
42
00:02:52,930 --> 00:02:57,230
Dragging nodes within the Frame automatically
makes it readjust its size, and dragging the
43
00:02:57,230 --> 00:03:01,050
Frame itself also drags all the nodes inside.
44
00:03:01,050 --> 00:03:06,560
We can always add nodes to a Frame simply
by dragging them in, and we can remove them
45
00:03:06,560 --> 00:03:11,210
from a Frame with Alt+P, just like unparenting
objects.
46
00:03:11,210 --> 00:03:16,600
We can also rename a Frame with F2, and in
fact, we can use F2 to rename any node.
47
00:03:16,600 --> 00:03:23,750
And in the Frame properties, we can enable
color, to add custom color coding.
48
00:03:23,750 --> 00:03:29,150
Finally, we can group nodes, with Ctrl+G.
49
00:03:29,150 --> 00:03:32,130
This puts them in a sort of sub-tree.
50
00:03:32,130 --> 00:03:36,900
We can connect any socket inside the group
to the group inputs or outputs.
51
00:03:36,900 --> 00:03:41,320
And we can name them in the properties panel.
52
00:03:41,320 --> 00:03:49,720
When we exit the sub-tree, by pressing tab,
we see that in the main tree, it is represented
53
00:03:49,720 --> 00:03:54,420
as a single node, and all the inputs and outputs
that we connected are available as sockets.
54
00:03:54,420 --> 00:03:59,060
We can also rename the group in the name field.
55
00:03:59,060 --> 00:04:02,860
Groups are very useful when we want to hide
a section of the tree into its own module,
56
00:04:02,860 --> 00:04:06,980
but especially when we want to use the same
functionality several times.
57
00:04:06,980 --> 00:04:11,340
Conveniently, the node group appears in the
add menu, in the group section.
58
00:04:11,340 --> 00:04:15,700
So we can add several instances of the group
to our shader.
59
00:04:15,700 --> 00:04:24,289
Note that each instance references the same
sub-tree, so if we tab into one of them, and
60
00:04:24,289 --> 00:04:43,909
change something, the change is reflected
on all instances of the node group.
61
00:04:43,909 --> 00:04:47,960
But if we want to make a variation of a node
group, we can always duplicate the sub-tree
62
00:04:47,960 --> 00:04:52,659
by pressing the data-block counter, just like
with other data-blocks in Blender.
63
00:04:52,659 --> 00:05:03,259
This will make that instance of the node group
a unique copy.
64
00:05:03,259 --> 00:05:15,059
To demonstrate the importance of the these
organization practices, here is roughly what
65
00:05:15,059 --> 00:05:18,330
our node tree should look like by the end
of this course.
66
00:05:18,330 --> 00:05:23,550
It has clearly labeled sections, readable
node links, and groups for repeated snippets.
67
00:05:23,550 --> 00:05:28,100
Meanwhile, the very same node tree would look
like this, if we hadn't taken care of any
68
00:05:28,100 --> 00:05:29,100
of these things.
69
00:05:29,100 --> 00:05:33,979
Basically, it's a mess, and it's much harder
to follow, or to find anything in it.
70
00:05:33,979 --> 00:05:38,569
But don't worry if your node tree looks more
like this version while you're working.
71
00:05:38,569 --> 00:05:43,150
It's totally normal to get in the flow and
start adding things while neglecting the layout.
72
00:05:43,150 --> 00:05:48,210
Nobody can keep a node tree neat at all times,
so don't feel bad, just remember to periodically
73
00:05:48,210 --> 00:05:51,529
take some time to reorganize your tree.
74
00:05:51,529 --> 00:05:55,100
Also note that throughout this course, we
add more and more things, and they all seem
75
00:05:55,100 --> 00:05:57,900
to magically fall into convenient places.
76
00:05:57,900 --> 00:06:02,279
This is not generally how it goes, and I also
don't have any superhuman node organization
77
00:06:02,279 --> 00:06:06,529
skills, that's just because I'm working off
of a reference tree that I already prepared
78
00:06:06,529 --> 00:06:08,710
and cleaned up beforehand.
79
00:06:08,710 --> 00:06:12,889
When implementing your own shaders, you don't
know all the nodes that you'll add beforehand,
80
00:06:12,889 --> 00:06:16,849
so don't be discouraged if you have to reshuffle
your nodes around from time to time, to keep
81
00:06:16,849 --> 00:06:18,110
your tree in good shape.
8762
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.