SlideShare a Scribd company logo
1 of 68
Now Playing:
Still Alive
Jonathan Coulton
from Portal: The Game
Released October 9, 2007
Real Cameras and
Light Transport
Rick Skarbez, Instructor
COMP 575
October 23, 2007
Announcements
• Programming Assignment 2 (3D
graphics in OpenGL) is out
• Due THIS Thursday, October 25 by
11:59pm
• Programming Assignment 3
(Rasterization) is out
• Due NEXT Thursday, November 1 by
11:59pm
Last Time
• Finished our discussions of mapping
• Texture Mapping
• Bump Maps
• Displacement Maps
• Talked about programmable graphics hardware
• Discussed the class project
Today
• Further discussion of real lights and real
cameras
• Easing into ray-tracing
Recap of
Rasterization-Based
Rendering
• Very fast
• Computer games get 30+ frames per
second on commodity hardware
• Not very good (comparatively speaking)
• Need lots of hacks/workarounds to get
effects like shadows, global illumination,
reflection, etc.
Recap of
Rasterization-Based
Rendering
• Everything in the world is a colored
polygon
• Projects these polygons onto the
“screen” to generate the image seen by
the user
• All processed independently
• One polygon’s color doesn’t depend on
another’s
Hallmarks of
Rasterization
• Very high rendering speed
• Lots of parallelism
• Independence of
vertices/polygons/pixels
• Runs in “assembly line” fashion
• Not very realistic
• We have other options, though...
• Let’s revisit the rendering equation
The Rendering
Equation
• In short, the light out from a point in a
specific direction depends on:
• The light it emits in that direction
• The light incident on that point from every
direction, affected by
• How reflective the material is for that pair
of directions
• How close the incoming direction is to the
surface normal
Jim Kajiya, 1986
Movie Break!
Tin Toy
Pixar, 1988
Available online:
http://v.youku.com/v_show/id_ch00XMTE1OTIw.html
Lights, Cameras, and
Surfaces
• Remember way back at the beginning
of the semester we talked about these?
• Now we’re ready to talk about them again
• How are these connected in the real
world?
• Light!
• More precisely, photons
• Light sources emit photons
• Surfaces reflect & absorb photons
• Cameras measure photons
Lights, Cameras,
Surfaces
• The quanta of electromagnetic energy
• “Particles of light”
• Appear to be particles and waves
simultaneously
• We ignore wave behavior (i.e. diffraction)
• We simulate particle behavior
Photons
• We model photons as “rays” of light
• Rays in the mathematical sense
• Defined by a starting point and a
vector
Photons as Rays
• There are several kinds of lights (or
light sources)
• Light bulbs
• The sun
• Spot Lights
• Ceiling Lights
• These are different because they emit
photons differently
Lights
Lights
• We’ve already talked an awful lot about
lights
• There are several types:
• Point lights (i.e light bulbs)
• Directional lights (i.e. the Sun)
• Spot lights
• Area lights
• In the real world, just about EVERY light is
an area light
• Emit light evenly in all directions
• That is, photons (rays) from a point light all
originate from the same point, and have
directions evenly distributed over the sphere
Point Lights (i.e. Light
Bulbs)
• Point light sources at an infinite (or near
infinite) distance
• Can assume that all rays are parallel
Directional Lights (i.e.
the Sun)
Earth
• Point light sources at an infinite (or near
infinite) distance
• Can assume that all rays are parallel
Directional Lights (i.e.
the Sun)
• Similar to point lights, but intensity of
emitted light varies by direction
• Can think of it as
only emitting rays
over a patch on the
sphere
•
Spot Lights (i.e., well,
Spot Lights)
• Emits light in every direction from a
surface
• Can think of it as a set of point lights, or a
patch on which every point is a point light
Area Lights (i.e.
Ceiling Lights)
Surfaces
• We’ve talked a little bit about surfaces
• In terms of OpenGL lighting
• We’re not going to talk about them in a
lot more detail here
• Just remember that in OpenGL, surfaces
can’t be reflective/refractive
• In the real world, they can be
• Surface materials
can be:
• Dull
• Shiny
• Bumpy
• Smooth
• Transparent
• Translucent...
Surfaces
• So what do surfaces do?
• They selectively react to incoming photons
• Absorb
• Reflect
• Refract
• Fluoresce
• etc.
Surfaces
• Surfaces make up the “interesting”
things in a scene, but from a light
transport point of view, they are just
intermediaries
Surfaces
• Almost all cameras work in a similar
fashion
• Use a lens to map rays from the scene (i.e.
the world) onto an image plane
Cameras
Cameras
• Last time we talked about cameras, we
only considered “pinhole” cameras
• Where all light passes through a single point
• i.e. camera obscura
• These do exist in the real world
• But almost all real cameras have lenses
Camera Obscura
Scene
Pinhole
Image
Plane
Pinhole Projection
This is essentially what
we’ve seen in OpenGL
So why do we need
lenses?
• To gather more light
• In an ideal pinhole camera, exactly one ray
would reach each point in the image plane
• To focus the light
• In an ideal pinhole camera, this is not a
problem
• But in a real camera (even a pinhole one),
objects will appear unfocused
Pinhole Focus
Problems
Pinhole Size
Projection through a
Lens
Refraction
• Lenses refract light passing through
them
• That is, change the direction of rays
• Refraction is governed by Snell’s law:
• n1 sin( α1 ) = n2 sin( α2 )
• n is the index of refraction for a material
Paraxial (or First-
Order) Optics
• Assumes that angles are small (i.e. the
lens is small and/or any objects are far
away)
➡Can approximate sin( α1 ) with α1
• Assumes all lenses are spherical
• Assumes all lenses are symmetric
about their optical axes
Paraxial Optics
n1 sin  1 = n2 sin  2 n1  1  n2 2
• Scary-looking math slide
Snell’s Law Small AnglesParaxial Refraction
Thin Lenses
• Don’t need to know all the math from
the last slide
• Just showing it to you
• But we can use that to talk about actual
lenses
• Esp. thin lenses, where a ray can be
assumed to refract at one boundary, and
immediately refract again at the other
boundary
Thin Lenses
Depth-of-Field
• Real lenses have what is termed depth-
of-field
• The range over which objects in the scene
appear in focus
Depth-of-Field
Examples
Thick Lenses
• Lenses actually have some thickness
• We’re not going to do the math here
Compound Lenses
• In real cameras, there is usually not just
one lens, but a series of lenses
• The entire set is called a compound lens
• This is done to reduce aberrations
introduced by lenses
• We won’t discuss this further
Properties of
Cameras
• There are 2 primary characteristics of a
camera that affect how much light gets
to the film:
• Aperture
• How wide the lens is
• Shutter speed
• How long the film is exposed
• There are trade-offs between the two
Aperture Artifacts
• A wider aperture produces a narrower
depth-of-field
Narrower
Wider
Shutter Speed
Artifacts
• A slower shutter speed means the
shutter is open for more time
• This can result in motion blur
• Images are formed by lights, surfaces,
and cameras
• Lights emit rays
• Surfaces change rays
• Cameras capture rays
• Real cameras have lenses
• These introduce various effects to the final
image
Recap
Image Plane
• Real cameras have an image plane
behind the lens
• Film cameras project onto film
• Digital cameras project onto a chip
• CCD
• CMOS
• “Virtual cameras”, like in computer
graphics, can have the image plane in
front of the lens
Photographic Film
• Too much detail to cover here
• In short, film is covered with a chemical
that undergoes a reaction when hit with a
photon
• If you are interested, read some of these:
Charge-Coupled
Devices (CCDs)
• Have discrete detectors (photometric
sensors) at pixel (or subpixel) locations
• When you take a picture:
• Each pixel is pre-charged
• The shutter is opened
• Photons “knock off” electrons from the pixels
• The shutter is closed
• Pixels are read and stored
CCDs
photosensitive
storage
CMOS
• Same sensor elements as CCD
• But read-out is different
• Uses standard CMOS technology
• Won’t go into details
• Can find a bit more info online if you’re
interested
• http://www.image-designer.com/digital-
camera-ccd.html
Color in Digital
Cameras
• Each sensor only detects, essentially,
the number of electrons that hit it
• Generates a luminance (black & white)
image
• 2 ways to get color
• 3 separate sensor arrays
• 1 each for red, green, blue
• Bayer Pattern
Bayer Patterns
The process of reconstructing the “real” color at
each pixel is called demosaicing
Do you see a
problem with
this?
3 CCD Color
• Uses a beam-splitter to redirect
incoming light to each of 3 CCDs:
What’s better about this?
What’s worse?
Recap
• Real cameras also need a sensing
image plane
• Photographic film in traditional cameras
• CCD or CMOS chips in digital cameras
• Digital cameras need to do something
extra to get color images
• Multiple sensors
• Bayer patterns
A Model of the
Universe
A Model of the
Universe
Direct Illumination
• It is perfectly reasonable to try to
implement an algorithm based on the
model discussed so far
• However, it would be VERY inefficient
• Why?
• Many (probably most) light rays in a
scene would never hit the image
plane
A Problem?
A Problem?
Direct Illumination
• Instead of shooting rays from the light,
shoot rays from the camera
• Shoot one (or, realistically, many) rays
per pixel
• Can stop when you hit a light and/or a
non-reflective surface
• This is the basis of the ray tracing
algorithm
A Solution
A Solution
Ray Tracing
• for each pixel / subpixel
shoot a ray into the scene
find nearest object the ray intersects
if surface is (nonreflecting OR light)
color the pixel
else
calculate new ray direction
recurse
Ray-Tracing
Algorithm
• for each pixel / subpixel
shoot a ray into the scene
find nearest object the ray intersects
if surface is (nonreflecting OR light)
color the pixel
else
calculate new ray direction
recurse
Ray-Tracing
Algorithm
Ray Casting
1. Generate the rays that are seen by the
eye
• One (or more) for each pixel
• Need to determine ray origin /
directions
2. Figure out what (if anything) those rays
hit
• Compute the nearest intersection
• Ray-object intersections
3. Determine the color of the pixel
Ray-Tracing
Components
A Model of the
Universe
Indirect
Illumination
This is also commonly
referred
to as global illumination
With Global Illumination
Direct Illumination vs.
Global Illumination
Direct Illumination Only
• This week and next
• Casting Rays
• Weeks 12 & 13
• Ray Tracing
• Radiosity
• Week 14
• Photon Mapping
Class Schedule
• Week 15
• Special Topics (tentative)
• High Dynamic Range (HDR)
Rendering
• Image-Based Rendering
• Suggestions?
• Week 16
• Course / Final Exam Review
Class Schedule
Next Time
• Figuring out how to cast rays
• Turning the concepts from today into
concrete math
• Programming Assignment 2 is due
• 11:59pm Thursday

