Inferno Creative Studio

Chapter summaries · The Complete Guide to Photorealism

10: Lens and Camera Characteristics

Reading guide to Chapter 10. The defects that make an image look real.

Reading: Eran Dinur, The Complete Guide to Photorealism for Visual Effects, Visualization and Games (Focal Press, 2022), Chapter 10, pages 98-111. This page is a guide to that chapter, not a substitute for it.

The argument

Chapter 1 established that photorealism means looking photographic. This chapter is the inventory of what makes an image look photographic - and the answer is almost entirely defects.

Dinur notes that "lens effects" is a misnomer. Lenses are not 100% perfect, and it is exactly those imperfections that impart the natural inconsistency otherwise sterile digital creations lack. The imperfections are generally called aberrations, and they split two ways:

  • Monochromatic aberrations - all wavelengths affected equally.
  • Chromatic aberrations - different wavelengths affected independently.

Flares and blooms are light scattered by the glass elements in the lens. Grain and digital noise are not lens phenomena at all - they belong to the recording medium, film or sensor.

↑ Contents

Defocus

The most significant aberration, because it is a storytelling device as much as an optical one. It is also, Dinur says, one of the most crucial aspects of photorealism and of successfully integrating 3D and 2D elements - like atmospheric depth, defocus gives the viewer vital spatial clues, and it establishes the sense of an optical medium sitting between the environment and the viewer. Even a subtle sense of depth of field can lift a CG render, and precise matching of defocus is critical in compositing.

Depth of field

Every lens has one distance at which a point of light is captured at maximum sharpness: the focal plane. Fixed-focus lenses, as in webcams and surveillance cameras, cannot move it. Almost all photographic and cinematographic lenses can, by changing the distance between lens and sensor - racking focus.

Depth of field (DOF) is the width of the zone on both sides of the focal plane where the image is still sharp. Three variables affect it:

  • Aperture width. Smaller apertures - higher f-stop numbers - give deeper DOF. A pinhole camera is effectively an extremely small aperture, f/100 or higher, producing almost infinite DOF, but it lets in too little light to be practical. Even common small apertures like f/8-f/11 give a decently wide DOF focused at infinity, which is why landscape photography lives there. Wide apertures from f/5 downward give increasingly shallow DOF, and f/1.8 and f/1.4 lenses are popular for portraits and product shots because of how completely they throw everything else out of focus.
  • Focus distance. The further the focal plane is from the camera, the wider the DOF. Focusing on something close to the lens produces a noticeably shallower depth of field - the defining characteristic of macro photography.
  • Focal length. Long lenses do have shallower DOF than wide ones, but much less than it appears.

The scale connection - worth knowing

Our intuitive sense of scale is tied to depth of field. We instinctively associate narrow DOF with small scale, so a building feels like a dollhouse and a landscape like a miniature if the DOF is narrow and the focal plane distant. For exactly the same reason, miniature models meant to read as full size are filmed at the narrowest aperture available, to maximize depth of field - a narrow DOF would instantly give away the cheat.

This is also why tilt-shift photographs of real cities look like toy sets.

Why long lenses seem to have shallower DOF

Most of the apparent difference comes from the way longer lenses compress perspective and depth. Objects at a given distance may have a similar amount of defocus with a wide or a long lens, but with the long lens they appear much closer to the focal plane and their defocused detail appears much bigger. That creates the illusion that defocus is happening over a shorter distance.

The same compression affects the appearance of atmospheric depth: objects seem much closer than the amount of atmospheric hazing suggests.

Bokeh

Defocus blur is characteristically different from other blurring. A Gaussian blur turns sharp points into soft-edged circles and averages areas of sharp contrast into a smooth mush. Lens defocus blurs points into circular shapes with distinctly defined edges. As defocus increases those shapes grow larger but keep their edge sharpness, and areas of contrast are preserved even at high defocus.

