Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,260 --> 00:00:02,330
- [Zack] Before adding the face controls
2
00:00:02,330 --> 00:00:03,600
to our character rig,
3
00:00:03,600 --> 00:00:07,720
let's learn about the basics
of drivers in this video.
4
00:00:07,720 --> 00:00:08,553
So later on,
5
00:00:08,553 --> 00:00:11,140
we will use two bones to fully control
6
00:00:11,140 --> 00:00:13,200
the face of our character rig.
7
00:00:13,200 --> 00:00:16,910
However, let's have a look at
the basics of drivers first
8
00:00:16,910 --> 00:00:18,910
to better understand what we are doing.
9
00:00:18,910 --> 00:00:19,743
In general,
10
00:00:19,743 --> 00:00:23,920
drivers allow us to control
values using other values
11
00:00:23,920 --> 00:00:25,830
or scripted expressions.
12
00:00:25,830 --> 00:00:26,820
In this video here,
13
00:00:26,820 --> 00:00:29,060
we don't go into a scripted expressions.
14
00:00:29,060 --> 00:00:30,540
This would go too far,
15
00:00:30,540 --> 00:00:32,850
and in general, I'm not
an expert in this field.
16
00:00:32,850 --> 00:00:35,470
However, there's a link
to the documentation
17
00:00:35,470 --> 00:00:38,010
of the drivers down below
in the video description
18
00:00:38,010 --> 00:00:39,360
if you wanna learn more.
19
00:00:39,360 --> 00:00:43,000
Here we just wanna do
some very basic drivers,
20
00:00:43,000 --> 00:00:46,030
but these will probably
cover most all the things
21
00:00:46,030 --> 00:00:48,000
you will do with drivers anyway.
22
00:00:48,000 --> 00:00:49,070
So, and as you can see,
23
00:00:49,070 --> 00:00:51,740
I set up a very simple scene here
24
00:00:51,740 --> 00:00:53,710
where we wanna apply drivers.
25
00:00:53,710 --> 00:00:56,900
So here we have two handles,
the red one and the green one.
26
00:00:56,900 --> 00:00:58,413
And with the red one later on,
27
00:00:58,413 --> 00:01:01,693
I wanna control the
intensity of the lamp here,
28
00:01:01,693 --> 00:01:02,836
and with the green one,
29
00:01:02,836 --> 00:01:05,020
I wanna change the position of the lamp.
30
00:01:05,020 --> 00:01:06,040
So basically first,
31
00:01:06,040 --> 00:01:08,770
we move this out with a green handle here,
32
00:01:08,770 --> 00:01:11,590
and then we turn on the
light with a red handle.
33
00:01:11,590 --> 00:01:12,500
Before we get started,
34
00:01:12,500 --> 00:01:14,550
let's have a quick look at the scene here.
35
00:01:14,550 --> 00:01:15,383
First of all,
36
00:01:15,383 --> 00:01:17,490
you maybe noticed that I disabled
37
00:01:17,490 --> 00:01:20,120
the selection for some
of these objects here,
38
00:01:20,120 --> 00:01:23,120
basically for all the
objects which we don't move
39
00:01:23,120 --> 00:01:25,340
or change at all in this tutorial,
40
00:01:25,340 --> 00:01:27,960
so that we can't accidentally select this.
41
00:01:27,960 --> 00:01:30,410
Then both handles, this
one here and this one here,
42
00:01:30,410 --> 00:01:33,410
are parented to the cube things down here,
43
00:01:33,410 --> 00:01:35,120
and over here, the lamp,
44
00:01:35,120 --> 00:01:37,820
which is a point lamp is
parented to this object,
45
00:01:37,820 --> 00:01:39,850
and this object here is parented
46
00:01:39,850 --> 00:01:41,950
to the cube thing down here.
47
00:01:41,950 --> 00:01:46,340
Then for the lamp object
here in the object settings,
48
00:01:46,340 --> 00:01:48,840
under viewport Display,
I enabled in front,
49
00:01:48,840 --> 00:01:50,530
so we can see the lamp better
50
00:01:50,530 --> 00:01:53,130
and to make the selection
and so on easier.
51
00:01:53,130 --> 00:01:55,300
And later on with the red handle,
52
00:01:55,300 --> 00:01:58,150
we don't just wanna control
the intensity of the light,
53
00:01:58,150 --> 00:02:00,360
we also wanna control the intensity
54
00:02:00,360 --> 00:02:01,550
of the emission shader,
55
00:02:01,550 --> 00:02:04,590
which I added to this
lamp object over here.
56
00:02:04,590 --> 00:02:06,580
You can see I increased the emission,
57
00:02:06,580 --> 00:02:08,220
we can also increase it to 10 here
58
00:02:08,220 --> 00:02:10,560
to make it a bit more intense.
59
00:02:10,560 --> 00:02:12,670
So, and before we get into drivers,
60
00:02:12,670 --> 00:02:16,230
let's actually add some
constraints here to the two handles
61
00:02:16,230 --> 00:02:20,830
so we can only move or rotate
the object in a certain range.
62
00:02:20,830 --> 00:02:22,700
So we learned about constraints before,
63
00:02:22,700 --> 00:02:24,850
that means let's do it quite quickly here.
64
00:02:24,850 --> 00:02:26,210
Let's go to the constraints.
65
00:02:26,210 --> 00:02:28,300
Let's press N to open up the sidebar,
66
00:02:28,300 --> 00:02:30,560
and under Item, we can see the Transform.
67
00:02:30,560 --> 00:02:35,560
In this object I wanna move
positive 0.08 and negative 0.08.
68
00:02:36,650 --> 00:02:39,360
So let's add a limit location constraint,
69
00:02:39,360 --> 00:02:41,090
and this along the y-axis.
70
00:02:41,090 --> 00:02:44,440
So X and Z, let's limit to zero,
71
00:02:44,440 --> 00:02:47,270
and let's change the
Owner to a Local Space
72
00:02:47,270 --> 00:02:48,530
so it will stay here
73
00:02:48,530 --> 00:02:50,550
and not go back to the
center of the scene,
74
00:02:50,550 --> 00:02:52,980
which will happen when we
have World Space enabled.
75
00:02:52,980 --> 00:02:55,520
And then for the Y minimum,
76
00:02:55,520 --> 00:03:00,290
let's set this to a negative
0.08 and positive 0.08.
77
00:03:00,290 --> 00:03:01,690
And now if I press G,
78
00:03:01,690 --> 00:03:04,590
I can only move this in
this certain direction.
79
00:03:04,590 --> 00:03:08,860
And let's even limit the
rotation with Local Space
80
00:03:08,860 --> 00:03:10,960
and set everything to zero here,
81
00:03:10,960 --> 00:03:13,170
so I can't rotate this thing at all.
82
00:03:13,170 --> 00:03:16,010
So we can only move this
in this specific area.
83
00:03:16,010 --> 00:03:17,000
Then for this handle,
84
00:03:17,000 --> 00:03:19,630
it's a bit longer because
I wanna rotate this.
85
00:03:19,630 --> 00:03:22,040
And you can see here
we have the X rotation
86
00:03:22,040 --> 00:03:25,270
of 30 degrees and negative 30 degrees.
87
00:03:25,270 --> 00:03:28,900
So again, let's add limit
rotation constraint,
88
00:03:28,900 --> 00:03:32,200
local space, here Z and Y should be zero,
89
00:03:32,200 --> 00:03:34,760
and we wanna rotate
this around the x-axis.
90
00:03:34,760 --> 00:03:37,610
So Y, Z zero and limit X
91
00:03:37,610 --> 00:03:40,120
should be at negative 30 for the minimum
92
00:03:40,120 --> 00:03:41,600
and 30 for the maximum.
93
00:03:41,600 --> 00:03:42,727
Now, when I press R,
94
00:03:42,727 --> 00:03:46,540
you can see we can only rotate
this in this certain area.
95
00:03:46,540 --> 00:03:49,830
And same as before, let's
also add a limit location.
96
00:03:49,830 --> 00:03:53,520
With everything enabled,
everything at zero and local space,
97
00:03:53,520 --> 00:03:56,890
now when I press G I
can't move this at all.
98
00:03:56,890 --> 00:03:58,180
Here for this object,
99
00:03:58,180 --> 00:03:59,860
we won't set up any constraints
100
00:03:59,860 --> 00:04:02,720
because we don't wanna
touch this object at all.
101
00:04:02,720 --> 00:04:06,220
This should be fully controlled
with these two handles here.
102
00:04:06,220 --> 00:04:08,300
So how to add drivers.
103
00:04:08,300 --> 00:04:10,840
A driver you will always add to the value
104
00:04:10,840 --> 00:04:12,170
which you wanna control.
105
00:04:12,170 --> 00:04:14,380
So let's start with this object here.
106
00:04:14,380 --> 00:04:16,190
Let's go to the material settings,
107
00:04:16,190 --> 00:04:19,020
make sure the light material is selected.
108
00:04:19,020 --> 00:04:21,530
And here I wanna control
the emission value.
109
00:04:21,530 --> 00:04:25,660
So that means I wanna move
the red handle along Y,
110
00:04:25,660 --> 00:04:29,760
and this should turn the
emission from zero up to 10.
111
00:04:29,760 --> 00:04:30,667
So first we need to try
112
00:04:30,667 --> 00:04:33,100
what should be the maximum value here,
113
00:04:33,100 --> 00:04:35,410
and I think 10 should do the job.
114
00:04:35,410 --> 00:04:37,000
Then when you wanna edit driver,
115
00:04:37,000 --> 00:04:40,540
simply right click on the
value and click on Add Driver.
116
00:04:40,540 --> 00:04:42,160
Then this menu here pops up.
117
00:04:42,160 --> 00:04:44,000
We will get back to this in a second.
118
00:04:44,000 --> 00:04:46,770
However, if I move my mouse
away, it will disappear.
119
00:04:46,770 --> 00:04:47,740
But no worries,
120
00:04:47,740 --> 00:04:50,140
all you need to do is
right-click on this value again,
121
00:04:50,140 --> 00:04:51,890
and click on Edit Driver.
122
00:04:51,890 --> 00:04:53,270
Then this pops up again.
123
00:04:53,270 --> 00:04:55,950
Also, you noticed the value turns purple.
124
00:04:55,950 --> 00:04:58,220
That means this is now
controlled by a driver.
125
00:04:58,220 --> 00:05:00,450
We can also see this curved arrow here,
126
00:05:00,450 --> 00:05:02,790
which also shows us that we have a driver
127
00:05:02,790 --> 00:05:03,910
controlling this here.
128
00:05:03,910 --> 00:05:07,130
That means I can really change
this value manually anymore.
129
00:05:07,130 --> 00:05:08,740
Then if you wanna remove a drivers,
130
00:05:08,740 --> 00:05:11,920
simply right on here and
click on Delete Driver.
131
00:05:11,920 --> 00:05:13,700
So, now let's remember,
132
00:05:13,700 --> 00:05:18,520
I wanna move this along Y
on a maximum value of 0.08.
133
00:05:18,520 --> 00:05:20,330
So let's reset the position here.
134
00:05:20,330 --> 00:05:22,270
Right click Add Driver.
135
00:05:22,270 --> 00:05:26,140
And as driver type, we don't
use the scripted expression.
136
00:05:26,140 --> 00:05:28,030
We could enter a script down here
137
00:05:28,030 --> 00:05:29,280
if we know what we are doing,
138
00:05:29,280 --> 00:05:30,500
but we don't do.
139
00:05:30,500 --> 00:05:33,030
So let's change this to the average value,
140
00:05:33,030 --> 00:05:35,740
which allows us to control this value here
141
00:05:35,740 --> 00:05:39,490
using another value which is
the Y location, for example,
142
00:05:39,490 --> 00:05:40,670
of the red handle.
143
00:05:40,670 --> 00:05:44,410
So for all we do, just switch
this to averaged value.
144
00:05:44,410 --> 00:05:45,470
Then we have an arrow here
145
00:05:45,470 --> 00:05:48,430
because we haven't defined
a target object yet.
146
00:05:48,430 --> 00:05:51,470
And of course, one thing I'm
doing completely wrong here,
147
00:05:51,470 --> 00:05:53,580
I have currently the handle selected.
148
00:05:53,580 --> 00:05:55,190
So let's remove the driver here.
149
00:05:55,190 --> 00:05:57,490
Of course, I wanna have the lamp selected
150
00:05:57,490 --> 00:05:58,548
with a light material.
151
00:05:58,548 --> 00:06:00,660
And here, I wanna add that driver.
152
00:06:00,660 --> 00:06:03,290
So of course, add this
to have the right value.
153
00:06:03,290 --> 00:06:06,060
So average value, then as target object,
154
00:06:06,060 --> 00:06:09,510
I wanna have the handle
light, which is the red one,
155
00:06:09,510 --> 00:06:11,050
which is controlling the light.
156
00:06:11,050 --> 00:06:13,300
And we wanna change the Y location.
157
00:06:13,300 --> 00:06:16,120
You can also see we can
use a rotation or scale
158
00:06:16,120 --> 00:06:17,360
to control this value,
159
00:06:17,360 --> 00:06:19,660
but here I wanna have the Y location,
160
00:06:19,660 --> 00:06:21,700
and we wanna have the local space
161
00:06:21,700 --> 00:06:23,940
because this object here
is not at the center
162
00:06:23,940 --> 00:06:25,600
it's somewhere here outside,
163
00:06:25,600 --> 00:06:27,650
and it's parented to another object.
164
00:06:27,650 --> 00:06:30,220
So that's why we are using local space.
165
00:06:30,220 --> 00:06:32,500
Then let's get back to Edit Driver.
166
00:06:32,500 --> 00:06:35,100
And this is all we can set up over here.
167
00:06:35,100 --> 00:06:37,660
However, if I now move this along Y,
168
00:06:37,660 --> 00:06:39,340
it's doing something as you can see,
169
00:06:39,340 --> 00:06:42,380
but it's not going up to the value of 10.
170
00:06:42,380 --> 00:06:45,700
So we have to define this
a bit more in detail.
171
00:06:45,700 --> 00:06:47,750
For that, let's select
this object once again,
172
00:06:47,750 --> 00:06:50,650
and let's click on Open Drivers Editor.
173
00:06:50,650 --> 00:06:53,590
Then this popup opens up,
which is totally fine.
174
00:06:53,590 --> 00:06:56,850
However, it's not so nice
for recording this tutorial
175
00:06:56,850 --> 00:06:58,460
because it's always in the way.
176
00:06:58,460 --> 00:07:00,630
So down here, let's move this up,
177
00:07:00,630 --> 00:07:04,480
and let's change the Asset
Browser to the driver's editor.
178
00:07:04,480 --> 00:07:06,890
If I middle mouse button click
and move this to the side,
179
00:07:06,890 --> 00:07:09,027
we can see we have this red line here.
180
00:07:09,027 --> 00:07:11,400
And let's hold down Control
+ middle mouse button click,
181
00:07:11,400 --> 00:07:14,160
and drag this around so
we can see it better.
182
00:07:14,160 --> 00:07:16,940
And it looks similar as the graph editor,
183
00:07:16,940 --> 00:07:20,130
because it is indeed some
kind of a graph editor.
184
00:07:20,130 --> 00:07:22,530
Here on the side, we
have the list of drivers.
185
00:07:22,530 --> 00:07:23,940
Currently it will only show us
186
00:07:23,940 --> 00:07:26,020
the drivers of the selected object
187
00:07:26,020 --> 00:07:28,180
because this mouse cursor is active.
188
00:07:28,180 --> 00:07:29,080
Let's disable this,
189
00:07:29,080 --> 00:07:32,470
then we will see all the
drivers for all the objects.
190
00:07:32,470 --> 00:07:35,840
So when I zoom in here,
now we have two points.
191
00:07:35,840 --> 00:07:38,410
You can see this two black
points, which I can select.
192
00:07:38,410 --> 00:07:41,130
And by pressing G, I can
also move them around.
193
00:07:41,130 --> 00:07:43,270
It's doing some weird
snapping here as you can see,
194
00:07:43,270 --> 00:07:45,470
and that's because up here under Auto Snap
195
00:07:45,470 --> 00:07:46,790
newest frame is selected.
196
00:07:46,790 --> 00:07:51,050
Let's disable Auto Snap, then
I can freely move this around.
197
00:07:51,050 --> 00:07:54,200
And this curve, which is
actually just a straight line,
198
00:07:54,200 --> 00:07:56,340
but when I move these handles around here,
199
00:07:56,340 --> 00:07:58,150
you can see I could create a curve,
200
00:07:58,150 --> 00:08:02,290
defines the start and end
point of the controlled value.
201
00:08:02,290 --> 00:08:05,830
That means the first point on
here defines the zero state.
202
00:08:05,830 --> 00:08:08,440
That means when the handle
is at the certain position,
203
00:08:08,440 --> 00:08:11,254
then here we define what the power value
204
00:08:11,254 --> 00:08:13,430
of this emission shader should be.
205
00:08:13,430 --> 00:08:17,180
And up here with this key frame,
we control the final state.
206
00:08:17,180 --> 00:08:20,430
Means that when we move the
handle in a certain position,
207
00:08:20,430 --> 00:08:23,560
then we wanna have the
emission power of 10.
208
00:08:23,560 --> 00:08:25,420
Then you can see we have
a coordinate system here.
209
00:08:25,420 --> 00:08:29,140
We have the horizontal
axis and the vertical axis.
210
00:08:29,140 --> 00:08:30,307
The horizontal axis defines
211
00:08:30,307 --> 00:08:33,630
the change of the value
of the target object,
212
00:08:33,630 --> 00:08:34,740
the handle in this case.
213
00:08:34,740 --> 00:08:37,430
and the vertical axis defines the change
214
00:08:37,430 --> 00:08:39,080
of the owner object here,
215
00:08:39,080 --> 00:08:40,830
which is this object here,
216
00:08:40,830 --> 00:08:42,470
the emission value in this case.
217
00:08:42,470 --> 00:08:44,240
That means here, for example,
218
00:08:44,240 --> 00:08:48,490
I need to move this up to 10
in order to have the end value
219
00:08:48,490 --> 00:08:49,900
at the emission of 10.
220
00:08:49,900 --> 00:08:53,850
So, but fiddling around with
the curve here is a bit tricky.
221
00:08:53,850 --> 00:08:55,820
And also having the possibility
222
00:08:55,820 --> 00:08:57,920
to turn this into a curve is a bit tricky.
223
00:08:57,920 --> 00:09:00,040
So I would suggest to
select everything here,
224
00:09:00,040 --> 00:09:02,220
right click, go to interpolation mode,
225
00:09:02,220 --> 00:09:03,760
and change this to linear.
226
00:09:03,760 --> 00:09:05,820
Then we just have these two points,
227
00:09:05,820 --> 00:09:08,770
which we can select to
change this line here.
228
00:09:08,770 --> 00:09:11,940
So now I don't wanna manually
position this here, somewhere.
229
00:09:11,940 --> 00:09:12,890
It's a bit tricky.
230
00:09:12,890 --> 00:09:15,560
So let's simply press N
to open up the sidebar.
231
00:09:15,560 --> 00:09:18,280
When this point here is
selected under F curve,
232
00:09:18,280 --> 00:09:20,070
we can find the active key frame.
233
00:09:20,070 --> 00:09:22,930
And here we can simply define the values
234
00:09:22,930 --> 00:09:24,270
which we wanna add here.
235
00:09:24,270 --> 00:09:25,710
That means under Value,
236
00:09:25,710 --> 00:09:27,830
we simply type in the end value
237
00:09:27,830 --> 00:09:31,140
because I have the end key
frame selected, basically,
238
00:09:31,140 --> 00:09:32,200
which was 10.
239
00:09:32,200 --> 00:09:33,920
So we wanna have it power of 10.
240
00:09:33,920 --> 00:09:36,930
Then you can see how
this thing is moving up
241
00:09:36,930 --> 00:09:39,420
to 10 on the vertical axis,
242
00:09:39,420 --> 00:09:41,900
and we wanted to move this object here
243
00:09:41,900 --> 00:09:44,213
in the positive direction of 0.08.
244
00:09:45,130 --> 00:09:47,510
And now you can see if
I zoom in a bit closer,
245
00:09:47,510 --> 00:09:51,110
the horizontal axis was
now changed to 0.08.
246
00:09:51,110 --> 00:09:56,110
Meaning if this object changes
the Y position value to 0.08,
247
00:09:56,210 --> 00:09:59,180
then the emission power should be at 10.
248
00:09:59,180 --> 00:10:01,330
And if I move this now over here,
249
00:10:01,330 --> 00:10:03,470
you can see how this dotted lines
250
00:10:03,470 --> 00:10:05,010
versus dot here is changing.
251
00:10:05,010 --> 00:10:07,070
So you can see when I move this object
252
00:10:07,070 --> 00:10:08,810
at which position this is.
253
00:10:08,810 --> 00:10:11,250
So let's set this back to
zero, and now if I move this,
254
00:10:11,250 --> 00:10:14,140
you can see how nicely
the lamb starts to glow.
255
00:10:14,140 --> 00:10:16,450
However, you can see that this handle
256
00:10:16,450 --> 00:10:17,950
is in the center right now.
257
00:10:17,950 --> 00:10:19,900
That means I can move
it into one direction,
258
00:10:19,900 --> 00:10:22,100
but also into the other direction.
259
00:10:22,100 --> 00:10:23,240
And basically,
260
00:10:23,240 --> 00:10:26,160
I want this position
to be the zero position
261
00:10:26,160 --> 00:10:28,790
and this to be there
fully active position.
262
00:10:28,790 --> 00:10:32,720
That means this year was a
position of negative 0.08.
263
00:10:32,720 --> 00:10:36,490
That means we simply have to
select a start key frame here
264
00:10:36,490 --> 00:10:38,740
and define the values for the start.
265
00:10:38,740 --> 00:10:41,220
That means the value
should be zero, of course.
266
00:10:41,220 --> 00:10:43,910
That means the emission of the
lamp appear should be zero.
267
00:10:43,910 --> 00:10:48,890
But the position of this object
should be at negative 0.08.
268
00:10:48,890 --> 00:10:50,420
Now you can see it moved over here.
269
00:10:50,420 --> 00:10:51,920
And now the value is changing
270
00:10:51,920 --> 00:10:53,550
from this position to this here.
271
00:10:53,550 --> 00:10:56,530
That means if I now move
this the full direction here,
272
00:10:56,530 --> 00:10:58,980
it's turning on the light.
273
00:10:58,980 --> 00:11:00,650
So let's place it over here.
274
00:11:00,650 --> 00:11:03,100
Now we edit our first driver.
275
00:11:03,100 --> 00:11:04,150
And as you can see
276
00:11:04,150 --> 00:11:07,530
when understanding what these
key frames here are doing,
277
00:11:07,530 --> 00:11:09,550
it's actually pretty simple.
278
00:11:09,550 --> 00:11:11,630
Now let's select a light object here.
279
00:11:11,630 --> 00:11:13,690
And in the light settings under Power,
280
00:11:13,690 --> 00:11:15,810
let's also add a driver here.
281
00:11:15,810 --> 00:11:17,720
Again, I want to use a handle light.
282
00:11:17,720 --> 00:11:19,860
I wanna change the Y location,
283
00:11:19,860 --> 00:11:22,217
and this should happen in local space.
284
00:11:22,217 --> 00:11:25,690
And now you can see the other
driver was added over here.
285
00:11:25,690 --> 00:11:27,470
This is now selected here again,
286
00:11:27,470 --> 00:11:29,490
let's select everything, right-click,
287
00:11:29,490 --> 00:11:31,370
interpolation set to linear.
288
00:11:31,370 --> 00:11:33,900
And now we again have
these two points here.
289
00:11:33,900 --> 00:11:38,390
So here we wanted to have,
I think, 500 Watts or 250.
290
00:11:38,390 --> 00:11:40,150
We have to test this out.
291
00:11:40,150 --> 00:11:43,270
So let's change the
end point to 250 Watts.
292
00:11:43,270 --> 00:11:47,030
And the position of the
handle should be at 0.08,
293
00:11:47,030 --> 00:11:48,460
as you maybe remember,
294
00:11:48,460 --> 00:11:51,700
and the start position
should be negative 0.08,
295
00:11:51,700 --> 00:11:53,740
and the Watts should be at zero.
296
00:11:53,740 --> 00:11:56,510
That means if I now switch
over to the rendered--
297
00:11:56,510 --> 00:11:59,250
Whoa, what's going on here?
298
00:11:59,250 --> 00:12:01,650
We can see that something's clearly wrong.
299
00:12:01,650 --> 00:12:04,460
And that's because over
here in the driver,
300
00:12:04,460 --> 00:12:06,430
let's go to Edit Driver,
301
00:12:06,430 --> 00:12:08,430
which we also can do over here by the way,
302
00:12:08,430 --> 00:12:10,030
when the driver is selected.
303
00:12:10,030 --> 00:12:12,310
I still have scripted expression enabled.
304
00:12:12,310 --> 00:12:14,630
Let's change this to averaged value,
305
00:12:14,630 --> 00:12:17,300
and now it should do
exactly what we set up.
306
00:12:17,300 --> 00:12:20,567
When I moved this over here,
the light is turning on.
307
00:12:20,567 --> 00:12:22,500
And I think we can do it a bit stronger.
308
00:12:22,500 --> 00:12:23,420
So let's select this,
309
00:12:23,420 --> 00:12:26,550
go to the F curve and
change this to 500 Watts.
310
00:12:26,550 --> 00:12:29,600
And now if I move this,
it will be a bit brighter.
311
00:12:29,600 --> 00:12:31,010
That means if I select it,
312
00:12:31,010 --> 00:12:34,160
we can see that the
value is now 500 Watts.
313
00:12:34,160 --> 00:12:35,930
If I move it a little bit down,
314
00:12:35,930 --> 00:12:39,020
then you can also see how
the value has changed.
315
00:12:39,020 --> 00:12:39,853
So pretty cool.
316
00:12:39,853 --> 00:12:42,350
Now we can control the light intensity
317
00:12:42,350 --> 00:12:44,290
with this handle here.
318
00:12:44,290 --> 00:12:46,540
However, now I wanna control the position
319
00:12:46,540 --> 00:12:49,580
of this object here with the green handle.
320
00:12:49,580 --> 00:12:53,000
For that, let's check the
position of the object.
321
00:12:53,000 --> 00:12:55,130
So when this is fully moved out,
322
00:12:55,130 --> 00:12:57,300
the Z location should be zero.
323
00:12:57,300 --> 00:13:00,120
And let's check when this is moving in,
324
00:13:00,120 --> 00:13:04,490
we wanna have something
like negative 1.76.
325
00:13:04,490 --> 00:13:07,130
So, and we wanna control
this with this handle
326
00:13:07,130 --> 00:13:10,010
when this is rotating around the x-axis
327
00:13:10,010 --> 00:13:12,760
to negative and positive 30 degrees.
328
00:13:12,760 --> 00:13:14,090
So let's select this one here,
329
00:13:14,090 --> 00:13:18,210
right-click on the Z location,
and click on Add Driver.
330
00:13:18,210 --> 00:13:19,350
Averaged value,
331
00:13:19,350 --> 00:13:22,780
here we wanna control this
with the handle position
332
00:13:22,780 --> 00:13:24,900
and the handle should rotate...
333
00:13:24,900 --> 00:13:26,230
I think it was X.
334
00:13:26,230 --> 00:13:27,410
Let's check once again.
335
00:13:27,410 --> 00:13:29,580
Yeah, it was the X rotation.
336
00:13:29,580 --> 00:13:31,300
Let's go back to Edit Driver.
337
00:13:31,300 --> 00:13:32,760
Here we leave Auto Euler,
338
00:13:32,760 --> 00:13:35,460
and here we change this to a local space.
339
00:13:35,460 --> 00:13:37,740
Now we have another curve over here,
340
00:13:37,740 --> 00:13:41,120
under the streetlamp we
have the Z location here.
341
00:13:41,120 --> 00:13:43,620
If you like, you can hide
the other two drivers.
342
00:13:43,620 --> 00:13:45,150
And now let's do the same thing.
343
00:13:45,150 --> 00:13:47,870
Select everything with A, right-click,
344
00:13:47,870 --> 00:13:49,320
interpolation to linear.
345
00:13:49,320 --> 00:13:52,290
And now before we change
these two values here,
346
00:13:52,290 --> 00:13:54,800
there is a little problem because Blender
347
00:13:54,800 --> 00:13:57,110
is not using degrees over here,
348
00:13:57,110 --> 00:13:58,820
it's using radians.
349
00:13:58,820 --> 00:14:01,210
That means to better see what's going on,
350
00:14:01,210 --> 00:14:05,390
let's quickly temporarily
change the scene units here,
351
00:14:05,390 --> 00:14:07,660
the rotation to radians.
352
00:14:07,660 --> 00:14:10,670
That means, let's check
this one here, press R...
353
00:14:10,670 --> 00:14:13,390
But actually let's change this
back to degrees for a second.
354
00:14:13,390 --> 00:14:16,200
And now let's change the
rotation to 30 degrees,
355
00:14:16,200 --> 00:14:18,180
and then back to radians.
356
00:14:18,180 --> 00:14:20,290
And then we have this value over here,
357
00:14:20,290 --> 00:14:22,330
which should be the full rotation we need
358
00:14:22,330 --> 00:14:23,840
in order to move the object here.
359
00:14:23,840 --> 00:14:25,240
Let's Control + C,
360
00:14:25,240 --> 00:14:28,120
copy the value by hovering
our mouse above this,
361
00:14:28,120 --> 00:14:30,490
and then we can change
this back to the degrees.
362
00:14:30,490 --> 00:14:33,660
That means the end value
should be this one here.
363
00:14:33,660 --> 00:14:35,740
Paste this by pressing Control + V.
364
00:14:35,740 --> 00:14:38,900
And it should move the object to zero.
365
00:14:38,900 --> 00:14:42,450
That means the end position
should be zero in this case.
366
00:14:42,450 --> 00:14:44,580
Then let's select the first key frame.
367
00:14:44,580 --> 00:14:49,580
And here the radians should
be negative 0.523, something,
368
00:14:50,110 --> 00:14:52,750
when the handle is moved
into the other direction,
369
00:14:52,750 --> 00:14:57,030
and we had a value of negative 1.765.
370
00:14:57,030 --> 00:14:59,250
Something like this if
I remember correctly.
371
00:14:59,250 --> 00:15:01,473
That means if I rotate this over here,
372
00:15:01,473 --> 00:15:02,830
then this is going down.
373
00:15:02,830 --> 00:15:04,260
Because the start position
374
00:15:04,260 --> 00:15:07,490
is now at the negative rotation value,
375
00:15:07,490 --> 00:15:08,497
which we have over here,
376
00:15:08,497 --> 00:15:10,430
and the end position is up here.
377
00:15:10,430 --> 00:15:13,250
So we define this by
controlling these two values.
378
00:15:13,250 --> 00:15:15,170
If I hold down Control +
middle mouse button click,
379
00:15:15,170 --> 00:15:16,300
change the position here.
380
00:15:16,300 --> 00:15:18,320
We can see it a bit
better. Let's zoom in here.
381
00:15:18,320 --> 00:15:19,970
We can see the position down here
382
00:15:19,970 --> 00:15:23,460
is at negative 1.76 meters,
383
00:15:23,460 --> 00:15:27,650
and the radians is at negative 0.524,
384
00:15:27,650 --> 00:15:30,573
and the positive value is
at zero for the location,
385
00:15:30,573 --> 00:15:34,390
and at 0.5 something positive radians.
386
00:15:34,390 --> 00:15:35,840
So that means all we need to do
387
00:15:35,840 --> 00:15:38,970
in order to set up the
drivers is to add the targets
388
00:15:38,970 --> 00:15:40,510
and then here define the start
389
00:15:40,510 --> 00:15:43,270
and end position of the driver.
390
00:15:43,270 --> 00:15:46,710
And now let's push this
down, turn off the light.
391
00:15:46,710 --> 00:15:49,090
That's disable the overlays, press N.
392
00:15:49,090 --> 00:15:54,090
Now let's move this out
and then turn on the light.
393
00:15:55,040 --> 00:15:56,030
Pretty cool.
394
00:15:56,030 --> 00:15:58,080
It takes a bit time to set up, of course,
395
00:15:58,080 --> 00:15:58,970
but as you can see,
396
00:15:58,970 --> 00:16:00,970
drivers are really powerful
397
00:16:00,970 --> 00:16:03,970
and allow us to control
nearly everything in our scene
398
00:16:03,970 --> 00:16:06,200
with just a few objects.
399
00:16:06,200 --> 00:16:09,580
Yeah. And now you should be
prepared to set up the drivers
400
00:16:09,580 --> 00:16:12,690
for our character rig in the next video.
401
00:16:12,690 --> 00:16:17,107
And if you followed this
video, don't forget to save.
31520
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.