More Related Content

Similar to october23.ppt

Computer vision - light
Computer vision - lightComputer vision - light
Computer vision - lightWael Badawy
 
Seminar on 3D Technology
Seminar on 3D TechnologySeminar on 3D Technology
Seminar on 3D TechnologyRudhin Menon
 
Reflection-refraction.ppt
Reflection-refraction.pptReflection-refraction.ppt
Reflection-refraction.pptsimonckt1
 
2415_web_Lec_31_Light_I.ppt257777777777777777777777x
2415_web_Lec_31_Light_I.ppt257777777777777777777777x2415_web_Lec_31_Light_I.ppt257777777777777777777777x
2415_web_Lec_31_Light_I.ppt257777777777777777777777xvikknaguem
 
illuminationmodelsshading-200501081735 (1).pdf
illuminationmodelsshading-200501081735 (1).pdfilluminationmodelsshading-200501081735 (1).pdf
illuminationmodelsshading-200501081735 (1).pdfSayantanMajhi2
 
Lecture 1.new optics
Lecture 1.new opticsLecture 1.new optics
Lecture 1.new opticsnkwon123
 
Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationWolfgang Engel
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityUnity Technologies
 
Lec14 multiview stereo
Lec14 multiview stereoLec14 multiview stereo
Lec14 multiview stereoBaliThorat1
 

