All language subtitles for 6. Using Expressions to Modify a Curve

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,000 --> 00:00:01,044 In this clip, 2 00:00:01,044 --> 00:00:06,299 I'd like to take a look at creating procedural animation in the Curve Editor, 3 00:00:06,299 --> 00:00:10,829 and we'll do that by using expressions to modify a curve. 4 00:00:10,829 --> 00:00:14,129 Sometimes you'll get a challenging shot in production and you'll need 5 00:00:14,129 --> 00:00:16,829 to use procedural animation in one form or another. 6 00:00:16,829 --> 00:00:19,529 Whether it's to create randomized noise in an effect 7 00:00:19,529 --> 00:00:21,329 or you're animating a radar blip, 8 00:00:21,329 --> 00:00:25,829 there are all sorts of uses for these expressions that I really urge you to 9 00:00:25,829 --> 00:00:28,829 go through these on your own after watching this clip, 10 00:00:28,829 --> 00:00:31,829 and experiment with the expressions and the different ways they work. 11 00:00:31,829 --> 00:00:35,934 I've also included a text file on the course work for this clip 12 00:00:35,934 --> 00:00:37,829 containing a number of different expressions. 13 00:00:37,829 --> 00:00:41,919 You can just copy or paste them into your own work and experiment with them, 14 00:00:41,919 --> 00:00:45,367 and to have as a quick guide when you need them. 15 00:00:45,367 --> 00:00:48,829 So let's take a look at a Randomized Expression. 16 00:00:48,829 --> 00:00:51,829 I created another Transform Node here and connected that to our image. 17 00:00:51,829 --> 00:00:55,647 So let's go into that Transform Node and right now that Transform 18 00:00:55,647 --> 00:00:58,829 Node is just connected to this image of the earth. 19 00:00:58,829 --> 00:01:03,417 So whenever we change our values in the X or the Y translate, 20 00:01:03,417 --> 00:01:04,828 the earth will move. 21 00:01:04,828 --> 00:01:08,101 So, let's pipe an expression into this Translate X. 22 00:01:08,101 --> 00:01:13,671 If we go up here and we right-click, we can go down to Add Expression, 23 00:01:13,671 --> 00:01:17,039 and in here the expression box pops up. 24 00:01:17,039 --> 00:01:22,192 Now I'm going to copy an expression into this expression box and hit OK, 25 00:01:22,192 --> 00:01:24,101 and don't worry about this right now, 26 00:01:24,101 --> 00:01:27,437 I'll come back to it in a second and we'll talk about 27 00:01:27,437 --> 00:01:29,568 this animation that just got laid down. 28 00:01:29,568 --> 00:01:34,528 I just want you to know that if we Ctrl+Z out of this and we put 29 00:01:34,528 --> 00:01:37,328 a single keyframe on the Translate X axis, 30 00:01:37,328 --> 00:01:40,828 we'll get a curve down here in the Expression Editor, 31 00:01:40,829 --> 00:01:44,005 and that curve is represented by this expression box 32 00:01:44,005 --> 00:01:46,829 down here at the bottom of the screen. 33 00:01:46,829 --> 00:01:50,307 So I can take that same expression that I took 34 00:01:50,307 --> 00:01:52,742 before and paste it into that box, 35 00:01:52,742 --> 00:01:58,095 and I'm going to get the same animation values that I got from 36 00:01:58,095 --> 00:02:01,829 right-clicking up here and by saying Edit Expression. 37 00:02:01,829 --> 00:02:04,884 So just know that those two places in the menu system 38 00:02:04,884 --> 00:02:06,828 in a NUKE's brain are the same. 39 00:02:06,829 --> 00:02:09,884 That this expression box by right-clicking and going to Edit Expression, 40 00:02:09,884 --> 00:02:14,229 is the same as just using this expression box at the bottom while 41 00:02:14,229 --> 00:02:17,829 you have a curve selected in the Curve Editor. 42 00:02:17,829 --> 00:02:20,579 Now let's take a look at this expression for a moment. 43 00:02:20,579 --> 00:02:24,495 Generally, you'll be working with a value that looks like this: random(frame/5), 44 00:02:24,495 --> 00:02:32,828 just because this by default is working in a value range between 0 and 1. 45 00:02:32,829 --> 00:02:36,934 Most values are between 0 and 1, so NUKE does this by default. 46 00:02:36,934 --> 00:02:38,829 The ranges we're working with, however, 47 00:02:38,829 --> 00:02:41,079 are much higher than that because we're dealing with 48 00:02:41,079 --> 00:02:45,029 translating on the X and Y values, and those are all based on pixel counts. 49 00:02:45,029 --> 00:02:48,929 So it's just important to know that this expression that we have in 50 00:02:48,929 --> 00:02:52,629 there right now will be good enough for a 0 to 1 value, 51 00:02:52,629 --> 00:02:57,986 but if we want to over crank the values for a specific max value and min value, 52 00:02:57,986 --> 00:03:03,197 we do that by adding a multiply, adding parentheses, 53 00:03:03,197 --> 00:03:09,329 and this is generally your max value minus your min value, 54 00:03:09,329 --> 00:03:13,829 and then if you want an offset in there, 55 00:03:13,829 --> 00:03:16,829 this is your min value again. 56 00:03:16,829 --> 00:03:23,374 And so if I want the maximum rate of change in this random expression to be, 57 00:03:23,374 --> 00:03:29,307 let's say, 200 like we had before, and the min value will be 100, 58 00:03:29,307 --> 00:03:35,829 we do that, and then we just pipe the min value in here as well, 59 00:03:35,829 --> 00:03:38,829 And we get a curve that works between 200 and 100. 60 00:03:38,829 --> 00:03:39,101 Likewise, 61 00:03:39,101 --> 00:03:45,144 if we go to this expression and we want the value to change between 200 and 0, 62 00:03:45,144 --> 00:03:50,829 for example, I'll just change these values and set this to 0, 63 00:03:50,829 --> 00:03:56,829 and you'll see now that our curves deviate between a range of 200 and 0. 64 00:03:56,829 --> 00:03:59,162 So that's how you get randomized animation, 65 00:03:59,162 --> 00:04:01,829 and if we take a look at this, 66 00:04:01,829 --> 00:04:06,628 there's still only one keyframe in the Translate which you see ticked off here, 67 00:04:06,628 --> 00:04:09,778 and it's playing the animation based on the equation 68 00:04:09,778 --> 00:04:12,092 that we put into the Expression Editor. 69 00:04:12,092 --> 00:04:16,829 So I'll clear that out and the next one I'll show you is the Bounce, 70 00:04:16,829 --> 00:04:19,686 and the Bounce is based on a sine wave and the equation's 71 00:04:19,686 --> 00:04:22,829 going to look a little complicated, but don't worry about that for now. 72 00:04:22,829 --> 00:04:25,329 So I'm going to put a keyframe on the X, 73 00:04:25,329 --> 00:04:28,881 I'm going to select the curve, I'm going to go down here, 74 00:04:28,881 --> 00:04:32,565 I'm going to paste in this expression. 75 00:04:32,565 --> 00:04:39,394 Now you see because the values are set to 10, the Bounce is very, very small. 76 00:04:39,394 --> 00:04:43,828 These values are 10, and if we play this back we won't even see this thing move. 77 00:04:43,829 --> 00:04:47,828 You might see it shimmy back and forth just a little bit. 78 00:04:47,828 --> 00:04:52,628 So what we want to do is we want to enhance the size of this thing. 79 00:04:52,628 --> 00:04:55,628 So what we're going to do is the same trick we used last time to 80 00:04:55,628 --> 00:04:59,828 set the max and the min values to rise up these curves and get them 81 00:04:59,828 --> 00:05:02,828 to move the way that we want them to. 82 00:05:02,829 --> 00:05:07,828 So again, you just put a multiply at the end here, 83 00:05:07,828 --> 00:05:14,079 two parenthesis, and in here we're going to do our Maxval minus our Minval, 84 00:05:14,079 --> 00:05:17,829 this is always the same, and then plus Minval. 85 00:05:17,829 --> 00:05:23,089 So, let's say we want our value here to be 100, 86 00:05:23,089 --> 00:05:28,828 and our Minval can be 0, and our Minval can be 0, 87 00:05:28,829 --> 00:05:31,279 and you'll see, boom, it immediately adjusts, 88 00:05:31,279 --> 00:05:36,123 and so if we play this back, you'll see that it bounces and holds, 89 00:05:36,123 --> 00:05:37,887 bounces and holds, bounces and holds, 90 00:05:37,887 --> 00:05:40,829 just like it shows us here on the Curve Editor. 91 00:05:40,829 --> 00:05:44,828 But let's say we want it to bounce, bounce, bounce, bounce, and not hold. 92 00:05:44,829 --> 00:05:48,946 Well this particular one is bouncing and holding because the 93 00:05:48,946 --> 00:05:51,829 cosine function is what we just changed, 94 00:05:51,829 --> 00:05:56,628 but we didn't change the sine function, so this is going sine, 95 00:05:56,628 --> 00:05:57,828 cosine, sine, cosine. 96 00:05:57,829 --> 00:06:03,828 So if we take these same values and we go to the sine part of the equation here, 97 00:06:03,828 --> 00:06:06,367 I'm just going to pop those in, 98 00:06:06,367 --> 00:06:12,829 and you'll see that those values populate so that the hole disappears. 99 00:06:12,829 --> 00:06:16,579 So now we've just got a quick bounce, and likewise, 100 00:06:16,579 --> 00:06:21,829 we can move this up to 200 if you want, put this to 200, 101 00:06:21,829 --> 00:06:26,829 and put this to 200, and now we've got a bigger bounce, 102 00:06:26,829 --> 00:06:31,829 or if we want the values to be between 200 and 100, 103 00:06:31,829 --> 00:06:38,829 I can just go in and change that min value again to 100 instead of to 0. 104 00:06:38,829 --> 00:06:41,556 I'll change that in both places, 105 00:06:41,556 --> 00:06:48,828 and it moves the curves up to the range that we expected: the 200 to 100. 106 00:06:48,829 --> 00:06:51,829 So in the expressions that I'll give you in the text file, 107 00:06:51,829 --> 00:06:53,829 I'll give them to you like this; however, 108 00:06:53,829 --> 00:06:56,549 if you go out there on the web and you find a couple of these on your 109 00:06:56,549 --> 00:06:58,534 own and you want to know how to manipulate them, 110 00:06:58,534 --> 00:07:02,770 know that basically you'll see a bunch of equation at the beginning, 111 00:07:02,770 --> 00:07:05,495 and that's generally what you would copy and paste in. 112 00:07:05,495 --> 00:07:05,733 However, 113 00:07:05,733 --> 00:07:08,829 know that you can usually just change the value range you want by 114 00:07:08,829 --> 00:07:12,513 adding this part of the equation into the value range. 115 00:07:12,513 --> 00:07:12,881 Again, 116 00:07:12,881 --> 00:07:17,391 that's just a multiply max value plus min value plus min value to 117 00:07:17,391 --> 00:07:20,829 get the curves to be where you want them to be. 118 00:07:20,829 --> 00:07:23,686 So that's all I'm going to show you for the Expression Editor, 119 00:07:23,686 --> 00:07:25,829 it's a very powerful tool, and like I said, 120 00:07:25,829 --> 00:07:28,549 I'm going to include a lot of these equations for you in a text file so that 121 00:07:28,549 --> 00:07:34,829 you can take a look and kind of adventure out on your own. 11324

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.