Skip to main content
GameDev.net gamedev.net
🔒 Locked

How to fix "sceen edge distortion" or "fisheye"

Started by deEnumerator Aug 18, 2007 at 11:07 PM 11 replies 13.1k views
Original Post
deEnumerator
deEnumerator
Im referring to the stretching of the scene as it gets farther away from the center of the viewpoint. On widescreen monitors, this effect is quite a bit more noticable, especially when a user bump their FOV, but even 4:3 monitors have some of thier field of view cut off as the sceen is stretched. What causes this, is it hard coded into chipsets, or a product of engines? ..and my main question: Couldn't a "simple" geometry algorithm counteract this affect? heres an example with pictures, notice the crates next to the NPC in Doom 3...and thats just a 4:3 ratio, it gets much worse as the FOV gets wider. This thread is refering to 3 monitor "triplehead" gaming. http://www.widescreengamingforum.com/forum/viewtopic.php?t=8418
Disclaimer: C++ and programming newbie
Sneftel
Sneftel
What you're referring to isn't fisheye. Fisheye distortion isn't possible with a scanline renderer unless you go (far) out of your way to cause it. What you're noticing is merely an incorrect FOV setting. Now, many FPSes use incorrect FOV settings in order to increase the amount of visual information available to the player. In this situation, therefore, you can't really "correct" the distortion without removing that information. If you don't mind not being able to see very much, on the other hand, it's trivial to correct; just set the FOV to atan(monitor_width/2, distance_from_screen)*2.
joanusdmentia
joanusdmentia
As an aside, the reason this happens is that everything that is equidistant from the eye lies on a sphere. In games though (and any other software that views a 3D world) you're projecting an image from the surface of that sphere onto a rectangle. You can draw it in 2D with pen and paper by drawing an arc with a line inside it, the edges of the line are closer to the arc than at the middle of the line so the objects there appear larger.

          ..........     ....            ....  ..                      ...     ------------------     .


Dodgy ASCII art. Think of this in 3D, so you've got a surface on a sphere and a rectangle on a plane. Near the edges of the line, the nearest point on the arc is closer than at the middle of the line. So if you really want to fix this, invent a curved monitor [smile]

EDIT: Like this one!
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o
Anthony Serrano
Anthony Serrano
As Sneftel said, it's an inevitable result of the field-of-view chosen, exaggerated by the mismatch between the displayed FoV and the area taken up by the monitor in the viewer's FoV. (At common playing distances, the monitor takes up only about 20-45 degrees of the veiwer's FoV.)

Wide FoVs exaggerate the effects of perspective, which results in noticeable shape distortions, especially towards the edge of the frame. Conversely, narrow FoVs tend to flatten persepective.

Ean
Ean
Quote:
Original post by joanusdmentia
As an aside, the reason this happens is that everything that is equidistant from the eye lies on a sphere. In games though (and any other software that views a 3D world) you're projecting an image from the surface of that sphere onto a rectangle. You can draw it in 2D with pen and paper by drawing an arc with a line inside it, the edges of the line are closer to the arc than at the middle of the line so the objects there appear larger.

          ..........     ....            ....  ..                      ...     ------------------     .


Dodgy ASCII art. Think of this in 3D, so you've got a surface on a sphere and a rectangle on a plane. Near the edges of the line, the nearest point on the arc is closer than at the middle of the line. So if you really want to fix this, invent a curved monitor [smile]

EDIT: Like this one!


omg that is so cool, I want that computer! :)
deEnumerator
deEnumerator
Thanks for the explanations (and brain exercise :D), that was very interesting and helpful. So what could at least theoretically be done, is that the world currently occupying the viewing frustum or desired fov could be warped before its rendered? Like "artificially" increasing the arc of the world with an algorithm an amount dependent on the chosen fov and the user's configuration. I'm guessing this would cause you to lose some of the information though, but seems like it might have an overall positive affect.

What i like to do is view my monitor up close, raise the fov and hopefully be immersed quite a bit more. Its not working with Doom 3 though, i'm too dang tense the whole time and instinctively back up to see more of the scene when hell breaks loose, as it does about every 15 seconds... :D
Disclaimer: C++ and programming newbie
JohnBolton
JohnBolton
As others have said before, the distortion is caused by setting the FOV of the view to a wider value than the actual FOV of the window itself.

I sit about 24 inches from my monitor. It has a width of about 13 inches, so the horizontal FOV is about 30 degrees. A game with a horizontal FOV of 90 degrees (typical) displayed in that 30 degree FOV window is going to look distorted. On the other hand, if I put my eyes 6.5 inches from the screen, the screen's FOV will be 90 degrees and will match the game. The view will not look distorted (but I will quickly go blind).

One solution would be for the software to somehow determine the distance between the viewer and the screen and automatically adjust the FOV.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
deEnumerator
deEnumerator
I think im slowly grasping it...
Disclaimer: C++ and programming newbie
PfhorSlayer
PfhorSlayer
Another way to think about it. Pretend you're actually inside the game world, standing right there. now take a piece of glass that is the exact size of your monitor, and place it where your monitor would be. If you had the proper FOV set up in your game when you were sitting in front of your monitor, what you could see through that piece of glass would be exactly what you would be able to see on your monitor.

As you can see, that really isn't very information much at all! Hence, the FOV is increased so that you see enough of the world that you can actually play the game and enjoy and see (or in the case of Doom 3, not see) it! :)
iMalc
iMalc
I've seen some games that normally use 60 dergees. These are perhaps designed with the distance you usually sit back from the monitor in mind. However, the problem is, they just aren't as nice to play as you can't see as much of the scene, and you feel like you're going to bump into everything cause you have to let things get so close.

In fact I play UT2004 at 100degrees viewing angle on my widescreen monitor, cause I'm naughty and sit too close.

As long as you sit the right distance away, and always look straight ahead it will look correct.
deEnumerator
deEnumerator
Excellent description fhorSlayer, thanks everyone. Good to confirm im getting the correct sense of fov if i sit closer to the monitor. I will confess that i have a 30" monitor *dodges tomatoes* and i can crank up the fov quite a bit. I always liked the "theory" that if you sit close enough to your monitor, you have yourself your own IMAX theater.
Disclaimer: C++ and programming newbie
joanusdmentia
joanusdmentia
Quote:
Original post by deEnumerator
I always liked the "theory" that if you sit close enough to your monitor, you have yourself your own IMAX theater.


That, and go blind [rolleyes]
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The nly verdict is vengeance; a vendett o
deEnumerator
deEnumerator
Maybe nearsighted, but i'd have to see proof on the blindness. I work in the sun all day long as a house painter, and the sun is my fov when having to look upward while painting something, now that actually hurts for a day or so.
Disclaimer: C++ and programming newbie

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.