Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In this clip,
I'd like to take a look at creating procedural animation in the Curve Editor,
and we'll do that by using expressions to modify a curve.
Sometimes you'll get a challenging shot in production and you'll need
to use procedural animation in one form or another.
Whether it's to create randomized noise in an effect
or you're animating a radar blip,
there are all sorts of uses for these expressions that I really urge you to
go through these on your own after watching this clip,
and experiment with the expressions and the different ways they work.
I've also included a text file on the course work for this clip
containing a number of different expressions.
You can just copy or paste them into your own work and experiment with them,
and to have as a quick guide when you need them.
So let's take a look at a Randomized Expression.
I created another Transform Node here and connected that to our image.
So let's go into that Transform Node and right now that Transform
Node is just connected to this image of the earth.
So whenever we change our values in the X or the Y translate,
the earth will move.
So, let's pipe an expression into this Translate X.
If we go up here and we right-click, we can go down to Add Expression,
and in here the expression box pops up.
Now I'm going to copy an expression into this expression box and hit OK,
and don't worry about this right now,
I'll come back to it in a second and we'll talk about
this animation that just got laid down.
I just want you to know that if we Ctrl+Z out of this and we put
a single keyframe on the Translate X axis,
we'll get a curve down here in the Expression Editor,
and that curve is represented by this expression box
down here at the bottom of the screen.
So I can take that same expression that I took
before and paste it into that box,
and I'm going to get the same animation values that I got from
right-clicking up here and by saying Edit Expression.
So just know that those two places in the menu system
in a NUKE's brain are the same.
That this expression box by right-clicking and going to Edit Expression,
is the same as just using this expression box at the bottom while
you have a curve selected in the Curve Editor.
Now let's take a look at this expression for a moment.
Generally, you'll be working with a value that looks like this: random(frame/5),
just because this by default is working in a value range between 0 and 1.
Most values are between 0 and 1, so NUKE does this by default.
The ranges we're working with, however,
are much higher than that because we're dealing with
translating on the X and Y values, and those are all based on pixel counts.
So it's just important to know that this expression that we have in
there right now will be good enough for a 0 to 1 value,
but if we want to over crank the values for a specific max value and min value,
we do that by adding a multiply, adding parentheses,
and this is generally your max value minus your min value,
and then if you want an offset in there,
this is your min value again.
And so if I want the maximum rate of change in this random expression to be,
let's say, 200 like we had before, and the min value will be 100,
we do that, and then we just pipe the min value in here as well,
And we get a curve that works between 200 and 100.
Likewise,
if we go to this expression and we want the value to change between 200 and 0,
for example, I'll just change these values and set this to 0,
and you'll see now that our curves deviate between a range of 200 and 0.
So that's how you get randomized animation,
and if we take a look at this,
there's still only one keyframe in the Translate which you see ticked off here,
and it's playing the animation based on the equation
that we put into the Expression Editor.
So I'll clear that out and the next one I'll show you is the Bounce,
and the Bounce is based on a sine wave and the equation's
going to look a little complicated, but don't worry about that for now.
So I'm going to put a keyframe on the X,
I'm going to select the curve, I'm going to go down here,
I'm going to paste in this expression.
Now you see because the values are set to 10, the Bounce is very, very small.
These values are 10, and if we play this back we won't even see this thing move.
You might see it shimmy back and forth just a little bit.
So what we want to do is we want to enhance the size of this thing.
So what we're going to do is the same trick we used last time to
set the max and the min values to rise up these curves and get them
to move the way that we want them to.
So again, you just put a multiply at the end here,
two parenthesis, and in here we're going to do our Maxval minus our Minval,
this is always the same, and then plus Minval.
So, let's say we want our value here to be 100,
and our Minval can be 0, and our Minval can be 0,
and you'll see, boom, it immediately adjusts,
and so if we play this back, you'll see that it bounces and holds,
bounces and holds, bounces and holds,
just like it shows us here on the Curve Editor.
But let's say we want it to bounce, bounce, bounce, bounce, and not hold.
Well this particular one is bouncing and holding because the
cosine function is what we just changed,
but we didn't change the sine function, so this is going sine,
cosine, sine, cosine.
So if we take these same values and we go to the sine part of the equation here,
I'm just going to pop those in,
and you'll see that those values populate so that the hole disappears.
So now we've just got a quick bounce, and likewise,
we can move this up to 200 if you want, put this to 200,
and put this to 200, and now we've got a bigger bounce,
or if we want the values to be between 200 and 100,
I can just go in and change that min value again to 100 instead of to 0.
I'll change that in both places,
and it moves the curves up to the range that we expected: the 200 to 100.
So in the expressions that I'll give you in the text file,
I'll give them to you like this; however,
if you go out there on the web and you find a couple of these on your
own and you want to know how to manipulate them,
know that basically you'll see a bunch of equation at the beginning,
and that's generally what you would copy and paste in.
However,
know that you can usually just change the value range you want by
adding this part of the equation into the value range.
Again,
that's just a multiply max value plus min value plus min value to
get the curves to be where you want them to be.
So that's all I'm going to show you for the Expression Editor,
it's a very powerful tool, and like I said,
I'm going to include a lot of these equations for you in a text file so that
you can take a look and kind of adventure out on your own.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.