S PHERICAL A BERRATION (SA) Positive SA: occurs in an uncorrected - - PowerPoint PPT Presentation

s pherical a berration sa
SMART_READER_LITE
LIVE PREVIEW

S PHERICAL A BERRATION (SA) Positive SA: occurs in an uncorrected - - PowerPoint PPT Presentation

A R EALISTIC C AMERA M ODEL FOR R EAL - TIME R ENDERING OKKA KYAW R ESULTS Simulating a Zeiss Planar T* 1.4/50 M OTIVATION A camera metaphor makes using 3D graphics systems easier for users who are already familiar with cameras The


slide-1
SLIDE 1

A REALISTIC CAMERA MODEL FOR REAL-TIME RENDERING

OKKA KYAW

slide-2
SLIDE 2

RESULTS

Simulating a Zeiss Planar T* 1.4/50

slide-3
SLIDE 3

MOTIVATION

  • A camera metaphor makes using 3D graphics systems easier for

users who are already familiar with cameras

  • The principles behind 3D graphics are easier to explain when

related to real cameras

  • Can be used when merging computer-generated imagery with

recorded imagery (e.g. for augmented reality or special effects)

  • The computer-generated imagery needs to use a camera model

similar to that of the real camera

slide-4
SLIDE 4

GOAL

  • A realistic camera model for real-time computer graphics
  • Take in a set of parameters for the configuration of a real camera
  • Simulate defocus blur, motion blur, and third order lens aberrations

simultaneously

  • Apply lens and exposure equations from photographic optics in a

post-processing step to the output from a rasterizer

slide-5
SLIDE 5

PREVIOUS WORK

slide-6
SLIDE 6

RAYTRACING

  • Generate an image by tracing the path taken by light rays

interacting with a scene

  • Usually traced from the camera into the scene as it is more efficient
  • Simulating camera optics
  • Refract rays through the camera’s lens system first
  • Adds a small, constant amount to rendering time
slide-7
SLIDE 7

RAYTRACING

Kolb et al. (1995) Lee et al. (2010)

slide-8
SLIDE 8

RAYTRACING

  • If the refraction through the lenses is calculated accurately, all of

the expected aberrations will appear in the output

  • Raytracing is computationally expensive
  • A large number of samples are required to simulate defocus and

motion blur

slide-9
SLIDE 9

POST-PROCESSING

  • Take the output from a rasterizer, and modify it in a post-

processing step

  • Apply lens and optics equations to analytically determine the

parameters for the post-processed effects

slide-10
SLIDE 10

POST-PROCESSING

GPU Gems (2004) McGuire et al. (2012)

slide-11
SLIDE 11

POST-PROCESSING

  • Each effect has to be manually simulated, and the effects have to

be combined and applied in the right order

  • Significantly faster than raytracing
slide-12
SLIDE 12

APPROACH

  • Simulate each camera effect using post-processing
  • Take advantage of hardware acceleration by implementing the

effects as shaders

  • Uses DirectX and HLSL shaders, but the same approach could be

implemented in OpenGL with GLSL

slide-13
SLIDE 13

AGENDA

  • For each topic
  • Brief overview
  • Any implementation details
  • Images of what the output is supposed to look like
  • Images of the output from the renderer
slide-14
SLIDE 14

PHOTOGRAPHIC OPTICS

slide-15
SLIDE 15

LENSES

  • Most lenses are compound lenses, made up of several simple

lenses

  • The entire lens systems can be analyzed as a single entity
slide-16
SLIDE 16

FOCAL LENGTH

  • f = focal length
  • Distance from the lens to the

point where incoming collimated light (light whose rays are parallel) is focused

  • Describes how strongly the

lens system converges light

slide-17
SLIDE 17

FIELD OF VIEW

  • How much of the scene can

be imaged by the camera

  • Used to calculate the field of

view for the projection matrix

slide-18
SLIDE 18

FOCUSING A LENS

  • u = distance from lens to focal plane
  • v = distance from lens to image plane
  • When focused at infinity, v = f
  • When focused closer to the lens, v increases and field of view will

vary as a function of v instead of f

  • Affects defocus blur
slide-19
SLIDE 19

FOCUSING A LENS

50mm lens focused at infinity

slide-20
SLIDE 20

FOCUSING A LENS

50mm lens focused at 0.7 meters (aperture of f/22 to keep everything in focus)

slide-21
SLIDE 21

EXPOSURE CONTROL

  • Aperture
  • Controls how much light passes through the lens system
  • Measured as the ratio of a lens’ aperture diameter to its focal length
  • N = f-number
  • Shutter
  • Controls how long the film or sensor is exposed
slide-22
SLIDE 22

EXPOSURE CALCULATION

  • E = illuminance
  • L = incoming luminance
  • T = lens transmittance
  • N = f-number
slide-23
SLIDE 23

EXPOSURE CALCULATION

  • H = exposure
  • E = illuminance
  • t = exposure duration
slide-24
SLIDE 24

VIGNETTING

  • Reduction in image brightness as you move away from the

image center

  • Natural vignetting
  • Illuminance is affected by the angle at which light enters the lens
  • cos4 θ law of illumination
slide-25
SLIDE 25

NATURAL VIGNETTING

  • Provided by lens manufacturers as a plot of transmittance and
  • ff-axis distance
slide-26
SLIDE 26

NATURAL VIGNETTING

  • Use the transmittance graph to darken the output image
slide-27
SLIDE 27

FILM/SENSOR

  • Film has a non-linear response to light
  • Characteristic curve
  • Plot of film opacity and log exposure
slide-28
SLIDE 28

