Eyeglass effect

F69b3a361c26467022ed3c31589d2bfa
0
gardon 101 Oct 05, 2007 at 00:29

When in First Person Camera mode, if I look at the edges of the screen while moving the camera around, the world seems to stretch. It’s only with a 2-inch border around the screen, and it makes me rather dizzy.

Just seeing if anyone else experiences this, or knows how to get rid of it. Maybe it’s my math? I don’t think so, as I got my knowledge through a proven, successful book/course.

But it’s like the edges are magnified. Very annoying.

10 Replies

Please log in or register to post a reply.

F15213bd1bee350b83c3a2e5f9748b13
0
flux00 101 Oct 05, 2007 at 02:28

Perhaps your viewing plane is too close? I think I got what you’re describing, but fixed it just by changing the parameters, what matrix are you using for perspective distortion?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Oct 05, 2007 at 04:09

Basically, it’s just caused by using too wide a field of view. Turn the FOV up to something huge like 120 degrees and you’ll see the effect is magnified.

Unfortunately it’s not really something that can be avoided if you want to actually be able to see a fair amount of the world.

F69b3a361c26467022ed3c31589d2bfa
0
gardon 101 Oct 05, 2007 at 04:33

I use the standard 1.0f for the near plane. I’ve been changing that, but don’t really notice a different at all. 1, to 1000, to -10 doesn’t make a bit of difference. Pretty weird.

But yes, the FOV was, I think, the main cause. 60 degrees seemed to be the best, even though I’m still not satisfied. I tried 45, but that was like looking through a scope (like in Halo, how it zooms in).

How do games do it then? I’ve never noticed this before. Maybe when you have a crosshair and aren’t paying attention to the sides you don’t notice it. Currently I’m just looking around, but it still shouldn’t be this bad.

What I’m concerned about is making a spaceship type game. Warping the sides would suck.

I’ll keep trying it and see what I can do to fix it.

6aa952514ff4e5439df1e9e6d337b864
0
roel 101 Oct 05, 2007 at 10:43

45° shouldn’t look bad. What API are you using? And how do you set up your view & proj matrices?

F69b3a361c26467022ed3c31589d2bfa
0
gardon 101 Oct 05, 2007 at 12:51

View and proj matrices are held in my Camera class. The view is updated relative to the camera, by extracting its look, up, and right vectors. The Proj matrix is set up using the D3DXMatrixPerspectiveFovLH() function. Near plane is 1.0f, far plane is 1000.0f, the whole thing basically just a default setting.

Maybe it looked zoomed in because I’m used to having it wider. You go from being used to the normal FOV in walking around, to a narrower FOV instantaneously. It did look like I was zooming in with a scope, lol.

But I think I’m just not used to it. I’ll keep messing around and try to get something that works. But I guess it’s only the camera, and that’s always fixable/tweakable, so I can worry about that later.

-Gardon

6aa952514ff4e5439df1e9e6d337b864
0
roel 101 Oct 05, 2007 at 14:16

I see, things sounds good. One other thing that might cause weird results: does the aspect ratio match your screen ratio?

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Oct 05, 2007 at 14:26

@gardon

I use the standard 1.0f for the near plane. I’ve been changing that, but don’t really notice a different at all. 1, to 1000, to -10 doesn’t make a bit of difference.

Of course not, that doesn’t change the projection, only the near clipping (and distribution of z values in the z buffer).

It’s a completely natural phenomenon, (video)camera’s with wide view lensens experience the same effect. What you do by changing the fov is basically crop the image around the center, and enlarge that across the screen. So a smaller fov reduces the effect, as you move the areas that show the effect outside of the screen

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Oct 05, 2007 at 22:52

@gardon

How do games do it then? I’ve never noticed this before. Maybe when you have a crosshair and aren’t paying attention to the sides you don’t notice it. Currently I’m just looking around, but it still shouldn’t be this bad.

All FPS games have this problem. Of course it varies depending on the FOV that the individual game uses. How noticeable it is may also vary depending on other factors. In other types of games you may not notice it so much (although all perspective projection based cameras have the same effect).

F69b3a361c26467022ed3c31589d2bfa
0
gardon 101 Oct 06, 2007 at 03:51

I played some Counter Strike tonight, specifically looking for the eyglass effect. It was there… amazing. I never noticed it before, probably because there are so many things happening at once and you don’t take the time to notice things like that.

So I’ll narrow my POV to 60ish and keep working.

46407cc1bdfbd2db4f6e8876d74f990a
0
Kenneth_Gorking 101 Oct 06, 2007 at 10:48

Another thing that is affected by this is fog. In a game like Americas Army, where alot of the levels have some dense fog, it is a common ‘trick’ to scout around by viewing with the side of the screen, because it allows you to look a great deal further and get the drop on the enemy. If they just used radial fog, this wouldn’t be an issue…