Bokeh - from the Japanese boke-aji, blur-quality - describes the character of that defocus. The shape of a defocused point is not necessarily a circle; it follows the physical aperture mechanism of the iris. Simpler lenses use five or six straight blades, so their bokeh looks pentagonal or hexagonal. More expensive lenses use nine or more, usually curved, producing clean circular bokeh. Anamorphic lenses have an oval aperture, so their bokeh is oval - a circle squeezed horizontally - which is why an anamorphic rack focus has such a noticeable vertical squeeze and stretch.

Two further characteristics: lens defocus does not grow infinitely with distance - the bokeh shape increases from the DOF boundary up to a maximum and then stays there. And highlights bloom: unlike Gaussian or quadratic functions, which average colors, the bokeh of most lenses keeps highlights relatively bright and larger in relation to the rest of the defocused image.

↑ Contents

Lens distortion

First, a distinction Dinur is careful about. The amplified skew or cornerstone effect on parallel lines - the converging verticals of a tilted-down wide lens - is the way wide lenses exaggerate perspective, and it is not lens distortion. Lens distortion is when straight lines are bent into curves.

It is more typical of wide and zoom lenses and varies substantially between models. It is a monochromatic aberration, affecting all wavelengths equally, and it is the only aberration that can be relatively easily undone, because nothing degrades - pixels are simply displaced in 2D space.

Undistorting footage is a crucial step in VFX, because it allows accurate camera tracking and integration. But the original distortion is normally reapplied at the end, and there is usually no attempt to "fix" it - photographers and cinematographers treat lens distortion as part of the photographic language rather than a defect. It is not part of CG rendering and has to be applied as a 2D effect in comp, which is why game engines like Unreal and Unity now offer it.

Two forms: barrel distortion bends lines outward, pincushion distortion bends them inward, and some lenses produce a mix. The amount and shape vary with lens and focal range but are normally stronger toward the frame edges than at the center. The effect is not depth-dependent, and it is most noticeable on things containing straight lines - buildings above all.

↑ Contents

Chromatic aberration

Every lens acts as a prism to some degree, shifting and separating wavelengths. Manufacturers work to minimize it, and even high-end lenses show some; heavy chromatic aberration is typical of low-quality glass.

The cause is that the refractive index of the lens is not equal for all wavelengths. Different wavelengths slow and bend at slightly different rates, so they hit the sensor at slightly offset positions, visibly separating color components.

  • Longitudinal (axial) aberration - wavelengths do not converge at the same distance along the Z axis, so the focal plane shifts slightly per wavelength. It shows as purple or green fringing along edges and high-contrast boundaries, anywhere in the frame, and is typically more noticeable in areas that are out of focus. The fringe color differs depending on whether the area is in front of or behind the focal plane, usually shifting from purple to green.
  • Lateral (transverse) aberration - all wavelengths focus on the same plane at the same distance, but not at exactly the same point along it. Also appears as color fringes on high-contrast boundaries, but it never happens at the center of frame and grows stronger toward the edges.

Photographers minimize it with better glass, stopping down or post-processing. Digital artists can and should do the opposite: add a small amount deliberately. Usually subtle, unless the goal is to mimic a bad lens, it breaks up the sterile look of a CG render and adds a certain warmth. When compositing into footage, of course, the artist has to match whatever chromatic aberration is already in the plate.

↑ Contents

Lens flares

Dinur is careful with this one - the tacky wedding-video flare is long out of fashion, and even J.J. Abrams has admitted to overusing them. But used judiciously they add real photorealism, and beyond emulating lens behavior and adding warmth and grit, they help bind separate elements into a cohesive environment.

They are not exclusive to glass. Your eyes flare too. Bring a phone flashlight into your field of view and you can feel the haze as light scatters in your cornea and lens. Wearing glasses adds a second layer, and driving toward a setting sun gives you three - windshield, glasses, cornea.

