Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:05,279 --> 00:00:09,480
Before we begin with the actual project, let's
optimize our Blender environment with some
2
00:00:09,480 --> 00:00:12,110
useful settings, and set up our scene.
3
00:00:12,110 --> 00:00:16,950
Firstly, opening the preferences, I'm setting
the UI scale a bit bigger, just to make everything
4
00:00:16,950 --> 00:00:20,590
easier to see in the screen captures, but
this is totally up to you.
5
00:00:20,590 --> 00:00:25,430
Now, if we switch to lookdev mode, which is
the third shading mode at the top of the viewport,
6
00:00:25,430 --> 00:00:29,230
we can see our scene under different lighting
environments that come with Blender.
7
00:00:29,230 --> 00:00:34,190
These are spherical high dynamic range images,
or HDRIs for short.
8
00:00:34,190 --> 00:00:38,260
They allow a scene to be lit with natural
environment lighting, captured from the real
9
00:00:38,260 --> 00:00:39,260
world.
10
00:00:39,260 --> 00:00:42,310
I'll just stick with the forest lighting.
11
00:00:42,310 --> 00:00:44,140
We can also rotate the lighting sphere.
12
00:00:44,140 --> 00:00:49,020
I found that for the wall we'll be working
on, a rotation of -25 degrees for the forest
13
00:00:49,020 --> 00:00:51,559
sphere gives a nice lighting angle.
14
00:00:51,559 --> 00:00:55,499
Feel free to experiment with different lighting
while working on shaders, as it gives you
15
00:00:55,499 --> 00:00:58,809
a good idea of how things will behave under
different lighting conditions.
16
00:00:58,809 --> 00:01:03,170
But for the purpose of this course, I'll always
be using this setup, to give a consistent
17
00:01:03,170 --> 00:01:06,340
view of the shader as it evolves.
18
00:01:06,340 --> 00:01:10,620
If we switch to rendered view, the only lighting
on the cube is from the default lamp, and
19
00:01:10,620 --> 00:01:12,060
the gray background.
20
00:01:12,060 --> 00:01:16,180
That's because we didn't set up any fancier
lighting for the actual render.
21
00:01:16,180 --> 00:01:20,120
In this course, we'll be setting the rendered
view to Cycles, while lookdev mode always
22
00:01:20,120 --> 00:01:24,090
uses Eevee, which gives us a convenient way
to switch between the two, which we'll be
23
00:01:24,090 --> 00:01:25,460
doing a lot.
24
00:01:25,460 --> 00:01:30,140
So to make the Cycles rendered view and the
Eevee lookdev view consistent, let's reproduce
25
00:01:30,140 --> 00:01:31,549
the same lighting.
26
00:01:31,549 --> 00:01:33,210
Firstly, we'll need a node editor.
27
00:01:33,210 --> 00:01:38,170
Since we are not animating anything, we don't
need a timeline, so let's just expand the
28
00:01:38,170 --> 00:01:42,850
timeline, and clicking on the editor mode
drop-down we can turn it into a shader editor.
29
00:01:42,850 --> 00:01:46,850
I'll be using a single window layout, for
the sake of the screen capture, but if you
30
00:01:46,850 --> 00:01:51,700
have multiple monitors, it can be very productive
to pop an editor into a separate window, by
31
00:01:51,700 --> 00:01:54,619
Shift clicking and dragging any corner of
the editor.
32
00:01:54,619 --> 00:01:56,840
This gives you much more space to work with.
33
00:01:56,840 --> 00:02:00,840
Personally, I like to have a whole window
for just my 3D viewport, and use the other
34
00:02:00,840 --> 00:02:06,590
one for the controls, like the node editor,
properties panel, and outliner.
35
00:02:06,590 --> 00:02:10,000
With the node editor open, we can set up the
world lighting.
36
00:02:10,000 --> 00:02:13,950
For that we can switch over from the object
shader to the world shader.
37
00:02:13,950 --> 00:02:18,480
The world shader gets evaluated whenever a
ray doesn't hit any object and goes off into
38
00:02:18,480 --> 00:02:19,500
infinity.
39
00:02:19,500 --> 00:02:23,450
This could either be a ray coming directly
from the camera, or after bouncing off an
40
00:02:23,450 --> 00:02:26,910
object.
41
00:02:26,910 --> 00:02:30,380
Here we see the that there is a background
shader, which basically works the same way
42
00:02:30,380 --> 00:02:33,380
as an emission shader which we talked about
before.
43
00:02:33,380 --> 00:02:35,310
Here it's emitting a gray color.
44
00:02:35,310 --> 00:02:40,180
But we want to use the same HDRI as in lookdev
mode, and for that we'll need an environment
45
00:02:40,180 --> 00:02:44,180
texture node, to load in the image.
46
00:02:44,180 --> 00:02:49,199
If we switch back to lookdev for a second,
and hover over the image in the HDRI selector,
47
00:02:49,199 --> 00:02:54,069
we can see the name of the texture file, which
in this case is forest.exr.
48
00:02:54,069 --> 00:02:56,879
Let's remember that, and go back to rendered
view.
49
00:02:56,879 --> 00:03:01,080
Now we can click the open button and browse
to our Blender installation directory.
50
00:03:01,080 --> 00:03:05,379
I'm using a custom Blender installation, but
you can see the standard installation directories
51
00:03:05,379 --> 00:03:08,370
for the different operating systems on the
screen.
52
00:03:08,370 --> 00:03:15,140
From the directory of our Blender version,
we can find the HDRIs in datafiles, studiolights,
53
00:03:15,140 --> 00:03:16,140
world.
54
00:03:16,140 --> 00:03:18,299
And there we see the forest file.
55
00:03:18,299 --> 00:03:22,510
With the texture loaded, we can just connect
the Color output to the background shader.
56
00:03:22,510 --> 00:03:26,659
Now we can see the HDRI, and it's lighting
the cube as well, but if we toggle between
57
00:03:26,659 --> 00:03:30,970
rendered and lookdev, an obvious difference
is that in rendered mode we can actually see
58
00:03:30,970 --> 00:03:33,129
the HDRI in the background.
59
00:03:33,129 --> 00:03:37,290
This gets very distracting, so let's set it
up such that it only affects the lighting,
60
00:03:37,290 --> 00:03:38,530
and not the background.
61
00:03:38,530 --> 00:03:43,870
Firstly, let's add a Mix RGB node, which allows
us to blend between two different colors.
62
00:03:43,870 --> 00:03:48,121
When the factor is zero, it uses the first
color fully, and when the factor is one, it
63
00:03:48,121 --> 00:03:49,970
uses the second color.
64
00:03:49,970 --> 00:03:53,450
So let's drag it all the way up, and set the
color that we want for the background in the
65
00:03:53,450 --> 00:03:54,450
second socket.
66
00:03:54,450 --> 00:03:59,640
Now we are using this gray both for the background
and the lighting, so we need a way to select
67
00:03:59,640 --> 00:04:01,680
which to use in each case.
68
00:04:01,680 --> 00:04:04,060
For that, we can add a light path node.
69
00:04:04,060 --> 00:04:07,950
As we talked about before, the light path
node gives us information about the current
70
00:04:07,950 --> 00:04:08,950
ray.
71
00:04:08,950 --> 00:04:12,970
We want the very first socket, which outputs
one if the ray is coming directly from the
72
00:04:12,970 --> 00:04:17,090
camera, and zero if it bounced off of some
object first.
73
00:04:17,090 --> 00:04:20,780
So feeding this into the factor allows us
to switch between the different colors when
74
00:04:20,780 --> 00:04:24,630
looking directly at the background, and when
it's used for anything else, like lighting
75
00:04:24,630 --> 00:04:26,550
or reflections.
76
00:04:26,550 --> 00:04:30,400
That takes care of the background, but now
if we toggle the view modes, the cube still
77
00:04:30,400 --> 00:04:34,750
doesn't look exactly the same, because we
rotated the HDRI in lookdev mode.
78
00:04:34,750 --> 00:04:39,500
To reproduce the same thing in rendered mode,
we can select the texture node, and in the
79
00:04:39,500 --> 00:04:44,740
N panel, under texture mapping, we can rotate
the texture -25 degrees around the Z axis,
80
00:04:44,740 --> 00:04:46,650
just like in lookdev.
81
00:04:46,650 --> 00:04:50,340
Now the lighting is almost identical, but
the cube is still a bit brighter in rendered
82
00:04:50,340 --> 00:04:51,370
mode.
83
00:04:51,370 --> 00:04:53,720
That's because we also have a lamp here.
84
00:04:53,720 --> 00:04:58,210
If we toggle its visibility in the outliner,
we see the same brightness difference, and
85
00:04:58,210 --> 00:05:01,500
with it disabled, lookdev and rendered view
are the same.
86
00:05:01,500 --> 00:05:05,500
But rather than removing the light, we can
tell Blender to also take it into account
87
00:05:05,500 --> 00:05:07,030
in lookdev mode.
88
00:05:07,030 --> 00:05:11,370
If we just open the viewport shading properties,
we can check Scene Lights, which enables all
89
00:05:11,370 --> 00:05:14,120
the lamps in the scene in lookdev as well.
90
00:05:14,120 --> 00:05:17,930
Now the lighting in lookdev and rendered view
is fully consistent, so we can move on to
91
00:05:17,930 --> 00:05:20,669
the rest of the setup.
92
00:05:20,669 --> 00:05:24,470
When we select a node, all the links that
are connected to it get highlighted.
93
00:05:24,470 --> 00:05:29,020
This is a really useful feature to see what's
connected to what, but it's not very visible,
94
00:05:29,020 --> 00:05:33,440
as the highlight is white, which is very similar
to the link color itself, so I like to change
95
00:05:33,440 --> 00:05:35,509
it to something more visible.
96
00:05:35,509 --> 00:05:39,321
For that, we can just open the preferences
again, and switching to the Themes tab, and
97
00:05:39,321 --> 00:05:43,740
opening the Node Editor section, we can find
the Wire Select color.
98
00:05:43,740 --> 00:05:48,390
I like to switch it to green, but it's up
to personal preference.
99
00:05:48,390 --> 00:05:52,110
The last thing we'll need to change in the
settings, is in the Add-ons tab.
100
00:05:52,110 --> 00:05:55,699
There we can search for the Node Wrangler
add-on which comes packaged with Blender,
101
00:05:55,699 --> 00:05:57,319
and enable it.
102
00:05:57,319 --> 00:06:01,380
This add-on has a bunch of features that make
life much easier when working with nodes in
103
00:06:01,380 --> 00:06:03,340
Blender.
104
00:06:03,340 --> 00:06:07,440
To conclude our Blender setup, let's enable
the node color, and expand that section in
105
00:06:07,440 --> 00:06:09,080
the properties panel.
106
00:06:09,080 --> 00:06:13,960
This allows us to set a display color, which
we will use a lot, to organize our nodes.
107
00:06:13,960 --> 00:06:18,160
We'll often want to copy the color from another
node, and this feature is hidden in the arrow
108
00:06:18,160 --> 00:06:19,840
menu next to the color field.
109
00:06:19,840 --> 00:06:24,860
This is not very convenient, so to have quick
access to this, let's right click, and select
110
00:06:24,860 --> 00:06:26,360
assign shortcut.
111
00:06:26,360 --> 00:06:28,750
Then we can press the key combination we want.
112
00:06:28,750 --> 00:06:34,030
Ctrl+Shift+C is a convenient shortcut that
is still unused here.
113
00:06:34,030 --> 00:06:39,009
Then we can disable the node color again,
as we don't need it for now.
114
00:06:39,009 --> 00:06:43,560
With the Blender configuration done, let's
set up the rest of the actual scene.
115
00:06:43,560 --> 00:06:47,800
Even though the environment shader takes care
of most of the lighting, the extra lamp is
116
00:06:47,800 --> 00:06:49,970
nice for some more highlights.
117
00:06:49,970 --> 00:06:52,699
Let's change it into a sun lamp, which makes
it directional.
118
00:06:52,699 --> 00:06:58,259
Now, if we switch to rendered view, and mute
the mix node with the M key, we can see the
119
00:06:58,259 --> 00:07:01,669
environment, and look for the sun direction,
so that we can align the lamp in roughly the
120
00:07:01,669 --> 00:07:10,150
same direction.
121
00:07:10,150 --> 00:07:16,729
With that done, the cube looks very overexposed,
so let's turn down the light intensity.
122
00:07:16,729 --> 00:07:19,199
That looks fine, so let's enable the mix node
again.
123
00:07:19,199 --> 00:07:24,509
Now, in the render tab, we can change the
render engine to Cycles.
124
00:07:24,509 --> 00:07:28,341
Now we can switch to lookdev view when we
want to check the shader in Eevee, and switch
125
00:07:28,341 --> 00:07:32,389
to rendered view for Cycles, and both have
the same lighting.
126
00:07:32,389 --> 00:07:36,300
Now, let's just prepare the geometry for the
wall.
127
00:07:36,300 --> 00:07:39,419
Let's get rid of the cube, and add a plane.
128
00:07:39,419 --> 00:07:44,150
Then, in edit mode, let's scale it up something
like ten times, and maybe scale it down to
129
00:07:44,150 --> 00:07:46,880
half that along the Y axis.
130
00:07:46,880 --> 00:07:50,470
It's important to do this in edit mode, to
preserve the object scale.
131
00:07:50,470 --> 00:07:54,669
We'll cover why this is relevant in the chapter
on coordinate spaces.
132
00:07:54,669 --> 00:07:58,669
We'll be using displacement in this shader,
which requires us to have actual geometry
133
00:07:58,669 --> 00:08:00,020
to displace.
134
00:08:00,020 --> 00:08:03,889
So let's add a Subdivision Surface modifier
and set it to simple.
135
00:08:03,889 --> 00:08:07,960
We'll need a lot of geometry, so let's set
the render subdivisions to something like
136
00:08:07,960 --> 00:08:12,990
seven, and the viewport subdivisions to, say,
five, just to keep it a bit faster for now.
137
00:08:12,990 --> 00:08:17,220
This still won't be enough geometry, but rather
than increasing subdivisions more, which are
138
00:08:17,220 --> 00:08:21,430
dynamically calculated, let's add some more
geometry in the actual mesh.
139
00:08:21,430 --> 00:08:25,669
This will speed up our render previews a bit,
and allow for faster iteration.
140
00:08:25,669 --> 00:08:29,760
So in edit mode, let's add a loop cut in the
middle, and subdivide the whole thing ten
141
00:08:29,760 --> 00:08:32,240
times.
142
00:08:32,240 --> 00:08:37,190
Finally, let's get the shader ready to start
working.
143
00:08:37,190 --> 00:08:41,040
So switching the shader editor back to object
mode, let's add the material that Blender
144
00:08:41,040 --> 00:08:43,950
had automatically created for the cube onto
the plane.
145
00:08:43,950 --> 00:08:48,020
And let's just delete the Principled shader,
as we don't need it for now, and this way
146
00:08:48,020 --> 00:08:51,900
we have a clean canvas to start working on.
147
00:08:51,900 --> 00:08:55,970
And to conclude the displacement setup, let's
go over to the material settings, and change
148
00:08:55,970 --> 00:09:00,200
the displacement mode from Bump Only to Displacement
and Bump.
149
00:09:00,200 --> 00:09:04,480
We go over what these settings do, in the
Displacement and Bump Chapter.
150
00:09:04,480 --> 00:09:08,090
Lastly, let's just make sure to save the file.
151
00:09:08,090 --> 00:09:11,900
Note that you can find this file, along with
the files for every chapter, in the course
152
00:09:11,900 --> 00:09:13,950
materials.
153
00:09:13,950 --> 00:09:15,910
And we're ready to begin the shading journey!
15717
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.