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

Started by
3 comments, last by lucky6969b 11 years, 8 months ago
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).
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
Advertisement
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.
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!
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;
}
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
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

This topic is closed to new replies.

Advertisement