Similar to october23.ppt (20)

Computer vision - light
Computer vision - lightComputer vision - light
Computer vision - light
 
Shading
ShadingShading
Shading
 
november29.ppt
november29.pptnovember29.ppt
november29.ppt
 
august23.ppt
august23.pptaugust23.ppt
august23.ppt
 
Seminar on 3D Technology
Seminar on 3D TechnologySeminar on 3D Technology
Seminar on 3D Technology
 
Reflection-refraction.ppt
Reflection-refraction.pptReflection-refraction.ppt
Reflection-refraction.ppt
 
Reflection-refraction.ppt
Reflection-refraction.pptReflection-refraction.ppt
Reflection-refraction.ppt
 
2415_web_Lec_31_Light_I.ppt257777777777777777777777x
2415_web_Lec_31_Light_I.ppt257777777777777777777777x2415_web_Lec_31_Light_I.ppt257777777777777777777777x
2415_web_Lec_31_Light_I.ppt257777777777777777777777x
 
Real-time lightmap baking
Real-time lightmap bakingReal-time lightmap baking
Real-time lightmap baking
 
illuminationmodelsshading-200501081735 (1).pdf
illuminationmodelsshading-200501081735 (1).pdfilluminationmodelsshading-200501081735 (1).pdf
illuminationmodelsshading-200501081735 (1).pdf
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Lec02 camera
Lec02 cameraLec02 camera
Lec02 camera
 
