>> Welcome to Unreal Tips and Tricks.
We're going to be looking at how to set up a new cinematic
depth of field, to create high quality,
photo-realistic cinematics.
The Cinematic Camera in Unreal gives us access
to physically correct camera settings
that work just like a real-world camera does.
Let's briefly look at some key camera concepts
before we proceed.
This diagram on screen represents how a camera
works in the real world.
Starting from the left, at number 1, the red, blue,
and green dots represent the background, focal point,
and foreground, respectively, in the scene we're trying to capture.
The distance covered at value 2 represents the distance from
the focal point to the camera's lens or focus distance.
At number 3 is the camera lens and just behind that,
is the diaphragm at number 4.
The diaphragm opens and closes to allow more of less
light into the camera. The diaphragm is represented
by the f-stop number.
At point 5 is the focal length, which specifies
distance from the camera lens to the camera's filmback
or digital sensor at point 6.
The larger the opening of the diaphragm,
or the lower the f-stop number,
the greater the effect of depth of field.
This is referred to as shallow depth of field.
Setting the f-stop higher closes the diaphragm
thus making the opening smaller.
This reduces the depth of field effect,
bringing more objects into focus.
While a shallow depth of field allows us to focus in
very tightly on an object,
leaving everything in the foreground and background
out of focus.
These three key settings; focus distance, focal length, and f-stop,
work in conjunction to not only alter the zoom and field of view
of the camera, but also the strength and quality of the
depth of field.
We'll be using the Cine Camera Actor in this demonstration.
The camera and the depth of field effect it produces
was designed to be used in cinematics,
not during gameplay. For gameplay, use a standard
Unreal camera instead and then use circular depth of field
in the standard camera or post process volume.
I've already got a Sequencer master track
and a shot track setup.
I can double-click the shot track
and it will add a camera into the Sequence
by holding control and dragging the Cine Camera Actor
into the viewport.
The Cine Camera Actor is found under Cinematics
on the Modes panel.
From here, we can lock the camera to the viewport,
allowing it to be piloted using the Unreal viewport controls.
With the camera selected, let's look at the Lens Settings
in the Details Panel.
The Filmback settings allow us to specify the sensor type
and thus, the width, height, and aspect ratio.
I'm going to leave it at the default of 16:9 DSLR Sensor.
Keep in mind that a larger sensor will produce a more
dramatic depth of field effect.
Next up are the Lens Settings.
Using the dropdown allows us to select several
standard lens types, such as the 30mm prime lens without a zoom,
or a 70-200mm zoom lens.
We'll stick with Universal Zoom for now.
Under the dropdown, you can adjust the min and max
focal length. Remember, focal length will let us tweak
the distance from the lens to the filmback sensor,
which controls the field of view and the zoom.
We also have controls for min and max f-stop
or aperture opening. And remember here, a lower value
will increase the depth of field effect
so that only the focal point is in focus,
while everything around it, the foreground and background,
will be blurred out.
Last of all, we can change the Diaphragm Blade Count.
The blade count is going to determine the overall shape
of your bokeh effects, in conjunction with the minimum
f-stop value and the current aperture opening.
The closer the aperture opening gets to the
minimum f-stop value, the rounder the bokeh shape becomes.
Keep in mind that these are the min and max values
for our Cine Camera. To actually tweak the values in the camera,
we need to move down to focus settings.
The manual focus distance defaults to 100,000 cm.
This is the distance from our lens
to the object we want to focus on.
Think of this as a plane of focus that we can move
either closer to or further away from the camera.
The distance can be tweaked manually,
or we can use the eye dropper to pick an object
in the viewport to focus on.
When tweaking the focus distance,
it's also a good tip to enable the Debug Focus Plane.
This lets us position the colored plane in the viewport
so that it overlaps the object we want to focus on.
With our focus distance set,
we want to now adjust the zoom and field of view
with the current focal length.
Higher values here will zoom in tighter on the subject,
while lower values give us a wider angle
from further away.
When the focus distance and focal length are nearly identical,
you'll get much stronger depth of field blurring.
assuming, of course, your current aperture is set to
a low f-stop value.
Other than the Focus Distance Debug Plane, there's also
another option that lets us visualize
the camera's focus settings.
You'll find this option under the Show button in the viewport.
From here, select Visualize and then Depth of Field Layers.
This gives us a colored viewport,
showing the focal plane in black, while foreground objects
are in green, and background objects are blue.
One last tip:
All of these settings can be animated in Sequencer,
along with camera moves.
In fact, all three primary settings are already added
to our camera in Sequencer.
Simply set a keyframe for each, move to the next frame,
and tweak the settings to create a new keyframe.
Alright, so thanks for watching this episode
and we'll see you again on another
Unreal Tips and Tricks.