Menu
Lumberyard
User Guide (Version 1.15)

Adding a Depth of Field Node

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn more about legacy features, see the Amazon Lumberyard Legacy Reference.

You can use the Depth of Field (DOF) node to add realism to scenes by simulating the way a real-world camera works. You can use a broad depth of field to focus on the entire scene, or use a shallow depth of field to have sharp focus only on objects that are a specific distance from the camera.

To add a Depth of Field node in the Track View editor

  1. In the Track View editor, right-click either the sequence (top node) or the Director node in the tree as applicable, and then click Add Depth of Field Node.

  2. For each of the keys listed below, click the applicable key listed under the DepthOfField node.

  3. To position a key, double-click the preferred location on its highlighted row in the timeline. Double-click the green marker, and then under Key Properties enter a value for Value.

Depth Of Field Node Key Properties

Property Description
Enable Enables or disables depth of field effect
FocusDistance Distance the focus is from the camera. Positive values are in front of the camera while negative values are behind the camera.
FocusRange Distance toward and away from the camera until maximum blurriness is reached. By default, this value is twice the FocusDist value.
BlurAmount Maximum blurriness value.

If you have a scene with full player control, setting depth of field using the Image:EffectDepthOfField flow graph node can be a good option. In addition, you can use the Interpol:Float node to smoothly fade the focus in and out. Use this sparingly as it can be difficult to track where and what the player is looking at.