Hey guys and welcome to another HitFilm tutorial.
Have you ever wanted to create realistic water simulation in HitFilm?
Well you’re in luck because today we’re going to talk about caustics.
Caustics is really cool; it can allow you to create a bunch of different distortion
effects with one very simple concept.
Triem is going to take you through this in his new guest tutorial.
Take it away Mike!
Caustics is one of the hidden gems of HitFilm’s effects.
Caustics simulates a reflective or refractive plane, which makes it perfect for water, glass
or other distortion-type effects.
I’m Mike Miller, and today, we’re going to look at caustics in Hitfilm.
Here we are in Hitfilm 4 Express.
We’re going to need to import some media to generate a background, environment map,
bottom texture and surface texture.
Then we’ll create a new Composite Shot, name it “Ocean,” and we’ll just go ahead
and make that ten seconds.
Inside the composite shot, we’re going to drag this image.
We’re also going to drag in THIS image, which is going to be used as our bottom texture.
I’m going to hide this image underneath the sunset.
Now I need to create a new plane.
Then I’m going to come up and add the “Grid” effect to this plane, and convert the plane
to 3D.
I’m going to rename this plane, “Water Surface,” then twirl open it’s “Transform”
controls.
I want to rotate this to be parallel to the existing water, so I’m going to set “X
Orientation” to 90, grab the control widget, the move it down until it’s more-or-less
lined up with the horizon.
If I zoom in you can see there’s a bit of a tilt to the entire picture, so I’m going
to go ahead and grab the widget, rotate this a little, just so it lines up correctly.
I don’t want to see the edges of this plane at all, so I’m going to go ahead and just
scale up the plane until all four edges are off the screen.
Then I’m just going to move the plane back and forth in space until it lines up with
the horizon.
I don’t need the grid effect anymore, so I can go ahead and delete it.
Let’s add caustics!
Aaaannd…
Nothing terribly thrilling is happening.
So let’s go into caustics and take a look at some of the settings.
I’m going to skip down to this “Bottom Texture,” twirl it open and select the image
I already brought in.
And now, we can see something happening.
Since caustics simulates a reflective or refractive planar surface, the “Bottom Texture” layer
is what’s “behind,” or “under” that surface
Now that I’ve added a bottom texture, I can play with the “depth” slider and I
can play with the “Refractive Index.”
The refractive index controls how much light will bend as it crosses the planar surface
The default is 1.33, which is correct for water.
Refractive indices of other material can be found with a little searching online, but,
since I’m doing water, I’m going to set it back to 1.33
We’re going to skip over “Height Map,” “Surface Texture,” and “Illumination,
and go all the way down to “Environment Map.”
The “Environment Map” is the layer that will be reflected in the surface of our caustics
plane.
An Environment Map is wrapped around the inside of an imaginary, infinite 3D sphere, and an
environment map can be a still image, generated media, or even 360-degree video.
In this case, I'm just going to go ahead and use the “sunset Long” image.
The “Pre Blur” Slider blurs the image before it is reflected.
I’m going to turn this down to 0.
“Amount” sets the strength of the reflection.
I’m going to turn this all the way up to 1.0.
“Angle Dependency” determines how light scatters off the surface.
Higher values mean less light is scattered - basically higher values will reduce the
amount and strength of the reflection.
I’m going to turn this all the way down to 0.
Now that I can see the reflection in the surface, I can see that the reflected area isn’t
actually lining up with the horizon.
I’m going to grab my control widget and push the plane back in space until it aligns
with the horizon again.
Then I’m going to come back over into the caustics effect, and, in the environment map
group, I’m going to open up “Transform.”
The “Transform” controls rotate the infinite sphere, and above that we see these controls
for “Texture Scale,” and “Texture Ratio.”
“Texture Scale” changes the size of the apparent reflection.
“Texture Ratio” deals with how the texture will be stretched to fit inside the sphere,
and deals with the aspect ratio of the image.
“X-Rotation” rotates the invisible sphere around its x-axis.
Same with “Y-Rotation,” and “Z-Rotation.”
I’m going to set my texture scale to 50, my texture ratio to 0.63, and then I’m going
to set my x-rotation to 73, my y-rotation to 67, and my z-rotation to 180.
My environment map is now pretty close to being an exact mirror rotation of the sky.
I do like to setup my environment map before I do anything with the height map.
Leaving this as a flat, mirrored plane does make it a lot easier to line things up.
Let’s go ahead and take a look at our height map…
well… we don’t have one yet!
We’re going to need to create another composite shot for that, so I’m going to come down,
create a new composite shot and call it “Height Map.”
In “Height Map,” I’m just going to drag in another copy of the plane I created earlier,
come up to “effects,” and add in “Fractal Noise.”
Then I’m going to jump back to my “Ocean” comp, drag my “Height Map” composite in,
go to my surface layer, go to the “Height Map” setting for caustics, twirl that open
and select the “Height Map” composite.
And now we’re getting a watery surface!
These waves are a little too large and too chaotic to fit in nicely with our source image,
but, while I’ve got it open, let’s talk about the controls under “Height Map.”
“Wave Height” sets the maximum top and bottom height of the plane.
SO I’m going to come back to the height map composite and change the fractal noise
to fit our scene better.
I’m going to change the “Type” of noise from “Clouds” to “Swirl.”
I’m going to open “Transform” and change the “Scale” of the noise from 150 pixels
to something a lot smaller, like, 15.
I want the fractal noise to animate, so I’m going to come over to “Seed,” activate
key framing on that, move to the last frame and change my seed value to something else.
I also want my water to flow a little bit, so I’m going to come down to “position,”
and enable keyframing.
I want my water to move a little to the right, say, 150 pixels, I want my water to move closer
to the camera, say, 200 pixels.
Now, when I go back to my ocean comp, this is still not looking right.
This is still looking way too chappy, way to chaotic, and too bright.
That's because our current settings in caustics were setup to optimize lining up the reflection.
Now we’re going to “tune” this to make it look like good water.
So, I’m going to open up the caustics effect again, and, the first thing I want to do is
change my wave height--something around “5” looks about right for this.
Then I want to go ahead down to the environment map and change those settings.
I’m going to add 8 pixels of pre-blur, and then I’m going to turn down the reflection
amount a little bit, and I’m going to turn angle dependency back up.
Now, if we take a second to RAM Preview this… …we’re starting to get some very realistic
water.
So, the fractal noise composite shot we’ve added is what’s generating the height map
that’s determining the size of the water ripples in the ocean plane.
You don’t have to use fractal noise as your height map source.
You can use anything you want.
Here we have a black plane with some white text on it.
Let’s drag that into our ocean composite, go up to our water surface layer, open up
the caustics effect and change this height map to our text.
I’m going to turn the wave height up so we can see more clearly what’s going on.
You can see at the bottom of the screen that we no have a flat, mirrored plane with text
inset into the surface.
What this tells us is that black represents the high point of the height map and white
represents the low point.
This “Invert Map” button swaps those values.
Now we have a lower water plane and text rising up out of the surface.
This version of the height map has the same fractal noise we were using before, except
the colors have been changed to black and a very dark gray.
White text has been keyframed to fade in and out.
When we use this with our ocean, we can see that this animates a text-shaped divot falling
into our ocean surface.
This is great for lower thirds!
There’s one last set of controls in caustics we haven’t looked at yet, and that’s “Illumination.”
To get illumination to work, we’re going to have to add a light.
You can see as I move the light around the image that it is illuminating the plane.
Caustics has its own “Materials” settings within the filter, so one thing I want to
do is come down to the “Materials” settings for the LAYER and turn off “Illuminated.”
This prevents the light from affecting the layer twice.
Now I can move the light around in 3D space, and just line that up… until I’m happy
with it.
I also want to change the color of the light from something that’s “pure” white to
something that’s actually in this image.
Let’s sample some of these yellows from the clouds.
I want to come down to the illumination settings in the filter a bit and try to dial this in
a little bit more.
At this point it’s going back and forth between the illumination and environment map
setting and just kind of playing with the sliders until you get the look you’re after.
Now that I have my full water texture in there, I want to go ahead and check my horizon again.
It looks like I’ve pushed the horizon a little bit too far.
I’m just going to keep tweaking that until I’m happy with the horizon.
One last thing I want to mention in the illumination controls…
I’ve turned the environment map off and I’ve added a second light to the scene.
So, I now have two lights: a purples light and a green light.
If you go into the Illumination settings you’ll see a drop-down menu, which currently says
“Comp Lights.”
If I twirl this down, I can change this to “Selected Lights.”
Now I can manually pick up to four of the scene’s lights to us in the caustics effect.
So, I can use just the purple light, or just the green light.
This may be useful if you have a light in your scene you don’t want to affect your
caustics plane.
One more thing I can do to improve the look of this is to add a bit of atmospheric haze.
I’m going to go down to the bottom left, open my composite shot properties, “Advanced,
and enable “Depth Fog.
Depth Fog simulates atmospheric haze.
I’m going to set the “Near Clip distance to 1500, I’m going to change the “Far
Clip” distance to 5000, I’m going to change “Density” to 0.1, and then I’m going
to grab the eyedropper and sample a color from right here on the horizon.
Hit “OK.”
It’s a subtle difference, but it does help blend the back edge of the water into these
distant hills.
And, just to refine this a bit, I’m going to add a light flare and a vignette.
There’s one last thing I’m going to do.
I’m going to come down to my sunset layer, duplicate that, and rename this, “Golden
Gate Top Mask.”
Then I’m going to come down and use the freehand mask…
Once I’ve drawn that mask I’m going to feather it in by about 8 pixels,
I’m going to take “Golden Gate Top Mask” and bring it above “Water Surface.”
This just brings back more of the shoreline, and bits of the bridge pylon that were cut
out before.
There’s actually one other control in caustics we haven’t talked about yet, and that’s
the “Surface Texture” layer.
I’m just going to go ahead and load in… this “United Federation of Planets” logo.
I’m going to come down to environment map and turn amount all the way down to zero.
Then, when I come back up to surface texture, you can see that the “Surface Texture”
layer is simply mapped onto the surface of the caustics plane.
Note that the surface texture is, by default, completely opaque.
I’m going to right-click on this, convert it to a composite shot, and turn the opacity
down to about 25%.
We can see that, by turning the opacity of the texture down, now we can see though the
surface texture down to the bottom texture layer.
And that pretty much covers using caustics to make a water plane.
Caustic is also great for simulating invisibility or “cloaking” effects, like in the movie,
“Predator.”
I just have a background plate, and then I have two composite shots being used.
The first one is this green screen “Predator” clip.
The background has been keyed out, and it’s been brought in over the background image.
“Predator Caustics” has a caustics effect on it, and then after the caustics I’ve
put a “Set Matte” effect, using another copy of the same composite shot as an alpha
matte.
On top of that I have another copy of the same video, which also has a set matte applied.
But that has this fractal opacity map.
Put it all together and you get this!
Caustics doesn’t even have to use transparency or refraction.
Use an opaque surface texture, use a height map similar to the one shown above, and you
get something that kind of looks like a flag.
So, I hope you found this discussion of caustics helpful!
I’m Mike Miller, thanks for sitting through this tutorial, and I’ll see you next time!
Thanks for watching guys!
As you know we make tutorials every Thursday so come on back if you want to see some more
cool content in a week.