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
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
Comment