• About us
  • Contact Us
  • Terms and Conditions
  • Forum
  • Materials
  • Shaders
  • Tools
  • Video
  • Learn
  • Gallery
My Mental Ray

Navigation

  • Main Page
  • Cookbook

MYMR WIKI Tools

  • Creating pages
  • Markup n styles
  • Page protection
  • Help

 

Toolbox

  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Article    Discussion    View source    History   
Personal tools
  • Log in / create account

Depth of field

From Wiki

Jump to: navigation , search

You are here: mental ray cookbook / Depth of field

Depth of field (DOF) is normally used to describe an optical effect of real-world lenses in which only parts of the scene are in focus, whereas parts in front of and behind the focus plane are out of focus. A large depth of field will have most parts of the image in focus, whereas a shallow DOF will only have a small region of focus.

Apart from making things "more blurry" in the foreground or background, DOF will also produce an effect called Bokeh which will cause bright highlights to become sharp, bright circles.

CG cameras do not have lenses and have perfect optical properties and therefore infinite DOF. Similar to motion blur, DOF is used in CG to either match a real camera or to artistically emphasize depth and focus the attention to certain parts of the scene.

DOF is dependent on the focal length of the lens, the lens aperture used and the focus distance, but a true DOF calculation can be fairly complicated as most lenses have multiple optical parts. Therefore most CG algorithms approximate true depth of field effects.

To render with DOF in 3ds Max:

  1. Create a camera
  2. Enable DOF for this camera by checking 'Enable' under 'Multi-Pass Effect' (the preview will not be correct for mr)
  3. Select 'Depth of Field (mental ray)' from the dropdown box under 'Multi-Pass Effect'
  4. The last step will create a new rollout in the camera properties titled 'Depth of Field Parameters'. Use this to adjust the f-stop. Higher values will result in a larger depth of field, i.e. sharper images
  5. If you want real-world behaviour, make sure you use the proper scale (System and Display Units) and use a proper 'Aperture Width' in the render settings dialog
  6. Either place your camera target where you want to focus or adjust the camera's 'Target Distance'
  7. Render

--MartinB 14:50, 19 August 2007 (PDT)

Retrieved from "http://mymentalray.com/wiki/index.php/Depth_of_field"
Copyright © 2008 My Mental Ray Community. All Rights Reserved.
No part of this website may be reproduced unless for personal use without prior written permission from The My Mental Ray Community.