Maya aperture conversion during FBX import

   6707   2   1
User Avatar
Member
194 posts
Joined:
Offline
I see that the formula is not just

25.4 * Maya horizontal aperture, but

25.4 * Maya horizontal aperture(min(1, (ch(resx)/ch(resy)*ch(aspect))/Maya aperture ratio)

Is that the correct formula to use?
User Avatar
Member
350 posts
Joined: Jan. 2008
Offline
whalerider
I see that the formula is not just

25.4 * Maya horizontal aperture, but

25.4 * Maya horizontal aperture(min(1, (ch(resx)/ch(resy)*ch(aspect))/Maya aperture ratio)

Is that the correct formula to use?

It's actually a lot more complex (and evil) than that, at least when importing from FBX.

First, we compute Houdini's equivalent aperture for the camera. How this is done depends on what the FBX aperture mode is set to (i.e. what drives the aperture) - it can be Focal Length, Horizontal, Vertical, or Vertical and Horizontal.

Then, we look at the Fit Resolution Gate setting in FBX/Maya. If it is set to Horizontal fit or no fit, we just use the number above for the aperture. Otherwise, we use the following formulas (aperture in these is the aperture number computed above, not Maya's original aperture):

Vertical Fit: aperture*((ch(resx)/ch(resy)*ch(aspect))/aspect_ratio)
Fill/Stretch Fit: aperture*min(1, (ch(resx)/ch(resy)*ch(aspect))/aspect_ratio)
Overscan Fit: aperture*max(1, (ch(resx)/ch(resy)*ch(aspect))/aspect_ratio)

Aspect ratio, in its turn, is: original_aperture_width*camera_squeeze_ratio/original_aperture_height
These values come from the FBX file being imported. I'm not sure what the equivalents are in Maya.
Oleg Samus
Software Developer
Side Effects Software Inc.
User Avatar
Member
194 posts
Joined:
Offline
Thanks, Oleg.

This is scarier than I thought ;-)
I had just updated my camera transfer tools' code to take into account the longer formula above. If I have to take into account all possible cases you listed it will become a pain. Good thing I had uploaded the code yet. I'll just go back to the older and simpler formula and leave the heavy lifting to you guys.
  • Quick Links