• Advertisement
Sign in to follow this  

D3DXMatrixOrthoLH vs 3D Studio Max

This topic is 2925 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to match the camera settings in DirectX with those in a 3D Studio Max scene. The camera in max has an FOV parameter, yet the function D3DXMatrixOrthoLH does not take an FOV as a parameter. I am using an orthographic camera in max, and when I change the FOV in max, it zooms the scene in/out. So how can I achieve the same zooming/FOV effect in DirectX? I am currently calling D3DXMatrixOrthoLH such as: D3DXMATRIXA16 matProj; D3DXMatrixOrthoLH( &matProj, 800.0f, 600.0f, 0.0f, 1000.0f ); g_direct3DDevice9->SetTransform( D3DTS_PROJECTION, &matProj ); ...where 800.0f is the width of the scene in pixels and 600.0f is the height. Then 0.0f and 1000.0f specify the near and far clipping planes. Changing the near/far planes does not perform any kind of zoom/FOV functionality, as expected. Why would it. And max always renders out at the same width and height in pixels no matter what the FOV changes to. So I assume I must leave the D3DXMatrixOrthoLH call alone, and perform scaling on my scene, perhaps in the view matrix, to match the FOV. But if that's correct, how can I scale the scene according to an FOV value? How is max doing it?

Share this post


Link to post
Share on other sites
Advertisement
Ortho cameras don't have FOV. As I see you really can set camera in 3dsmax to use ortho projection and even then change FOV. But how is it related to the camera behaviour, who knows.
Notice that even when you set the camera to ortho, it still looks like a perspective camera in the viewports - it still have the pyramid frustrum.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement