Hey there good people, my name is Scott and you are watching Sword & Shield Studio. Right
now we are going to learn the basics of how to use Displacement within Fusion.
Now you can use displacement techniques to achieve a variety of specific effects from waving grass,
to water ripple effects, text warping and glitch effect even. I'm sure you're ready to dive in
so let's get right into it. So here I am on the Fusion page with the base of the
composition I showed in the introduction but without any displacement effects. There are a
couple different assets included here. There is the grass image with a transparent background,
an image of the clouds, the sky here that I applied a couple different effects to
and the displacement text in the foreground up here. I included a link to the project file along
with all the assets I am using here if you want to follow along, or you can try the following
displacement techniques to your own project if you like. Say the first thing we want to do in this
composition is make the grass appear as though it is waving in the wind. In order to do that,
we will have to utilize a displace node. To do that, left click the grass MediaIn node
at the beginning of the node tree here and hit 'Shift+Space' on the keyboard
and type 'DSP' to search for the displace node and hit enter or click add to add that.
You will notice once you add a displace node that it doesn't do anything right off the bat.
You can play with the sliders in the inspector all you want but it's not going to do anything
yet. This is because the displace node needs a map image fed into it which will dictate which way our
grass image here is displaced. In this case I am going to add a background node to the node tree.
Drag it from this background icon here at the top left and feed it into the other input
in the displace node. Now you can preview what this background node will look like by
left clicking it and hitting '1' on your keyboard. And if you don't have it enabled yet, enable the
dual viewer option at the top right of your viewer here to preview that background.
Now right now this background is completely black which means it is doing no displacement at all, we
are going to change the type from solid color to gradient which will change it to a black-to-white
gradient image. Now you can see, if I make the preview a bit bigger, that as I adjust
the gradient the grass displaces in a particular way. Now how the displace node is referencing
this is it's looking by default for the luma value where mid-tone grey, this area here,
is where the most displacement is going to happen. Where areas that are pure white and
pure black there is no displacement happening. So you can see this in real time as I adjust,
if I move the gradient all the way over there is no displacement because everything is white
and as I shift it back you can see along that grey edge is where the grass is being displaced. Since
mid-tone grey creates the area of most distortion in a displacement map image we know that in order
to have this grass ripple in a regular manner as though there is a wind blowing through it we will
need a repeating pattern of this color. So in the inspector of your background node, change either
side of the gradient to mid-tone grey. You can click the color bar here to get to the color menu.
You can either enter RGB values of 128, 128, 128 or it has a HTML hex# of 808080 and that is
mid-tone grey. So now one side of our gradient is mid-tone grey and the other is black where there
is no displacement happening. Next, set the repeat option in the inspector from 'once' to 'ping-pong'
and after you do this you can modify the gradient however you like. I think I am going to scale this
down some and leave it at a slant because wind does not often come in a straight line.
Now that we have the shape and color of the displacement map image set how we like it. Next we
have to animate the gradient to create the regular displacement that is going to make the grass
appear as though it is moving in our composition. So in order to do that, scrub to frame 0 in your
composition timeline and select the background node that's feeding into your displace node
and in the inspector set a keyframe for the offset value and leave that value at '0.0' for the very
beginning. Decide at this point how long you want one movement of wind to take place, one breeze if
you will. In my case I think I am going to have the complete cycle of this gradient go through
every 48 frames or two seconds since this composition is 24 frames per second. So I will go
to frame 48 on my composition timeline and set a keyframe here and set this offset value to '2.0'.
Now you will see in the background preview that the gradient looks the exact same. That is
because an offset value of '2.0' is one complete cycle of motion for the gradient. So at frame 0
and at frame 48 they will look the exact same.
So that's great to have the grass animate for the first 48 frames of the composition
but we want this to loop over the entire course of the composition, so in order to do that
again make sure you have your background node fed into the displace node selected and left click the
spline editor at the top right of Fusion here and check the 'Offset' value that we animated
and hit Zoom to Fit and I will hold control and use my scroll wheel to go out a bit
and hold left click and box select these two keyframes here and hit
the 'Set Loop' option here. And what this will do is loop those two keyframes infinitely
over the entire course of the composition. And so if I play this back we've got a regular
waving motion for the grass and perhaps that's a bit
intense, I might adjust the gradient and make it a bit bigger.
You'll have to play around with yours to get it how you like.
I'm going to close the spline editor here. Grass usually does not move in an entire wave like this,
it is typically the top and about 3/4 down from the stalk of grass that moves. So
in order to define a specific area of the grass you want to move with your
displace node here we'll have to mask our background node here. So drag a rectangle node
down to your node tree, hook it up as a mask to the background with the blue connector
and adjust the size of this, the size and position until it covers about 3/4 of the grass.
Increase the soft edge value. We might have to
increase the scale of the X-axis so it cover the entire composition. If we play this back,
you'll see that looks a bit more realistic since the bottom of the grass isn't moving.
Just a little detail to add some extra realism to this effect. Now that we know generally how
displacement works we can apply a similar effect to our displacement text in our composition here
by selecting the 'Text1' Text+ node here, hit 'Shift+Space' and type 'DSP'
to add a displace node, hit enter or click add to add that to the node tree. Of course we know
now that the displace node isn't going to do anything unless we have a map image fed into it.
So I will drag another background node from our toolbar here ontop of the node tree,
hook this up into the other input in our displace node, left click that background node and hit '1'
on my keyboard to preview it in my viewer 1 here. Change the type from a solid color to gradient,
change one side of the gradient to mid-tone grey.
Remember that is 128 red, 128 green, 128 blue or '808080' if you want to do the hex value.
Hit OK. Set the repeat value to 'ping-pong' and I think I will just leave this relatively straight.
Next we will have to animate the offset value, so go to frame 0 of your composition timeline,
set a keyframe for offset at '0.0' at the very beginning. And I will go
approximately five seconds in, so 120 frames, and set the keyframe for offset to '2.0'
to have it go one complete cycle five seconds through the animation. Just so it's going at a
different rate than the grass. And you'll see as I play this back that the text is moving.
And with the background node still selected, click the spline editor at the top right of Fusion
and with the offset value selected, hit 'Zoom to Fit' here and hold 'Ctrl' and scroll out a bit
so you can hold left click and box select
these keyframes and hit the 'Set Loop' icon at the bottom here to loop that animation.
And now, just like that, we don't need any masking on this one because we want to affect the
entire body of text. But just like that we have displacement effects applied to both our grass
and our text. That does it for this tutorial. I hope that after watching this video you learned
a bit about the basics of how displacement works in Fusion and begin thinking of different ways
you can utilize these techniques to add some dynamic fluidity to your animation projects.
If you did find this useful, please consider subscribing to the channel where I upload a
video just like this one every week. Thanks for watching, I'll see you next time.