Announcement

Collapse
No announcement yet.

Max 2016 Physical cam - formula: FOV -> focal length ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Max 2016 Physical cam - formula: FOV -> focal length ?

    Hi there !

    I'm writing this topic to ask a technical question about the new Physical cam that chaosgroup developed with autodesk for max 2016:

    Could you give me the exact formula that calculates the focal length based on the FOV (and the film size and the target distance) ?
    I tried some simple math and got the formula for a standard camera, but the physical cam includes some extra calculation that takes into account the target distance and i can't figure out the exact formula.

    Here is the reason why I need this:

    In our studio, we have a script that converts (and bakes the animation of) a standard cam (used by our layout artists, our mocap team and our animators) to a Physical cam (that we use of the final renders)
    As you know, focal length on a standard cam and a Physical cam don't work the same, there is a tiny difference, so the only way to match one to the other is through the FOV.
    So the way the script works is that it bakes the FOV on the physical cam (for every frame), using the "Specify FOV" attribute.

    Now, in theory this should work, but there is currently a bug where if the FOV is animated, the actual focal length parameter doesn't update properly: The link between FOV and focal length breaks and the focal length remains the same throughout the entire animation. As a result, although the viewport updates properly (because it reads the FOV attribute), at rendertime Vray reads the (wrong) focal length value and the renders don't match the viewport.

    you can try it for yourself:
    create a physcal cam -
    tick "specify fov" and scrub the spinner for the FOV parameter. look at the "focal length" attribute, and you will see that altho it's greyed out, it updates automatically.
    Now go to Autokeyframe mode.
    set a FOV value at frame 0, then another value at f1, then at f2 and so on.
    now scrub in the timeline and look at the greyed out "focal_length" value. it should update but it remains the same.

    The workaround would be to actually bake the focal length on the Physical camera, instead of the FOV, but I need the exact formula to convert the FOV to focal_length.

    If I was not clear please let me know and i'll try and provide you with a sample scene where the problem happens

    Thank you very much !

    Cheers
    Last edited by fr33style; 11-02-2016, 05:18 PM.

  • #2
    Could you update the FOV and then set a key on the focal length? Using maxscript and going through the range with slidertime might do the trick.
    Rens Heeren
    Generalist
    WEBSITE - IMDB - LINKEDIN - OSL SHADERS

    Comment


    • #3
      It's the lens breathing which is the difference between a simple camera and the physical camera.

      The FOV of a standard camera is = 2 * (atan ((0.5 * aperture_width) / focal_distance)


      Lens breathing is when the focus changes the distance the lens moves when focusing changes the focal distance slightly resulting in a different FOV.
      That's a more complicated formula, maybe Vlado can explain more.

      In Max 2016 the Max Physical Camera has the option to turn lens breathing off, or turn the influence down.
      Maxscript made easy....
      davewortley.wordpress.com
      Follow me here:
      facebook.com/MaxMadeEasy

      If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.

      Comment

      Working...
      X