Thread: Tablets UI
View Single Post
Old 06-26-2003, 10:14 AM   #49
Talyns
The Tablets Guy
 
Talyns's Avatar
 
Join Date: Jul 2002
Server: Lanys
Posts: 520
Interface Author - Click to view interfaces
Default Viewport, Aspect Ratio, and resolution

Ok some info/thoughts about viewport / aspect ratio / resolution...

Aspect Ratio is: (Are you ready?)

Aspect Ratio is a measure of the relative width and height of the display.. Notice that your monitor screen is slightly rectagular (It is wider than it is tall). This creates a non-uniform display aspect that can make images longer or shorter in one of the axial directions.. Imagine the screen has a resolution of 100x100 pixels. That would mean that each pixel is a little wider that it is tall. Thus, if we were to draw a 10x10-pixel square, it would look like a rectangel! This is a side effect of aspect ratio. The standard computer monitor has an aspect ratio 4/3 or 1.33 times wider than it is tall. Hence, if square is to be square, the screen resolution can't be NxN. The resolution(*viewport*) must have the same aspect ratio as the screen..

For example, resolution of 640x400 has an aspect ratio of 8/5 or 1.6, which is slightly larger than the screens 4/3 or 1.33. This will have the effect of making squares tall. On the other hand, the resolution of 640x480 has an aspect ratio of 640/480 or 1.33, which is equal to the monitors aspect ratio, and thus squares will be squares! When writing 3d games it's important to use a video mode that has an aspect as close as possible to that of the screen.. This helps objects keep their proper dimensions when they are rotated; otherwise; as objects are transformed, they will get taller and wider, or vice versa..

All that was from the book Black Art of 3d Game Programming..
I was basing my 4/3 aspect ratio on that information...

(Still reading?)

So according to that:
If you wan't a truly non-distorted display,
You should use a resolution with the same aspect that your monitor has..

And I think the same is true for the viewport.. You should use a viewport with the same aspect ratio as your monitor..

--------------------------------------------------------------------

Eloora: The reason 1280x1024 (5/4)looks distorted to me and 1024x768(4/3) looks good is because I have a 17 in. monitor that has an aspect ratio of 4/3..

The reason 1280x1024 looks good to you and 1024x768 looks distorted is because you have a 19 in. monitor (most 19 in., I believe, have an aspect ratio of 5/4)..

-------------------------------------------------------------------
__________________
Talyns
Lanys Characters:
-Acarrion (51 BST)
-Hawkren (20 SHM)
Talyns is offline   Reply With Quote