3dsmax Exporter. Camera FOV problem

Hi everyone,

I’m using the latest version of the 3dsmax exporter to export my scene to gltf.
My scene contains a physicalcamera and I believe the exported FOV may be wrong.

When my 3dsmax camera fov is set to 50

it saves the yfov as 0.6310226 when 50 degrees should be 0.872665 radians.

Am I missing something here?



Adding @Guillaume_Pelletier

Hi guy’s,

Max define an Horizontal FOV
Babylon use either Horizontal OR Vertical

code show us that the vertical FOV is calculated and returned instead of horizontal.

babylonCamera.fov = Tools.ConvertFov(maxCamera.GetFOV(0, Tools.Forever));

Getting the aspect ratio in account make the amount of radian smaller.

return (float)(2.0f * Math.Atan(Math.Tan(fov / 2.0f) / Loader.Core.ImageAspRatio));

Finally, your GLTF file is giving you a vertical FOV which is “yfov”. The Babylon js engine will rebuild the xfov according to the local aspect ratio.

  • pro : This choice is mainly due to let user choose the xfov and aspect ratio to address new wide screen. Remember that camera need/setup is quite different from DCC tools rendering and realtime viewer.

  • cons : Apparently, the aspect ratio is NOT saved into the GLTF and it’s break the first rule of the exporter “export as it”.

{ “aspectRatio”: xxxx,…}

which make the xfov likely not exactly the same as the one you defined.

It’s not clear for me if it’s intended or if the aspect ratio is just missing. If you’re experiencing rendering difficulties we may address this as new configuration feature for the next milestone.

Hope this help.

1 Like