FILM GRAIN

  • More grain will be visible in film that is more sensitive in light
  • Digital sensors don’t have physical grains, but they can have

image noise

slide-29
SLIDE 29

FILM GRAIN

  • Simulated with random noise
slide-30
SLIDE 30

DEFOCUS BLUR AND MOTION BLUR

slide-31
SLIDE 31

DEFOCUS BLUR

  • An object point that is not in focus is imaged as a blur patch (a

circle of confusion)

slide-32
SLIDE 32

CIRCLE OF CONFUSION SIZE

  • C = diameter of circle of confusion
  • u = distance from lens to focal plane
  • v = distance from lens to image plane
  • S = distance from lens to defocused point
  • N = f-number
slide-33
SLIDE 33

BOKEH

  • The shape and quality of the defocused blur is known as bokeh
  • The bokeh shape is determined by the shape of the aperture
  • The distribution of light across the blur patch is affected by

spherical aberration

slide-34
SLIDE 34

HEXAGONAL BOKEH

slide-35
SLIDE 35

MOTION BLUR

  • Objects that are in motion for the duration of the exposure will

be blurred in the output image

  • Long exposure photography
  • Shutter can be left open for an extended period of time to capture

motion trails

  • Simulated by accumulating the output images into a render target,

applying an appropriate blend factor so that each frame is weighted correctly

slide-36
SLIDE 36

LONG EXPOSURE MOTION BLUR

slide-37
SLIDE 37

OPTICAL ABERRATIONS

IMPERFECTIONS IN THE WAY LENSES REFRACT LIGHT

slide-38
SLIDE 38

SPHERICAL ABERRATION (SA)

  • Positive SA: occurs in an uncorrected lens when the lens margins

focus rays closer to the lens than the lens center

  • Foreground blur patch will have a dark core surrounded by a bright

ring

  • Background blur patch will have a bright core fading out towards

the edges

  • When overcorrection is applied, the effect on foreground and

background blurs are swapped

slide-39
SLIDE 39

SPHERICAL ABERRATION

  • Simulated by modulating the bokeh with a texture representing

the light distribution

slide-40
SLIDE 40

BACKGROUND DEFOCUS

Zero SA Positive SA

slide-41
SLIDE 41

BACKGROUND DEFOCUS

Zero SA Negative SA

slide-42
SLIDE 42

ZERO SPHERICAL ABERRATION

slide-43
SLIDE 43

POSITIVE SPHERICAL ABERRATION

slide-44
SLIDE 44

NEGATIVE SPHERICAL ABERRATION

slide-45
SLIDE 45

ASTIGMATISM

  • Occurs when rays traveling along the plane containing the
  • ptical axis (tangential rays) focus at a different distance than

rays along the plane orthogonal to that (sagittal rays)

slide-46
SLIDE 46

ASTIGMATISM

  • Visualized on a wheel, either the rims or the spokes are in focus,

but not both at the same time

slide-47
SLIDE 47

ASTIGMATISM

  • Measured on a plot of focal offset from the image plane and off-

axis distance

slide-48
SLIDE 48

ASTIGMATISM

  • Simulated by applying the appropriate amount of radial blur

along the sagittal and tangential vectors

slide-49
SLIDE 49

DISTORTION

  • Occurs when image magnification changes as a function of off-

axis distance

  • Mainly causes straight lines to appear curved
slide-50
SLIDE 50

DISTORTION

  • Provided by lens manufacturers as a plot of transmittance and
  • ff-axis distance
slide-51
SLIDE 51

DISTORTION

  • Simulated by applying an offset along the radial vector when

sampling the source image for postprocessing

slide-52
SLIDE 52

ANALYSIS AND CONCLUSION

slide-53
SLIDE 53

PERFORMANCE

  • Intel Core i7-3635QM
  • 2.40 GHz (four cores)
  • Intel HD Graphics 4000
  • Approximately equivalent to a mid-range laptop graphics card
  • Worst case performance test
  • Defocus blur on the entire image, with astigmatic blur, distortion,

and vignetting applied

slide-54
SLIDE 54

PERFORMANCE

  • 1280x720
  • All effects except defocus blur: 60 frames per second
  • Worst case: 28 frames per second
  • 1920x1080
  • All effects except defocus blur: 30 frames per second
  • Worst case: 15 frames per second
slide-55
SLIDE 55

CONTRIBUTIONS

  • A condensed set of optics equations that are directly applicable

to virtual camera models

  • A parameter-based model for describing and reproducing third
  • rder lens aberrations
  • A flexible long-exposure model that allows the exposure to be

started and stopped arbitrarily while allowing for easy control

  • ver the final exposure
slide-56
SLIDE 56

FUTURE WORK

slide-57
SLIDE 57

UNIMPLEMENTED ABERRATIONS

  • Coma
  • Field curvature
slide-58
SLIDE 58

UNIMPLEMENTED ABERRATIONS

  • Chromatic (and spherochromatic) aberration
slide-59
SLIDE 59

OPTICAL VIGNETTING

  • Causes a cat’s eye effect on the defocus blur
slide-60
SLIDE 60

FURTHER READING

  • Sidney F. Ray. Applied Photographic Optics. Focal Press, 2002.
  • H. H. Nasse. Depth of Field and Bokeh. 2010. URL:

http://www.zeiss.com/C12567A8003B8B6F/EmbedTitelIntern/CLN _35_Bokeh_EN/$File/CLN35_Bokeh_en.pdf

slide-61
SLIDE 61

IMAGE SOURCES

  • http://en.wikipedia.org/
  • http://toothwalker.org/optics.html
  • Additional resources: See paper
slide-62
SLIDE 62

QUESTIONS?