PDA

View Full Version : 5:4 aspect ratio and 3D games


thomase
01-Mar-2006, 21:41
The native resolution of most (if not all) 19" LCD panels is 1280x1024, which has a 5:4 aspect ratio rather than 4:3.

Recently, I have come across some games which have explicit settings for 16:9 or 16:10 aspect ratio in addition to 4:3 (the assumed default). Even though these games have a setting for 1280x1024 resolution, they do not have an analogous 5:4 aspect ratio setting. Up to now, I would have expected any game to automatically "fix" the aspect ratio when rendering in a non 4:3 format, but the presence of aspect ratio settings suggests otherwise, namely that when rendering at 1280x1024, the result will be a slightly stretched image.

I have already confirmed that this is the case for 2D drawn elements. In Doom 3, when run in a 5:4 resolution on a 5:4 screen (such as 1280x1024 on an LCD), the aspect ratio of 2D drawn elements is "stretched" (i.e. the crosshair circle is drawn as a vertically stretched elipse). It's difficult to notice without measuring, but the stretching is definitely there.

What I wonder is, in the absence of an explicit 5:4 mode, will the 3D view be "stretched" in a similar way? If so, why do games not address this issue?

kyleb
01-Mar-2006, 21:54
Most games I have checked do give you a little more 3d view on the top and bottom with 1280x1024. Fear goes the opposite route and crops the view down a bit instead but keeps the aspect ratio proper for the 3d rendering. I can't say I've seen any games that mess up the aspect ratio for 1280x1024 with anything but 2d HUD stuff, and most games stretch the HUD for widescreen resolutions as well.

Chalnoth
01-Mar-2006, 22:08
See, the bad thing is that most CRT's support 1280x1024 res by default instead of 1280x960. And since the aspect ratio on these CRT's is clearly 4:3, using a 4:3 assumed aspect ratio at 1280x1024 gives the expected result for CRT's.

Since CRT's were the primary gaming display for many years before LCD's, it's no wonder that game developers haven't paid all that much attention.

thomase
01-Mar-2006, 22:36
Most games I have checked do give you a little more 3d view on the top and bottom with 1280x1024. Fear goes the opposite route and crops the view down a bit instead but keeps the aspect ratio proper for the 3d rendering. I can't say I've seen any games that mess up the aspect ratio for 1280x1024 with anything but 2d HUD stuff, and most games stretch the HUD for widescreen resolutions as well.

Not sure what you mean here regarding Fear. Do you mean that it crops horizontally when using a 5:4 resolution (i.e. a little less 3D view on the left and right)?

If what you say is true, that suggests that games will "figure out" the proper aspect ratio for the 3D view based on the resolution. If it can do it for 5:4, then it should be able to do it for 16:9 and 16:10 as well. Why then do games such as Doom 3 and HL2 have an explicit aspect ratio setting? Is it possible that this aspect ratio setting only effects the 2D HUD stuff?

Also, what you are saying is kind of in direct conflict with what Chalnoth is saying:
See, the bad thing is that most CRT's support 1280x1024 res by default instead of 1280x960. And since the aspect ratio on these CRT's is clearly 4:3, using a 4:3 assumed aspect ratio at 1280x1024 gives the expected result for CRT's.

Since CRT's were the primary gaming display for many years before LCD's, it's no wonder that game developers haven't paid all that much attention.

Xmas
02-Mar-2006, 00:12
See, the bad thing is that most CRT's support 1280x1024 res by default instead of 1280x960. And since the aspect ratio on these CRT's is clearly 4:3, using a 4:3 assumed aspect ratio at 1280x1024 gives the expected result for CRT's.

Since CRT's were the primary gaming display for many years before LCD's, it's no wonder that game developers haven't paid all that much attention.
The bad thing is that many game developers assume though they could ask (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_88s3.asp)...

AlNets
02-Mar-2006, 01:56
And this is a pretty trivial thing to change in the engine...right?

Chalnoth
02-Mar-2006, 02:08
And this is a pretty trivial thing to change in the engine...right?
It can be. It somewhat depends upon how the projection transformation is done.

AlNets
02-Mar-2006, 02:47
ah... thanks for the reply.

And sorry for (more) noob questions :wink: , but how many different types of transformations are there? Advantages/disadvantages or is it down to preference? i.e. why haven't devs gone with one approach?

Chalnoth
02-Mar-2006, 03:43
Well, they basically all come down to the same thing, but there's different library function calls to do the same thing.

For example, if the developer hand-codes the generation of the projection matrix, then it may be nontrivial to change the aspect ratio (though it still could be done reasonably-quickly, the devs would need to go back and figure out how the hell the transformation was made in the first place, which, if the code wasn't written for readability, may take some time).

Or you could just use one of a number of built-in library functions to generate the projection matrix: using these changing the aspect ratio usually would be absolutely trivial.

Fodder
02-Mar-2006, 03:50
Why then do games such as Doom 3 and HL2 have an explicit aspect ratio setting?I was under the impression it was simply a user-friendly way of displaying resolution choices.

kyleb
02-Mar-2006, 05:35
Not sure what you mean here regarding Fear. Do you mean that it crops horizontally when using a 5:4 resolution (i.e. a little less 3D view on the left and right)?
If you pray for me to find the case for it i'll have the CD key to install it and I can post some pics. :)

But yeah, it crops offf a bit of the sides, and a bit off the top and the bottom as well, while keeping the aspect ratio proper so circles still look circluar for the 3d view anyway.

If what you say is true, that suggests that games will "figure out" the proper aspect ratio for the 3D view based on the resolution. If it can do it for 5:4, then it should be able to do it for 16:9 and 16:10 as well. Why then do games such as Doom 3 and HL2 have an explicit aspect ratio setting? Is it possible that this aspect ratio setting only effects the 2D HUD stuff?

Also, what you are saying is kind of in direct conflict with what Chalnoth is saying:
Yeah, I'm not sure what games he is referring too, but nearly every game I have checked this with all the way back to the orignal Half-Life gives a bit more to the top and bottom when running 1280x1024. That goes for Quake3 an UE2/+ games as well, and with widescreen resolutions like 1280x720 give you less view on the top and bottom until you adjust the FOV to compensate.

EasyRaider
02-Mar-2006, 11:38
I blame manufacturers of LCD panels. There was no need to introduce the 5:4 abomination when 4:3 has always been the standard. At the very least, gaming-oriented monitors should have been 4:3.