Computer Graphics display technologies(Computer graphics tutorials and tips)
Computer Graphics display technologies(Computer graphics tutorials and tips)Computer Graphics display technologies(Computer graphics tutorials and tips)
Computer Graphics display technologies(Computer graphics tutorials and tips)
 
Computer Graphics display technologies(Computer graphics tutorials)
Computer Graphics display technologies(Computer graphics tutorials)Computer Graphics display technologies(Computer graphics tutorials)
Computer Graphics display technologies(Computer graphics tutorials)
 
Lecture 1.new optics
Lecture 1.new opticsLecture 1.new optics
Lecture 1.new optics
 
Illumination Models & Shading
Illumination Models & ShadingIllumination Models & Shading
Illumination Models & Shading
 
Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global Illumination
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in Unity
 
Lec14 multiview stereo
Lec14 multiview stereoLec14 multiview stereo
Lec14 multiview stereo
 
Digital image processing 2
Digital image processing   2Digital image processing   2
Digital image processing 2
 

More from CharlesMatu2

The cause of ww1 happened 1914 this was after the the asssasination of Arc...
The  cause of ww1  happened  1914 this was after the the asssasination of Arc...The  cause of ww1  happened  1914 this was after the the asssasination of Arc...
The cause of ww1 happened 1914 this was after the the asssasination of Arc...CharlesMatu2
 
history_of_american_agriculture.ppt
history_of_american_agriculture.ppthistory_of_american_agriculture.ppt
history_of_american_agriculture.pptCharlesMatu2
 
Origin of Agriculture.ppt
Origin of Agriculture.pptOrigin of Agriculture.ppt
Origin of Agriculture.pptCharlesMatu2
 
History of Science and Technology.ppt
History of Science and Technology.pptHistory of Science and Technology.ppt
History of Science and Technology.pptCharlesMatu2
 
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptLighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptCharlesMatu2
 
BBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxBBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxCharlesMatu2
 
Computer graphics.docx
Computer graphics.docxComputer graphics.docx
Computer graphics.docxCharlesMatu2
 
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxBIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxCharlesMatu2
 

More from CharlesMatu2 (15)

The cause of ww1 happened 1914 this was after the the asssasination of Arc...
The  cause of ww1  happened  1914 this was after the the asssasination of Arc...The  cause of ww1  happened  1914 this was after the the asssasination of Arc...
The cause of ww1 happened 1914 this was after the the asssasination of Arc...
 
AP Ch 1.ppt
AP Ch 1.pptAP Ch 1.ppt
AP Ch 1.ppt
 
