- Home /
Camera FoV and Scene Geometry Distortion
So I have done some googling about this and even posted a forum thread but over the last few days I still haven't had any luck figuring this issue out. I'm getting some really severe geometric distortion around the edges of my Nexus7 16x9 tablet screen. Before I go any further here is a link to the forum post I made that has some more code pasted into it.
I think this might be due to the fact that I am adjusting the FoV in order to zoom the camera. Or alternatively it could be that I am messing with the FoV and then moving the cameras trasnform.position through the world. Below is an image of the kind of distortion I am talking about.
Based on some of the googling I have done people have said that this can happen when the camera zooms in so much that it loses focal perspective of some of the scene geometry. So I have clamped my zoomFoV between 40 at the lowest and 100 at the highest yet I still regularly see this issue. I've tried extending the ground terrain thinking that maybe the sharp corners of it are causing the camera to do this but that almost sounds crazy now that I type it.
Any help would be most appreciated since this kinda has me tearing my hair out!
are you changing the field of view in script or in the editor?
I am doing it via script. Here is the code that is changing the FoV. It's in a script attached to the main camera.
http://pastebin.com/C$$anonymous$$nHrBVr
^ code inside
it seems right but just to test try setting Camera.main.fieldOfView = newFOV; to Cam.fieldOfView = newFOV;
and make a new camera variable called Cam so: var Cam : Camera;
oops :P just remembered C# right so: public Camera Cam;
Yeah that doesn't seem to make any difference. I am starting to think the issue isn't actually with the code by rather something else in my scene or how the camera is aligned to the scene itself after adjusting the FoV.
Pretty frustrating issue. I see people complaining about camera distortion but i have no come across a good information source about how to fix or avoid the issue.
Answer by ScroodgeM · Jul 27, 2012 at 11:54 AM
solution 1
use z-distance instead of FOV for zooming if you want to avoid distortion at great FOV anglessolution 2
http://docs.unity3d.com/Documentation/Components/script-Fisheye.htmlExactly, the fov is pretty nice to zoom in, but not to zoom out. This is the normal behaviour. It's the field of view, if you have 180 it would map almost a sphere onto your rectangular screen.. In Quake 3 / live all are happy with a fov of 130 ;) At least that's how i play.
Your answer
Follow this Question
Related Questions
I need no perspective distortion for some part of screen 0 Answers
Perspective distortion makes objects on the edges of the screen "nearer" 0 Answers
Is it possible to show only a part of what camera sees 1 Answer
Zoom camera to correct FoV based on Rect size 1 Answer
Unity3d or Maya-style Camera navigation 5 Answers