Inside a camera lens, at the simplest level, scattered light causes a hazy lifting of the blacks. Beyond that, light scattering several times through the various glass elements of an assembly produces the familiar chains of stars, circles, polygons and arcs. Zoom lenses have more elements than primes, so they generally produce more complex flares.

Simple glow

Scattering in the glass produces a glow around the light. Near the center of frame it forms a circular halo. When light enters from the side, the steeper incident angle produces wider, more pronounced scattering that fans out from the light - which is why a strong source can create a noticeable glow even when out of frame. Lens hoods, flags and a hand are the standard defences.

The critical behavior: a flare glow lifts the blacks and lower midtones and reduces contrast, but like fog it does not brighten the highlights. A subtle flare adds a slight haze gradient; a strong one can obliterate the frame.

Diffraction spikes

Squint at a flashlight and lines appear radiating from it - caused by your eyelashes. The lens equivalent happens when the aperture is not fully round. Because the aperture structure is much simpler than eyelashes, the result is a distinct star, with the number of spikes matching or doubling the number of aperture blades - a six-blade aperture gives 12 spikes. Spike length can be uniform, but often some are longer.

This starburst or glint is well defined when the light faces the lens directly, and becomes more chaotic and less defined when the light hits at an angle.

Additional flare elements

Light entering a lens is scattered by the outer glass and again by each internal element, generating a whole sequence of glows, spikes, circles, arcs, lines and polygons - the polygons usually matching the aperture shape and blade count.

When light hits the assembly at a relatively straight angle, the elements overlap and are hard to pick out. When it hits from the side, the components spread along the direction of the light, from the origin position to the opposite side of the frame - the classic elongated flare chain. Which components appear, and in what order, depends on lens model, angle, source type, dirt on the glass and wear in the optics: effectively infinite variation.

But the movement follows one simple principle worth memorising: the elements align along a straight line that starts at the light source and pivots at the center of the frame. Move the light from top right to bottom left and the whole chain rotates, with the far end traveling from bottom left to top right. Brightness and visibility of the components vary with the intensity of the light and its position relative to the lens.

Dirt and imperfections

Often overlooked by artists chasing realistic flares. The tiniest speck of dust or dirt becomes substantially more noticeable when light hits from the side. No lens is absolutely clean or perfectly smooth. Those imperfections change the look of the flare and contribute their own components - small circles and streaks that add complexity and irregularity. Flare components are rarely consistent and change shape with the smallest movement, angle variation or fluctuation in the light.

Anamorphic flares

The oval aperture plus horizontally stretched footage makes these instantly recognisable: substantially wider on the horizontal axis, typically with one or two prominent blue diffraction spikes across the frame. Dramatic, effective, and by now somewhat a cliché.

Dinur's rule: use them when compositing into anamorphic footage, avoid them with spherical footage or where the CG context does not call for it. Adding anamorphic flares to an architectural render is a poor choice, because such a render would be unlikely to be shot on an anamorphic lens in the first place. The effect is best used only where it belongs.

Lens bloom

The definition is fluid and some people use it interchangeably with flare. Most commonly it means a lens glow around bright highlights rather than actual light sources. Highly specular surfaces reflect light sources at high intensity, so those areas can scatter in the lens and produce a noticeable glow or haze.

Since manufacturers work to minimize blooming, natural bloom is usually quite subtle and uniform, and rarely shows the complex flare elements associated with strong direct sources. Photographers often exaggerate highlight bloom deliberately for a soft, dreamy look, using filters like Glimmerglass or as a post effect.

↑ Contents

Motion blur

Vital to photorealism. A fast-moving object without motion blur does not just strobe, it looks extremely unnatural.

Dinur is honest that its importance varies by industry. Architectural and product renders rarely involve fast camera motion or fast-moving objects. In games it is available but not universally adopted, partly because of technical limits and partly because gamers tend to prefer visual clarity over optical realism. In VFX it is crucial.

