O'Reilly logo

Away3D 3.6 Cookbook by Michael Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Camera Depth of Field Effect

The depth of field (DOF) in optics is a distance at which a target object is focused. The unfocused objects around become blurry. You have seen this effect probably hundreds of times when filming with your home camera. In 3D, scene DOF effect enables you to define a distance from the camera at which an object is being fully focused, whereas the rest of the objects that are out of range of this distance become gradually blurred. Away3D gives us the ability to simulate this effect when using cameras in conjunction with DepthOfFieldSprite billboard. Let's see how to do it.

Note

It is worth noting that depth of field effect is a CPU-intensive process as it makes use of the Flash generic blur filter. It may significantly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required