Adverti horiz upsell

oaFocalLengthSwitcher 1.3.0 for Maya (maya script)

Change focal length while preserving composition.

License
Button download
1,071 Downloads

Compatibility

  • 2009, 2008, 8.x, 7.x, 6.x

Operating Systems

  • Irix
  • Linux
  • Mac
  • Windows

History

Created:04/29/2009
Last Modified:05/03/2009
File Size: 11.8 KB

undefined

 

 

 

 

 

DESCRIPTION

 

 

When you change the focal length on a camera, you have to dolly the camera

toward or away from the "subject" to maintain the original composition. This tool

allows you to change the focal length while automatically preserving composition.

 

Given a new focal length, the following happens:

 

    1. The new focal length is set.

    2. The camera is automatically moved toward or away from the "subject".

    3. The focusDistance is automatically adjusted.

 

IMPORTANT: The "subject" is determined by the focusDistance.

The "Visualize focusDistance and depth of field with locators" checkbox will 

help you set this value properly.

 

This tool can also be used to keyframe the perfect dolly zoom.

https://en.wikipedia.org/wiki/Dolly_zoom

 

DEPTH OF FIELD NOTES:

 

In addition to the focusDistance locator, there are 3 more depth of field (DOF)

locators: nearDOF, farDOF, and hyperfocalDistance. Everything between nearDOF

and farDOF will be "in focus". 

 

What you consider to be "in focus" is determined by the circleOfConfusion

attribute on the cameraShape. I found that a value of 0.3 is accurate 

for Mental Ray. You will have to play with this value until the near/farDOF 

locators actually match the render DOF. (The "standard" coc value for a 35mm 

camera is 0.03, but I recommend to trust your eyes and set the coc value yourself.)

 

Controlling the DOF is done just like with a real camera: by changing

the focalLength, fStop, and focusDistance. It is important to note that

the circleOfConfusion does not affect DOF; it only aids in the visualization

of DOF and depends on what you consider to be "in focus".

 

Note: If you ever find the farDOF locator behind the camera, that's normal. 

It means that everything from the nearDOF locator to infinity will be in focus.

 

 

TO_USE

 

 o Execute 'oaFocalLengthSwitcher' to bring up UI.
 o Follow the directions in the UI.

 

IF YOU ENJOY THIS MEL SCRIPT, PLEASE RATE IT. I WOULD APPRECIATE IT. THANK YOU!



Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • gators89
    gators89
  • Andy Guttormsson
    Andy Guttormsson
  • miyazaki masashi
    miyazaki masashi
  • RenBertsson
    RenBertsson
  • Herman76
    Herman76
  • Pratik Basopiya
    Pratik Basopiya
  • neekk
    neekk
  • Scoopy
    Scoopy