Motion blur is not exclusive to cameras - it is part of our vision, and the amount we see depends on the speed of the object. But camera motion blur is affected by two additional parameters our vision does not have: shutter speed and frame rate. At the same object speed, a longer shutter produces longer blur, which is why sports photographers use wide apertures and fast shutter speeds to minimize it. Movies run at 24 fps; higher frame rates reduce or eliminate motion blur.

The result of removing it is instructive. Attempts to shoot entire films at high frame rate have had mixed responses - Ang Lee's Billy Lynn's Long Halftime Walk (2016), shot at 120 fps, was praised by some critics for unprecedented clarity and attacked by others as un-cinematic. As Vox's Emily VanDerWerff put it, at 120 fps things look a bit like higher definition video, or as many people put it, like a soap opera. A hundred years of cinema has marked our perception, and the reduced motion blur of high frame rates can feel unnatural.

The word "blur" is misleading. The effect is markedly different from Gaussian blur or defocus. Think of it as a trail connecting pixels between two adjacent frames. Unlike regular blur it does not fade off softly but often ends abruptly at a defined line. It smears detail, but the smearing is always directional, and contrasted features are clearly seen as streaks. Motion blur is more stretching than blurring.

Complex fast motion, like a shaky handheld camera, produces an equally complex pattern that is not easily emulated in 3D or 2D software.

↑ Contents

Grain

Film grain comes from small particles of silver halide reacting to photons. Digital noise comes from the sensor's reaction to low light and high ISO, and is generally less prominent than film grain. Dinur groups them as "grain" for simplicity.

Grain is the very final layer of photorealism in digital imagery. Because it happens uniformly over the entire image, it acts in compositing as a glue binding elements together. It adds a photographic feel to CG renders and is crucial for integrating CG with footage. Missing or mismatched grain, even when hard to detect on close inspection, can make a composite fall apart - especially once it is color corrected.

Appearance varies greatly between film stocks and camera models, but three characteristics hold for all types:

  • Grain covers the entire image uniformly, but its visibility depends on the underlying colors - more pronounced in darker areas, less visible in the brightest.
  • Grain is never equal across RGB channels. Digital sensors are more sensitive to green and red, as are the green and red layers in film, so the blue channel is usually considerably noisier.
  • Grain is random and changes on every single frame. It is never static.

↑ Contents

Terms from this chapter

  • Aberration - a lens imperfection. Monochromatic if all wavelengths are equally affected, chromatic if not.
  • Focal plane - the one distance at maximum sharpness. Racking focus moves it.
  • Depth of field (DOF) - the zone of acceptable sharpness around the focal plane.
  • Bokeh - the character of defocus, shaped by the aperture blades.
  • Barrel / pincushion distortion - straight lines bent outward / inward.
  • Longitudinal / lateral chromatic aberration - color fringing from wavelengths focusing at different depths / different points across the frame.
  • Diffraction spikes, starburst, glint - the star pattern produced by aperture blades.
  • Lens bloom - glow around bright highlights rather than around light sources.
  • Motion blur - a directional trail between adjacent frames. Stretching, not blurring.
  • Grain - film grain or digital noise. The final layer of photorealism.

↑ Contents

Check yourself

  • Why does Dinur say "lens effects" is a misnomer?
  • Name the three variables affecting depth of field, and say which way each one pushes.
  • Why are miniatures filmed at the narrowest aperture available?
  • How does defocus blur differ from a Gaussian blur, in two specific ways?
  • What decides the shape of bokeh?
  • What is the difference between perspective exaggeration and lens distortion?
  • Which chromatic aberration never appears at the center of frame?
  • What does a flare glow do to blacks, and what does it not do to highlights?
  • Which way does a flare chain pivot when the light source moves?
  • Which RGB channel is noisiest, and why?
  • Which of these effects belongs on a wall projection, and which are pictures of a camera that is not there?

↑ Contents