history_of_american_agriculture.ppt
history_of_american_agriculture.ppthistory_of_american_agriculture.ppt
history_of_american_agriculture.ppt
 
Origin of Agriculture.ppt
Origin of Agriculture.pptOrigin of Agriculture.ppt
Origin of Agriculture.ppt
 
History of Science and Technology.ppt
History of Science and Technology.pptHistory of Science and Technology.ppt
History of Science and Technology.ppt
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
 
september13.ppt
september13.pptseptember13.ppt
september13.ppt
 
september18.ppt
september18.pptseptember18.ppt
september18.ppt
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
 
september6.ppt
september6.pptseptember6.ppt
september6.ppt
 
october9.ppt
october9.pptoctober9.ppt
october9.ppt
 
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptLighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
 
BBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxBBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docx
 
Computer graphics.docx
Computer graphics.docxComputer graphics.docx
Computer graphics.docx
 
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxBIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
 

Recently uploaded

Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirtrahman018755
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理AS
 
一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样
一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样
一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样ayvbos
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书c6eb683559b3
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsrahman018755
 
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样AS
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformonhackersuli
 
一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理A
 
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxA LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxthinamazinyo
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理F
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书F
 
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Dewi Agency
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理F
 

Recently uploaded (20)

Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirt
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样
一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样
一比一原版(USYD毕业证书)悉尼大学毕业证原件一模一样
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
 
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
 
一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理
 
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxA LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理一比一原版犹他大学毕业证如何办理
一比一原版犹他大学毕业证如何办理
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
 
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303Lowongan Kerja LC Yogyakarta Terbaru 085746015303
Lowongan Kerja LC Yogyakarta Terbaru 085746015303
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
 

