Request to the devs for a change to the 3d engine
Posted: Wed May 17, 2006 8:28 pm
This is a relatively small change that I'm asking for, but it will have a very useful effect on the game.
I'll start by noting that I'm an Open GL guru, so I'll describe this in Open GL terms. I'm certain that Direct X does much the same things, just using different function calls.
That said, the change is in the heart of the 3D engine, in particular the call that specifies the frustum that will ultimately map to the screen. In Open GL, the call that does this is glFrustum.
See http://www.mevis.de/opengl/glFrustum.html for details of this guy.
Using that call to explain what's going on, to get thing to look "correct", (right - left) / (top - bottom) must have the same ratio as the width / height of the viewport. In Direct X terms, that would be the dimensions of the final surface you render to.
I believe that the Direct X call you're making to specify the frustum has a hard coded ratio of 4 /3 to make it look correct in 1024*768, 1200*960, etc. This means that if you run fullscreen on a widescreen display, things look short and fat. If you can change that call to match the width / height ratio of the display surface, it should make things look right no matter what the size of the display surface is.
-- Edit --
Doing a little more digging, there appears to be a call PerspectiveFovLH(float FOV, float aspect, float near, float far); that does the same job as glFrustum();. What I'm talking about is the second parameter to this guy. That's the one that I believe is a constant (4.0f / 3.0f) and which needs to be changed to the aspect ratio of the display surface.
Any chance you can take a look at this?
Thanks.
I'll start by noting that I'm an Open GL guru, so I'll describe this in Open GL terms. I'm certain that Direct X does much the same things, just using different function calls.
That said, the change is in the heart of the 3D engine, in particular the call that specifies the frustum that will ultimately map to the screen. In Open GL, the call that does this is glFrustum.
See http://www.mevis.de/opengl/glFrustum.html for details of this guy.
Using that call to explain what's going on, to get thing to look "correct", (right - left) / (top - bottom) must have the same ratio as the width / height of the viewport. In Direct X terms, that would be the dimensions of the final surface you render to.
I believe that the Direct X call you're making to specify the frustum has a hard coded ratio of 4 /3 to make it look correct in 1024*768, 1200*960, etc. This means that if you run fullscreen on a widescreen display, things look short and fat. If you can change that call to match the width / height ratio of the display surface, it should make things look right no matter what the size of the display surface is.
-- Edit --
Doing a little more digging, there appears to be a call PerspectiveFovLH(float FOV, float aspect, float near, float far); that does the same job as glFrustum();. What I'm talking about is the second parameter to this guy. That's the one that I believe is a constant (4.0f / 3.0f) and which needs to be changed to the aspect ratio of the display surface.
Any chance you can take a look at this?
Thanks.