Sign in to follow this  
akira32

The same scene and FOV, the sizes are different in 3ds Max and DirectX

Recommended Posts

I have a scene in 3ds Max. There is a free camera with certain FOV (=0.8 deg) in the scene. I export the scene into a xfile by the Panda plugin and put the scene in DirectX application. The scene is used the same FOV (=0.8 deg) as 3ds Max. But the scene in 3ds Max is more bigger (means the FOV is smaller), even I use the same camera position and lookat. The FOVs in 3ds Max and DirectX are different? (In DirectX,the FOV is used in radian to calculate the projection matrix).The screen sizes in 3ds Max and DirectX are the same(1920x1080).

Share this post


Link to post
Share on other sites
it has to do with the aspect ratio of the viewport. If the FOV is in the vertical axis, you can strecth the window as much horizontally as you want, but veritcally it will show the same amount of the scene, how ever you will gain all this extra information on the horizontal axis. (and vise versa and every which way you want to filp flop that statement)

Test it out with the same size viewport and as long as they're both using the same FOV axis (horizontal or vertical) they will look the same.

Share this post


Link to post
Share on other sites
Yep, the camera in 3ds max uses the horizontal FOV by default. You can change the FOV axis in max and switch to the vertical, so what you will see in max is what you will get in DirecX. You will notice a small icon just near the FOV parameter of the camera: hold your mouse button over it and you'll be able to switch the axis. Bye!

Share this post


Link to post
Share on other sites
Thanks! I had solved my problem.

Fov_rh/Fov_lh=w/h=Aspect;
Fov_lh=Fov_rh/Aspect;

if (bCameraObject)
{
Interval valid = FOREVER;

CameraState cs;
CameraObject *cam = (CameraObject *)object_state.obj;
cam->EvalCameraState(time*outTime,valid,&cs);

s.x=cs.fov/aspect;

s.y=0.0f;
s.z=0.0f;
}

Share this post


Link to post
Share on other sites
Sorry for resurrecting this thread, i wonder what the variable s really means?
if it means aspect ratio, I get a stretched scene.
How do I switch axis of the FOV?
if W/H = 0.5, how do I get H/W = 2?
I can't find a function that will retrieve the width and height of the view Edited by lucky6969b

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this