Skill Level Intermediate
- [Instructor] Welcome to After Effects Weekly. I'm Eran Stern and today, we continue to explore displacement effect in After Effects. Specifically, we are going to take a look at the caustics effect which will help you to render water. Now caustics is the envelope of light rays reflected or refracted by a curved surface or an object. Imagine that you are standing on top of a swimming pool looking down at the water. You're probably going to see the bottom of the pool and maybe also some of the reflection from the sky, but you will definitely notice the folding of light as it hits the water's surface.
And this is what this effect is all about. In my opinion, this is one of the best displacement tools in the entire application. And it's also quite easy to use. Let me show you a couple of examples. So we are starting over here with this composition where I have my own logo with a couple of supporting elements such as background and these lines. Alright, I'm going to pause the playback and I just want you to be aware that I also have a couple of other layers over here. So this fabric layer, for example, if I'm going to double-click on it, which also has a mask, this is how it looks.
Just a piece of footage of fabric. And then there is also this paint throw, which looks like this. Which is very interesting on its own. But we are going to take those pixels, and notice that they are not filling the entire screen. It doesn't really matter. This effect is going to handle this very nicely. So we are going to use both of those layers in order to create some watery look on top of what we already have here.
So to start off, I'm going to make sure nothing is selected and then under layer, new, I'm going to create an adjustment layer. I'm going to go to the simulation category just so you understand where it is, and I'm going to apply the caustics effect. Now, as I described before, there is a bottom of the pool, there is a sky reflection, and this is the water. This is the most important part. So I'm not going to use the bottom and I'm not going to use the sky in this example.
But you can go ahead and feed those layers in if you want to. Instead, I'm going to use the water. So the water surface is going to be one of the layers that I showed you. I'm going to select the fabric layer as a starting point. And then, since this effect tries to imitate a swimming pool, it also casts a blue color on the surface. I don't want this, so I'm just going to change the surface opacity to zero to get rid of this blue spill. Then, I need to play with the wave height, the smoothing, and the water depth in order to create something which looks more convincing.
And basically, this is it. So you can just press space bar and take a look at this very convincing blender of fluid or water on top of our logo. Now in this case, since I don't want to overtake my logo, I can always use the mask that I've applied to the layer. And this mask, just to remind you, is going to limit the pixels that the effect is using and it will not distort the logo so much.
If I'm going to switch it now to the paint throw, we can get a sense of how this works. I'm just going to press space bar and play it from this point onward. Once again, you can see the refraction and the reflection of light, which is going to give you a very convincing result. Now you don't need to stop here. You can actually animate all of those values in order to create something which looks more convincing. And in order to show you an example of this, I'm going to delete this adjustment layer with the caustics effect, and I'm going to switch off the visibility of those shy layers that I have over here.
One of them is another adjustment layer that I named caustics, and I've already applied the caustics effect with some key frames for the wave height. Then, I'm going to set it to use the fabric texture. I'm going to go to the beginning. And remember that this time, we are also taking under account the effects and masks. So in this case, if I'm going to take a look at the fabric, we can see that I've applied the fast box blur to it so it will be a little bit more softer in terms of the displacement.
I'm going to put it at full screen by pressing on the tilde key and play the result for you. Very, very nice. Alright, let's test the other guy. I'm going to escape out of full screen. And then let's switch our water surface to this paint throw. Once again, go to the beginning. Let's switch to full screen and see how this is working.
This is so amazing and so believable. I really, really love this result. Let's see something which is more useful, I think. I'm going to switch to this composition where I have this action of my brother who is touching some invisible wall, trying to displace it I guess. Oh, there's another point over here. Let's give it something to push. So I've already created this wave action. I'm going to double-click in order for you to see what I have over here.
I'm going to switch off this adjustment layer. So what we have here is a couple of radio waves effect which are exactly at the same place where Yuval is touching the screen. So we have two at the beginning and then another one over here. And then on top of this, I applied an adjustment layer with the turbulent displace effect, which is going to create this distorted waves. And by the way, I've just left the default values over here. Didn't play with them so much.
Alright, we are going to use this as a displacement map for the caustics effect. So I'm going to select this layer, Yuval's Act, this is the video file. I've already applied the caustics effect to it. And then I'm going to set the water surface to this wave action composition. And already, you can see how well it performs. Now you can change the wave height, smoothing, water depth, everything that you need. You also have a refracting index, and this is the index of liquid.
So if you want, you can go to Wikipedia and find exactly what is the refractive index of the subject, of the matter that you want to distort. In any case, 1.2 is great for water. So I'm just going to switch to full screen and play for you the result. This time including some sound effects.
So this is how you can use the caustics effect, one of the best displacement tools in After Effects, to create a very realistic lender of water.