This distortion is characterized as symmetric because it only models distortion as a function of distance from the centre of the image plane. The effect is characterized along the radial direction. Geometric effect of radial distortion applied to a point in our image plane coordinate frame. For each of these distortions, consider the base-case where there is no distortion:
In total, these are typically broken into the following categories:Įach of these is explored independently below. There are several distinct types of distortions that can occur due to the lens or imaging setup, each with unique profiles. What does lens distortion look like?īefore we get into the actual models themselves, it is good to first understand what lens distortion looks like. If you've already completed this post, head on over to Part II. Of course, our camera's lens is not a perfect pinhole and light rays will bend and distort due to the lens' shape, or due to refraction. One assumption behind our pinhole-projection model is that light travels in straight rays, and does not bend. Today, we want to explore another part of the camera modeling process: modeling lens distortions. There, we looked at some of the historical context behind how affinity in the image plane has been traditionally modeled, and why different models are preferable.
#UNITY CAMERA LENS DISTORTION HOW TO#
See the next section for how to set that up in the Editor.Previously, we covered some of the basics of camera modeling, and examined the pinhole projection model of a camera. These are not hard rules though!įor instance, in the example above, you’ll notice the use of a very local Post-Processing volume on to give the impression of looking through the lens of an old security camera. Effects like Depth of Field, Lens Distortion, Chromatic Aberration and other effects simulating the physical properties of the camera are good to live on the Virtual Cameras. In general, effects like AmbientOcclusion, Colour Grading, Grain, and other style effects are usually part of the first group, since you want to keep your style consistent through your game or film.
To do so, you just need to assign a transform to the “World Up Override” property on the Cinemachine Brain. But, maybe you want your camera to look at this plane from an angle, therefore your camera plane is a bit tilted, like in the image below:
For instance, maybe you’re working on a game that uses 2D physics so you’re forced to use the XY plane for your gameplay. However, sometimes it’s necessary to force this “World Up” axis and the corresponding plane to something else. In the case of 2D Cameras (Cameras marked as Orthographic), Cinemachine behaves differently and constraints the camera movements on the ground plane, which is going to be the plane made up of the two remaining axes, in this case, X and Z. By using that as a reference, it knows which camera movement not to perform, for instance looking straight up or straight down at a target (real cameras don’t do that!). Cinemachine operates on the assumption that there is a “World Up” axis, which by default is the Y up.