october23.ppt

  • 1. Now Playing: Still Alive Jonathan Coulton from Portal: The Game Released October 9, 2007
  • 2. Real Cameras and Light Transport Rick Skarbez, Instructor COMP 575 October 23, 2007
  • 3. Announcements • Programming Assignment 2 (3D graphics in OpenGL) is out • Due THIS Thursday, October 25 by 11:59pm • Programming Assignment 3 (Rasterization) is out • Due NEXT Thursday, November 1 by 11:59pm
  • 4. Last Time • Finished our discussions of mapping • Texture Mapping • Bump Maps • Displacement Maps • Talked about programmable graphics hardware • Discussed the class project
  • 5. Today • Further discussion of real lights and real cameras • Easing into ray-tracing
  • 6. Recap of Rasterization-Based Rendering • Very fast • Computer games get 30+ frames per second on commodity hardware • Not very good (comparatively speaking) • Need lots of hacks/workarounds to get effects like shadows, global illumination, reflection, etc.
  • 7. Recap of Rasterization-Based Rendering • Everything in the world is a colored polygon • Projects these polygons onto the “screen” to generate the image seen by the user • All processed independently • One polygon’s color doesn’t depend on another’s
  • 8. Hallmarks of Rasterization • Very high rendering speed • Lots of parallelism • Independence of vertices/polygons/pixels • Runs in “assembly line” fashion • Not very realistic • We have other options, though... • Let’s revisit the rendering equation
  • 9. The Rendering Equation • In short, the light out from a point in a specific direction depends on: • The light it emits in that direction • The light incident on that point from every direction, affected by • How reflective the material is for that pair of directions • How close the incoming direction is to the surface normal Jim Kajiya, 1986
  • 10. Movie Break! Tin Toy Pixar, 1988 Available online: http://v.youku.com/v_show/id_ch00XMTE1OTIw.html
  • 11. Lights, Cameras, and Surfaces • Remember way back at the beginning of the semester we talked about these? • Now we’re ready to talk about them again
  • 12. • How are these connected in the real world? • Light! • More precisely, photons • Light sources emit photons • Surfaces reflect & absorb photons • Cameras measure photons Lights, Cameras, Surfaces
  • 13. • The quanta of electromagnetic energy • “Particles of light” • Appear to be particles and waves simultaneously • We ignore wave behavior (i.e. diffraction) • We simulate particle behavior Photons
  • 14. • We model photons as “rays” of light • Rays in the mathematical sense • Defined by a starting point and a vector Photons as Rays
  • 15. • There are several kinds of lights (or light sources) • Light bulbs • The sun • Spot Lights • Ceiling Lights • These are different because they emit photons differently Lights
  • 16. Lights • We’ve already talked an awful lot about lights • There are several types: • Point lights (i.e light bulbs) • Directional lights (i.e. the Sun) • Spot lights • Area lights • In the real world, just about EVERY light is an area light
  • 17. • Emit light evenly in all directions • That is, photons (rays) from a point light all originate from the same point, and have directions evenly distributed over the sphere Point Lights (i.e. Light Bulbs)
  • 18. • Point light sources at an infinite (or near infinite) distance • Can assume that all rays are parallel Directional Lights (i.e. the Sun) Earth
  • 19. • Point light sources at an infinite (or near infinite) distance • Can assume that all rays are parallel Directional Lights (i.e. the Sun)
  • 20. • Similar to point lights, but intensity of emitted light varies by direction • Can think of it as only emitting rays over a patch on the sphere • Spot Lights (i.e., well, Spot Lights)
  • 21. • Emits light in every direction from a surface • Can think of it as a set of point lights, or a patch on which every point is a point light Area Lights (i.e. Ceiling Lights)
  • 22. Surfaces • We’ve talked a little bit about surfaces • In terms of OpenGL lighting • We’re not going to talk about them in a lot more detail here • Just remember that in OpenGL, surfaces can’t be reflective/refractive • In the real world, they can be
  • 23. • Surface materials can be: • Dull • Shiny • Bumpy • Smooth • Transparent • Translucent... Surfaces
  • 24. • So what do surfaces do? • They selectively react to incoming photons • Absorb • Reflect • Refract • Fluoresce • etc. Surfaces
  • 25. • Surfaces make up the “interesting” things in a scene, but from a light transport point of view, they are just intermediaries Surfaces
  • 26. • Almost all cameras work in a similar fashion • Use a lens to map rays from the scene (i.e. the world) onto an image plane Cameras
  • 27. Cameras • Last time we talked about cameras, we only considered “pinhole” cameras • Where all light passes through a single point • i.e. camera obscura • These do exist in the real world • But almost all real cameras have lenses
  • 29. Pinhole Projection This is essentially what we’ve seen in OpenGL
  • 30. So why do we need lenses? • To gather more light • In an ideal pinhole camera, exactly one ray would reach each point in the image plane • To focus the light • In an ideal pinhole camera, this is not a problem • But in a real camera (even a pinhole one), objects will appear unfocused
  • 33. Refraction • Lenses refract light passing through them • That is, change the direction of rays • Refraction is governed by Snell’s law: • n1 sin( α1 ) = n2 sin( α2 ) • n is the index of refraction for a material
  • 34. Paraxial (or First- Order) Optics • Assumes that angles are small (i.e. the lens is small and/or any objects are far away) ➡Can approximate sin( α1 ) with α1 • Assumes all lenses are spherical • Assumes all lenses are symmetric about their optical axes
  • 35. Paraxial Optics n1 sin  1 = n2 sin  2 n1  1  n2 2 • Scary-looking math slide Snell’s Law Small AnglesParaxial Refraction
  • 36. Thin Lenses • Don’t need to know all the math from the last slide • Just showing it to you • But we can use that to talk about actual lenses • Esp. thin lenses, where a ray can be assumed to refract at one boundary, and immediately refract again at the other boundary
  • 38. Depth-of-Field • Real lenses have what is termed depth- of-field • The range over which objects in the scene appear in focus
  • 40. Thick Lenses • Lenses actually have some thickness • We’re not going to do the math here
  • 41. Compound Lenses • In real cameras, there is usually not just one lens, but a series of lenses • The entire set is called a compound lens • This is done to reduce aberrations introduced by lenses • We won’t discuss this further
  • 42. Properties of Cameras • There are 2 primary characteristics of a camera that affect how much light gets to the film: • Aperture • How wide the lens is • Shutter speed • How long the film is exposed • There are trade-offs between the two
  • 43. Aperture Artifacts • A wider aperture produces a narrower depth-of-field Narrower Wider
  • 44. Shutter Speed Artifacts • A slower shutter speed means the shutter is open for more time • This can result in motion blur
  • 45. • Images are formed by lights, surfaces, and cameras • Lights emit rays • Surfaces change rays • Cameras capture rays • Real cameras have lenses • These introduce various effects to the final image Recap
  • 46. Image Plane • Real cameras have an image plane behind the lens • Film cameras project onto film • Digital cameras project onto a chip • CCD • CMOS • “Virtual cameras”, like in computer graphics, can have the image plane in front of the lens
  • 47. Photographic Film • Too much detail to cover here • In short, film is covered with a chemical that undergoes a reaction when hit with a photon • If you are interested, read some of these:
  • 48. Charge-Coupled Devices (CCDs) • Have discrete detectors (photometric sensors) at pixel (or subpixel) locations • When you take a picture: • Each pixel is pre-charged • The shutter is opened • Photons “knock off” electrons from the pixels • The shutter is closed • Pixels are read and stored
  • 50. CMOS • Same sensor elements as CCD • But read-out is different • Uses standard CMOS technology • Won’t go into details • Can find a bit more info online if you’re interested • http://www.image-designer.com/digital- camera-ccd.html
  • 51. Color in Digital Cameras • Each sensor only detects, essentially, the number of electrons that hit it • Generates a luminance (black & white) image • 2 ways to get color • 3 separate sensor arrays • 1 each for red, green, blue • Bayer Pattern
  • 52. Bayer Patterns The process of reconstructing the “real” color at each pixel is called demosaicing Do you see a problem with this?
  • 53. 3 CCD Color • Uses a beam-splitter to redirect incoming light to each of 3 CCDs: What’s better about this? What’s worse?
  • 54. Recap • Real cameras also need a sensing image plane • Photographic film in traditional cameras • CCD or CMOS chips in digital cameras • Digital cameras need to do something extra to get color images • Multiple sensors • Bayer patterns
  • 55. A Model of the Universe
  • 56. A Model of the Universe Direct Illumination
  • 57. • It is perfectly reasonable to try to implement an algorithm based on the model discussed so far • However, it would be VERY inefficient • Why? • Many (probably most) light rays in a scene would never hit the image plane A Problem?
  • 59. • Instead of shooting rays from the light, shoot rays from the camera • Shoot one (or, realistically, many) rays per pixel • Can stop when you hit a light and/or a non-reflective surface • This is the basis of the ray tracing algorithm A Solution
  • 61. • for each pixel / subpixel shoot a ray into the scene find nearest object the ray intersects if surface is (nonreflecting OR light) color the pixel else calculate new ray direction recurse Ray-Tracing Algorithm
  • 62. • for each pixel / subpixel shoot a ray into the scene find nearest object the ray intersects if surface is (nonreflecting OR light) color the pixel else calculate new ray direction recurse Ray-Tracing Algorithm Ray Casting
  • 63. 1. Generate the rays that are seen by the eye • One (or more) for each pixel • Need to determine ray origin / directions 2. Figure out what (if anything) those rays hit • Compute the nearest intersection • Ray-object intersections 3. Determine the color of the pixel Ray-Tracing Components
  • 64. A Model of the Universe Indirect Illumination This is also commonly referred to as global illumination
  • 65. With Global Illumination Direct Illumination vs. Global Illumination Direct Illumination Only
  • 66. • This week and next • Casting Rays • Weeks 12 & 13 • Ray Tracing • Radiosity • Week 14 • Photon Mapping Class Schedule
  • 67. • Week 15 • Special Topics (tentative) • High Dynamic Range (HDR) Rendering • Image-Based Rendering • Suggestions? • Week 16 • Course / Final Exam Review Class Schedule
  • 68. Next Time • Figuring out how to cast rays • Turning the concepts from today into concrete math • Programming Assignment 2 is due • 11:59pm Thursday