Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,230 --> 00:00:02,750
- [Zach] Welcome to the
second bonus video where we
2
00:00:02,750 --> 00:00:05,560
recreate the cubic world
shader from scratch.
3
00:00:05,560 --> 00:00:09,690
Here in this video, we will
finish up the nodes setup.
4
00:00:09,690 --> 00:00:13,240
So besides the gradient button,
edge, and the random color,
5
00:00:13,240 --> 00:00:15,520
we are still missing the specular,
6
00:00:15,520 --> 00:00:18,660
which I'm mainly using
for transparent materials.
7
00:00:18,660 --> 00:00:22,340
For that, let's hit Shift +
A and add a noise texture.
8
00:00:22,340 --> 00:00:24,700
Then let's select this
and with the Node Wrangler
9
00:00:24,700 --> 00:00:28,290
add-on enabled, let's press
Control + T to add this mapping
10
00:00:28,290 --> 00:00:29,890
and texture coordinate set up.
11
00:00:29,890 --> 00:00:31,570
However here we don't need the mapping,
12
00:00:31,570 --> 00:00:34,120
so let's press Control + X to remove it
13
00:00:34,120 --> 00:00:36,260
without losing the connection here
14
00:00:36,260 --> 00:00:39,460
and here let's connect
the reflection output
15
00:00:39,460 --> 00:00:41,330
to the noise texture vector.
16
00:00:41,330 --> 00:00:43,620
If I now hold on Control
+ Shift + Left Click
17
00:00:43,620 --> 00:00:45,570
to preview the vector over here,
18
00:00:45,570 --> 00:00:48,410
we can see that this
noise texture is displayed
19
00:00:48,410 --> 00:00:51,810
on this object as if this is a reflection,
20
00:00:51,810 --> 00:00:53,470
which looks pretty cool already.
21
00:00:53,470 --> 00:00:55,170
To make this a bit better visible,
22
00:00:55,170 --> 00:00:58,150
let's hit Shift + A and
search for a color ramp
23
00:00:58,150 --> 00:01:00,100
and add it behind the noise texture.
24
00:01:00,100 --> 00:01:02,600
And if I move the black handle over here,
25
00:01:02,600 --> 00:01:04,750
we are increasing the contrast here,
26
00:01:04,750 --> 00:01:07,170
and to make the edges
here look a bit smoother,
27
00:01:07,170 --> 00:01:10,270
lets change the interpolation to ease out.
28
00:01:10,270 --> 00:01:11,880
This looks better, as you can see.
29
00:01:11,880 --> 00:01:13,420
Then let's select the black handle
30
00:01:13,420 --> 00:01:16,080
and set this to be something like 0.6,
31
00:01:16,080 --> 00:01:18,490
the white handle to be 0.7,
32
00:01:18,490 --> 00:01:21,200
and then we have very high contrast here.
33
00:01:21,200 --> 00:01:23,970
Then let's simplify the noise texture,
34
00:01:23,970 --> 00:01:26,710
maybe let's scale it to
four which makes the texture
35
00:01:26,710 --> 00:01:29,130
a bit bigger, reduce the details to zero,
36
00:01:29,130 --> 00:01:30,510
the roughness to zero,
37
00:01:30,510 --> 00:01:34,140
and then we have these big
smooth blobs on the texture.
38
00:01:34,140 --> 00:01:37,720
And as I mentioned before, we
will use the orthographic view
39
00:01:37,720 --> 00:01:39,450
for our Cubic World scenes.
40
00:01:39,450 --> 00:01:44,310
So this is how it looks like
when I orbit around the object.
41
00:01:44,310 --> 00:01:48,040
So we have these white spots
popping up here and there.
42
00:01:48,040 --> 00:01:52,060
Now before we add the specular
on top of our defuse shader,
43
00:01:52,060 --> 00:01:53,890
let's first add the emission shader
44
00:01:53,890 --> 00:01:57,270
and the transparency
setup because we will add
45
00:01:57,270 --> 00:01:59,700
this specular later on top.
46
00:01:59,700 --> 00:02:02,290
But before we do that, let's
select these nodes here.
47
00:02:02,290 --> 00:02:04,990
Press Control + J to frame them, F2,
48
00:02:04,990 --> 00:02:07,670
let's call it specular,
increase the label size,
49
00:02:07,670 --> 00:02:11,130
and let's press Control + H
to hide the unnecessary in
50
00:02:11,130 --> 00:02:14,040
and outputs and we can
go even one step further
51
00:02:14,040 --> 00:02:16,950
by collapsing these nodes,
because we don't need
52
00:02:16,950 --> 00:02:19,010
to change any settings on them.
53
00:02:19,010 --> 00:02:21,210
And we can do it basically
for all the nodes where
54
00:02:21,210 --> 00:02:23,850
we don't need to change any settings.
55
00:02:23,850 --> 00:02:28,610
To clean up our whole nodes
setup even more, same down here.
56
00:02:28,610 --> 00:02:31,050
And as you can see this
looks now much cleaner
57
00:02:31,050 --> 00:02:34,230
and we can immediately see
which nodes are important
58
00:02:34,230 --> 00:02:36,000
to change any settings here.
59
00:02:36,000 --> 00:02:38,760
So right now we have our
diffuse shader set up,
60
00:02:38,760 --> 00:02:40,500
so for all the materials which should
61
00:02:40,500 --> 00:02:42,850
just be like solid objects.
62
00:02:42,850 --> 00:02:44,980
Now in order to make an emissive material,
63
00:02:44,980 --> 00:02:48,110
let's hit Shift + A, search
for the emission shader,
64
00:02:48,110 --> 00:02:51,440
put it in here, and all we
need to do is to add a color
65
00:02:51,440 --> 00:02:54,530
to the emission as well, and
then we can simply connect this
66
00:02:54,530 --> 00:02:56,280
to the surface, and with the strength
67
00:02:56,280 --> 00:02:59,600
we can change the strength
of the emission shader,
68
00:02:59,600 --> 00:03:02,470
pretty simple, and now let's set this up
69
00:03:02,470 --> 00:03:03,970
for the transparency.
70
00:03:03,970 --> 00:03:07,070
For that, we need the transparent shader,
71
00:03:07,070 --> 00:03:09,680
not the translucent, and
first of all, connect this
72
00:03:09,680 --> 00:03:13,420
with the surface here and
also plug in the color.
73
00:03:13,420 --> 00:03:15,930
Then in order to see
transparency on the object,
74
00:03:15,930 --> 00:03:19,050
we need to change the
blend mode to alpha blend
75
00:03:19,050 --> 00:03:21,310
and in order to make it
work for the shadow as well,
76
00:03:21,310 --> 00:03:23,810
change the shadow to alpha hashed.
77
00:03:23,810 --> 00:03:27,170
However, we can barely
see the transparency,
78
00:03:27,170 --> 00:03:28,630
now it looks a bit weird.
79
00:03:28,630 --> 00:03:31,280
We can't really control the opacity,
80
00:03:31,280 --> 00:03:33,310
and for that, let's hit Shift + A,
81
00:03:33,310 --> 00:03:36,500
add a diffuse shader, and
hit Shift + A once again
82
00:03:36,500 --> 00:03:40,220
and add mix shader, not the mix RGB node,
83
00:03:40,220 --> 00:03:42,500
plug it in here, then
put the diffuse shader
84
00:03:42,500 --> 00:03:46,070
into shader input one, the
transparent shader input two
85
00:03:46,070 --> 00:03:47,510
and then let's also add the color
86
00:03:47,510 --> 00:03:49,400
to the diffuse shader up here
87
00:03:49,400 --> 00:03:51,150
and now we have this nice slider here
88
00:03:51,150 --> 00:03:53,790
which allows us to change the opacity
89
00:03:53,790 --> 00:03:56,270
and maybe let's reduce the
strength of the gradient
90
00:03:56,270 --> 00:03:59,020
a bit here so we can
better see what's going on
91
00:03:59,020 --> 00:04:01,980
and now you can see it is transparent.
92
00:04:01,980 --> 00:04:04,700
So now we have the basic
setup for the transparency,
93
00:04:04,700 --> 00:04:08,240
the emission, and the diffuse
and now let's add the specular
94
00:04:08,240 --> 00:04:11,700
on top and this we do with an add shader.
95
00:04:11,700 --> 00:04:14,800
An add shader and also a mix
shader is something similar
96
00:04:14,800 --> 00:04:17,920
as the mix RGB node
here, but in this case,
97
00:04:17,920 --> 00:04:22,230
we can mix shaders, not different
color and texture values.
98
00:04:22,230 --> 00:04:24,150
So that means we need two shaders
99
00:04:24,150 --> 00:04:24,983
in order to mix something.
100
00:04:24,983 --> 00:04:27,970
Let's duplicate the diffuse
shader, connect these two
101
00:04:27,970 --> 00:04:30,823
in here, and let's plug in the specular
102
00:04:30,823 --> 00:04:33,480
into the upper diffuse shader
and let's reconnect this
103
00:04:33,480 --> 00:04:36,090
with the surface here and let's
change the blend mode back
104
00:04:36,090 --> 00:04:39,210
to opaque so we can see it as solid object
105
00:04:39,210 --> 00:04:42,640
and now we can see how the
specular is added on top.
106
00:04:42,640 --> 00:04:44,330
So now there is still a little problem
107
00:04:44,330 --> 00:04:47,100
because I want to be able
to disable the specular
108
00:04:47,100 --> 00:04:49,330
and change the color and the intensity
109
00:04:49,330 --> 00:04:51,750
and this we could do by
selecting the white handle
110
00:04:51,750 --> 00:04:55,770
and reducing the color to
black, then this will disappear.
111
00:04:55,770 --> 00:04:58,390
However, doing this inside this color ramp
112
00:04:58,390 --> 00:05:01,110
is a bit problematic for further use.
113
00:05:01,110 --> 00:05:05,460
So let's add a simple mix
RGB behind the color ramp,
114
00:05:05,460 --> 00:05:08,120
plug the output into the vector here,
115
00:05:08,120 --> 00:05:10,970
and change the first color to be black,
116
00:05:10,970 --> 00:05:13,180
and the second color to be pure white
117
00:05:13,180 --> 00:05:15,830
and now if I Control + Shift +
Left Click on the color ramp,
118
00:05:15,830 --> 00:05:18,400
this is how the output from
the color ramp looks like,
119
00:05:18,400 --> 00:05:21,210
and if I click on here with
Control + Shift + Left Click,
120
00:05:21,210 --> 00:05:23,370
you can see it looks identical.
121
00:05:23,370 --> 00:05:27,470
However, now we have the ability
to simply change the color
122
00:05:27,470 --> 00:05:30,820
over here and the intensity
and this output now goes
123
00:05:30,820 --> 00:05:32,800
into the diffuse shader up here.
124
00:05:32,800 --> 00:05:34,610
Let's move this into the frame
125
00:05:34,610 --> 00:05:36,890
and then it is also inside here.
126
00:05:36,890 --> 00:05:38,480
Then we can collapse the color ramp,
127
00:05:38,480 --> 00:05:41,170
we don't need it anymore,
and then let's put a frame
128
00:05:41,170 --> 00:05:44,250
around this set up here, Control + J, F2,
129
00:05:44,250 --> 00:05:47,120
let's call this diffuse,
and increase the label size
130
00:05:47,120 --> 00:05:49,820
and down here, let's add the same setup
131
00:05:49,820 --> 00:05:52,810
as up here to add the specular on top.
132
00:05:52,810 --> 00:05:54,960
Hit Shift + A, add an add shader here,
133
00:05:54,960 --> 00:05:58,090
duplicate the diffuse
shader, connect this up here,
134
00:05:58,090 --> 00:06:01,660
and this here as well and
then let's grab the output
135
00:06:01,660 --> 00:06:04,307
from the specular and plug
this into this color here
136
00:06:04,307 --> 00:06:07,190
and now when I connect
this to the material output
137
00:06:07,190 --> 00:06:09,140
and re-enable the alpha blend,
138
00:06:09,140 --> 00:06:11,590
we can see we have this transparency
139
00:06:11,590 --> 00:06:15,790
but we still have the full
strength of the specular here.
140
00:06:15,790 --> 00:06:19,400
If I would have added the
specular here on the color level,
141
00:06:19,400 --> 00:06:22,220
like with a mix RGB node,
and then simply plugged this
142
00:06:22,220 --> 00:06:25,370
into the diffuse shader
and into the transparency,
143
00:06:25,370 --> 00:06:29,580
we would lose the strength
of the specular effect here.
144
00:06:29,580 --> 00:06:32,530
So let's add a frame around
these nodes down here,
145
00:06:32,530 --> 00:06:35,960
call it transparency, and
again, let's press Control + H
146
00:06:35,960 --> 00:06:39,990
to hide unnecessary in and
outputs, and collapse these here.
147
00:06:39,990 --> 00:06:42,600
Here we don't want to change
anything, same over here.
148
00:06:42,600 --> 00:06:45,170
We only need this mix slider here.
149
00:06:45,170 --> 00:06:46,500
Here we need the strength,
150
00:06:46,500 --> 00:06:49,850
and here we can basically
collapse everything.
151
00:06:49,850 --> 00:06:51,980
So with everything moved around a bit,
152
00:06:51,980 --> 00:06:52,960
This is what we have.
153
00:06:52,960 --> 00:06:55,647
We have the diffuse output,
the emission output,
154
00:06:55,647 --> 00:06:57,999
and the transparency output.
155
00:06:57,999 --> 00:06:59,999
Let's stay with the diffuse output here,
156
00:06:59,999 --> 00:07:02,040
and let's change this back to opaque,
157
00:07:02,040 --> 00:07:04,363
same for the shadow mode, opaque.
158
00:07:05,270 --> 00:07:08,420
And now let's quickly put
this into a nice node group.
159
00:07:08,420 --> 00:07:10,090
For that, let's select everything here
160
00:07:10,090 --> 00:07:11,750
except the material output,
161
00:07:11,750 --> 00:07:15,080
press Control + G to
pack this into a group,
162
00:07:15,080 --> 00:07:17,560
then hit Tab to get outside of this group
163
00:07:17,560 --> 00:07:20,000
and now you can see all
these nodes were grouped
164
00:07:20,000 --> 00:07:22,450
inside this simple node group.
165
00:07:22,450 --> 00:07:25,750
Let's call this
CW_Shader_new, for example.
166
00:07:25,750 --> 00:07:28,810
However, as you can see over
here, now we don't have access
167
00:07:28,810 --> 00:07:32,110
to all these nice sliders
and color changers
168
00:07:32,110 --> 00:07:34,330
and let's quickly set this up.
169
00:07:34,330 --> 00:07:37,400
If I select this and hit
Tab, I can look inside
170
00:07:37,400 --> 00:07:38,380
this node group.
171
00:07:38,380 --> 00:07:40,230
Let's press Control + Space
172
00:07:40,230 --> 00:07:43,150
to full screen the shader editor here
173
00:07:43,150 --> 00:07:45,070
and we have two new nodes here,
174
00:07:45,070 --> 00:07:47,960
we have the group input
and the group output,
175
00:07:47,960 --> 00:07:49,770
and if I click on group up here,
176
00:07:49,770 --> 00:07:52,010
if you don't have the
sidebar open press N,
177
00:07:52,010 --> 00:07:54,880
and here we also have a
list of inputs and outputs,
178
00:07:54,880 --> 00:07:57,170
and here we can do some
pretty cool things.
179
00:07:57,170 --> 00:07:59,660
First of all, you can
see the diffuse shader
180
00:07:59,660 --> 00:08:02,040
is already connected with the output node
181
00:08:02,040 --> 00:08:03,610
and if I hit Tab to go back,
182
00:08:03,610 --> 00:08:05,500
we can see this output over here.
183
00:08:05,500 --> 00:08:09,840
And if I now connect the
emission and also the add shader
184
00:08:09,840 --> 00:08:12,160
from the transparency setup, we can see
185
00:08:12,160 --> 00:08:14,610
that we have the list of
outputs over here as well,
186
00:08:14,610 --> 00:08:17,030
and over here, if I double click on these,
187
00:08:17,030 --> 00:08:19,890
I can simply change the names to diffuse,
188
00:08:19,890 --> 00:08:20,940
emission is good.
189
00:08:20,940 --> 00:08:23,110
Let's change the last one to transparency,
190
00:08:23,110 --> 00:08:24,950
which we now can also see over here.
191
00:08:24,950 --> 00:08:28,070
So we can simply connect
whatever we want to use.
192
00:08:28,070 --> 00:08:30,430
Either diffuse, emission or transparency
193
00:08:30,430 --> 00:08:33,030
and now we need to define
the inputs over here.
194
00:08:33,030 --> 00:08:35,120
First of all, let's connect the base color
195
00:08:35,120 --> 00:08:39,240
and this we had set up using
this temporary RGB node.
196
00:08:39,240 --> 00:08:41,950
That means we need to connect color one,
197
00:08:41,950 --> 00:08:45,510
and also color one from this
one here, to the same socket.
198
00:08:45,510 --> 00:08:48,390
That means now here we
can change the color
199
00:08:48,390 --> 00:08:50,840
and this will change
the color of input one
200
00:08:50,840 --> 00:08:54,070
from this mix node and input
one from this mix node.
201
00:08:54,070 --> 00:08:56,370
Then let's change this to base color,
202
00:08:56,370 --> 00:08:59,780
and let's connect color two,
which was the random color.
203
00:08:59,780 --> 00:09:01,860
So let's call this random color.
204
00:09:01,860 --> 00:09:05,960
The next input should be
the color of the specular,
205
00:09:05,960 --> 00:09:08,496
which is this output
here, let's connect this.
206
00:09:08,496 --> 00:09:10,050
Let's call this specular color.
207
00:09:10,050 --> 00:09:12,410
Then we want to be able
to control the strength
208
00:09:12,410 --> 00:09:15,530
of both gradients, so
let's connect this one here
209
00:09:15,530 --> 00:09:17,310
and also this one here,
210
00:09:17,310 --> 00:09:20,750
which we call gradient
edges and gradient bottom.
211
00:09:20,750 --> 00:09:24,300
Then we want to control the
strength of the transparency
212
00:09:24,300 --> 00:09:26,670
which we can find over
here, let's connect this.
213
00:09:26,670 --> 00:09:29,710
Let's make this bigger here, transparency.
214
00:09:29,710 --> 00:09:32,800
Then up here we want to
control the randomness.
215
00:09:32,800 --> 00:09:34,770
Meaning if we want to have the randomness,
216
00:09:34,770 --> 00:09:37,720
yes or no basically,
let's call this random
217
00:09:37,720 --> 00:09:40,160
and the last thing we need is the strength
218
00:09:40,160 --> 00:09:43,150
of the emission shader,
which we call emission.
219
00:09:43,150 --> 00:09:45,230
So, and then I think this is all we need.
220
00:09:45,230 --> 00:09:48,030
Then we can delete this
temporary RGB node,
221
00:09:48,030 --> 00:09:49,860
and if I go back with Tab,
222
00:09:49,860 --> 00:09:51,730
we now have everything we need here.
223
00:09:51,730 --> 00:09:54,730
We can change the base color,
random color, specular color,
224
00:09:54,730 --> 00:09:57,910
the different gradients,
transparency, randomness,
225
00:09:57,910 --> 00:09:59,620
and the emission.
226
00:09:59,620 --> 00:10:00,930
And before we test this setup,
227
00:10:00,930 --> 00:10:02,400
let's get back into the shader,
228
00:10:02,400 --> 00:10:05,830
and if I click through
these different inputs here,
229
00:10:05,830 --> 00:10:08,870
we can see that we can
define default values,
230
00:10:08,870 --> 00:10:10,040
which is really cool.
231
00:10:10,040 --> 00:10:12,040
So let's change the default values here,
232
00:10:12,040 --> 00:10:14,800
base colors should be
pure white, I would say,
233
00:10:14,800 --> 00:10:16,620
random color the same.
234
00:10:16,620 --> 00:10:18,810
Specular color should be pure black,
235
00:10:18,810 --> 00:10:20,770
so it's disabled by default.
236
00:10:20,770 --> 00:10:25,490
The gradient I usually set
up to 0.5, the edge gradient,
237
00:10:25,490 --> 00:10:28,420
and the minimum value is
zero, and the maximum is one.
238
00:10:28,420 --> 00:10:31,480
The bottom gradient I
usually set up to 0.75,
239
00:10:33,034 --> 00:10:35,440
minimum zero, maximum is one.
240
00:10:35,440 --> 00:10:38,840
Transparency is set to zero,
minimum and maximum the same.
241
00:10:38,840 --> 00:10:40,270
The randomness is also set
242
00:10:40,270 --> 00:10:42,530
to zero, minimum and maximum the same.
243
00:10:42,530 --> 00:10:45,120
And the emission is
set to zero by default,
244
00:10:45,120 --> 00:10:48,720
minimum is zero and maximum
can be as high as you like,
245
00:10:48,720 --> 00:10:51,820
if you want really
strong glowing elements.
246
00:10:51,820 --> 00:10:54,430
Then let's hit Tab, press
Control + Space to get out
247
00:10:54,430 --> 00:10:57,680
of full screen mode and now
if I delete this shader here,
248
00:10:57,680 --> 00:11:01,760
hit Shift + A, go to group,
and add this CW_Shader_new,
249
00:11:01,760 --> 00:11:04,780
then you can see that all
these values are reset
250
00:11:04,780 --> 00:11:07,820
to the default values, and
if you click this shield,
251
00:11:07,820 --> 00:11:10,740
by the way, we add a fake
user, so we make sure
252
00:11:10,740 --> 00:11:13,620
that this shader group
stays in this blend file
253
00:11:13,620 --> 00:11:17,820
even though we would delete it,
and no material is using it.
254
00:11:17,820 --> 00:11:19,530
So let's connect this
255
00:11:19,530 --> 00:11:22,950
and let's quickly see if
everything works as expected.
256
00:11:22,950 --> 00:11:26,330
So we can change the color
here, and that's great.
257
00:11:26,330 --> 00:11:29,860
We can add a random color
when we have random set to one
258
00:11:29,860 --> 00:11:32,020
and now when we duplicate
this, each of them
259
00:11:32,020 --> 00:11:33,920
should have a random color.
260
00:11:33,920 --> 00:11:34,880
Works nicely.
261
00:11:34,880 --> 00:11:38,940
Then we can enable the
specularity, works also nice.
262
00:11:38,940 --> 00:11:41,660
We can play around with
the edge gradients,
263
00:11:41,660 --> 00:11:43,940
same with the bottom gradient.
264
00:11:43,940 --> 00:11:46,087
Then let's connect the emission here,
265
00:11:46,087 --> 00:11:49,460
and increase the strengths
down here, and it's working.
266
00:11:49,460 --> 00:11:52,300
By the way, I have not
added the specular color
267
00:11:52,300 --> 00:11:54,630
to the emissive material because I thought
268
00:11:54,630 --> 00:11:57,740
we will never add this
to glowing elements.
269
00:11:57,740 --> 00:11:59,360
However, if you want to do this,
270
00:11:59,360 --> 00:12:03,290
you can of course add this
diffuse and edge shader setup
271
00:12:03,290 --> 00:12:05,000
to the emission shader as well.
272
00:12:05,000 --> 00:12:07,423
And the last one is the transparency.
273
00:12:09,570 --> 00:12:11,200
For that, let's change the blend mode
274
00:12:11,200 --> 00:12:13,840
to alpha blend and alpha hashed,
275
00:12:13,840 --> 00:12:16,580
and then with changing the
transparency value down here,
276
00:12:16,580 --> 00:12:19,950
we can play around with the transparency.
277
00:12:19,950 --> 00:12:22,730
And yeah, it seems to be working fine.
278
00:12:22,730 --> 00:12:27,180
And this is how you set
up the Cubic Worlds Shader
279
00:12:27,180 --> 00:12:28,080
from scratch.
280
00:12:28,080 --> 00:12:31,270
I know these were two very
long videos, but anyway,
281
00:12:31,270 --> 00:12:32,930
I hope you learned a thing or two
282
00:12:32,930 --> 00:12:36,230
and from now on, we keep
the shading process simple
283
00:12:36,230 --> 00:12:39,290
by just using this specific shader
284
00:12:39,290 --> 00:12:41,030
for the rest of the course.
285
00:12:41,030 --> 00:12:42,910
And as always, if you followed along,
286
00:12:42,910 --> 00:12:44,660
don't forget to save.
23659
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.