3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics...

60
3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam Finkelstein and David Dobkin

Transcript of 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics...

Page 1: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Rendering

Connelly Barnes

CS 4810: Graphics

Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam Finkelstein and David Dobkin

Page 2: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Rendering• Generate an image from geometric primitives

Rendering

Geometric Primitives

Raster Image

Page 3: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Rendering• Generate an image from geometric primitives

Rendering

3D 2D

Page 4: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Rendering Example

What issues must be addressed by a 3D rendering system?

Page 5: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Overview• 3D scene representation

• 3D viewer representation

• Visible surface determination

• Lighting simulation

Page 6: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Overview• 3D scene representation

• 3D viewer representation

• Visible surface determination

• Lighting simulation

How is the 3D scenedescribed in a computer?

Page 7: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Scene Representation• Scene is usually approximated by 3D primitivesoPointoLine segmentoPolygonoPolyhedronoCurved surfaceoSolid object oetc.

Page 8: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Point• Specifies a location

Origin

Page 9: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Point• Specifies a locationoRepresented by three coordinatesoInfinitely small

typedef struct { Coordinate x; Coordinate y; Coordinate z; } Point;

(x,y,z)

Origin

Page 10: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Vector

• Specifies a direction and a magnitude

Page 11: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Vector

• Specifies a direction and a magnitudeoRepresented by three coordinatesoMagnitude ||V|| = sqrt(dx dx + dy dy + dz dz)oHas no location

typedef struct { Coordinate dx; Coordinate dy; Coordinate dz; } Vector;

(dx,dy,dz)

Page 12: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Vector• Specifies a direction and a magnitudeoRepresented by three coordinatesoMagnitude ||V|| = sqrt(dx dx + dy dy + dz dz)oHas no location

• Dot product of two 3D vectorsoV1·V2 = dx1dx2 + dy1dy2 + dz1dz2

oV1·V2 = ||V1 || || V2 || cos(Θ)

typedef struct { Coordinate dx; Coordinate dy; Coordinate dz; } Vector;

(dx1,dy1,dz1)

(dx2,dy2 ,dz2)Θ

Page 13: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• What is…?

• V1 · V1 = ?

Page 14: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• What is…?

• V1 · V1 = dx dx + dy dy + dz dz

Page 15: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• What is…?

• V1 · V1 = (Magnitude)2

Page 16: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 =

Page 17: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = ||V1 || || V1 || cos(Θ)

Page 18: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = ||V1 || || V1 || cos(Θ) = cos(Θ)

Page 19: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = ||V1 || || V1 || cos(Θ) = cos(Θ) = cos(0)

Page 20: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

Page 21: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

• V1 · V2 =

Page 22: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

• V1 · V2 = ||V1 || || V2 || cos(Θ)

Page 23: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

• V1 · V2 = ||V1 || || V2 || cos(Θ) = cos(Θ)

Page 24: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

• V1 · V2 = cos(Θ) = (adjacent / hyp)

(dx1,dy1,dz1)

(dx2,dy2 ,dz2)Θ

Page 25: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

• V1 · V2 = (adjacent / 1)

(dx1,dy1,dz1)

(dx2,dy2 ,dz2)Θ

Page 26: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: a Little Review• V1 · V1 = (Magnitude)2

• Now, let V1 and V2 both be unit-length vectors.

• What is…?

• V1 · V1 = 1

• V1 · V2 = length of V1 projectedonto V2 (or vice-versa)

(dx1,dy1,dz1)

(dx2,dy2 ,dz2)Θ

Page 27: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Vector• Specifies a direction and a magnitudeoRepresented by three coordinatesoMagnitude ||V|| = sqrt(dx dx + dy dy + dz dz)oHas no location

• Cross product of two 3D vectorsoV1×V2 = Vector normal to plane V1 , V2 o|| V1 × V2 || = ||V1 || || V2 || sin(Θ)

typedef struct { Coordinate dx; Coordinate dy; Coordinate dz; } Vector;

(dx1,dy1,dz1)

(dx2,dy2 ,dz2)Θ

Page 28: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Linear Algebra: More Review• Let C = A × B:oCx = AyBz - AzBy oCy = AzBx - AxBz oCz = AxBy - AyBx

• A × B = - B × A (remember “right-hand” rule)

• We can do similar derivations to show:oV1×V2= ||V1 || || V2 || sin(Θ)n, where n is unit vector normal

to V1 and V2

o|| V1 × V1 || = 0o|| V1 × (-V1) || = 0

• http://physics.syr.edu/courses/java-suite/crosspro.html

Page 29: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Line Segment• Linear path between two points

Origin

Page 30: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Line Segment• Use a linear combination of two pointsoParametric representation:

»P = P1 + t (P2 - P1), (0 ≤ t ≤ 1)

typedef struct { Point P1; Point P2; } Segment;

P1

P2

Origin

Page 31: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Ray• Line segment with one endpoint at infinityoParametric representation:

»P = P1 + t V, (0 <= t < ∞)

typedef struct { Point P1; Vector V; } Ray;

P1

V

Origin

Page 32: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Line• Line segment with both endpoints at infinityoParametric representation:

»P = P1 + t V, (-∞ < t < ∞)

P1

typedef struct { Point P1; Vector V; } Line;

V

Origin

Page 33: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Origin

3D Plane• A linear combination of three points

P1

P3P2

Page 34: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Origin

3D Plane• A linear combination of three pointsoImplicit representation:

»P·N + d = 0, or»ax + by + cz + d = 0

oN is the plane “normal”»Unit-length vector»Perpendicular to plane

typedef struct { Vector N; Distance d; } Plane; P1

N = (a,b,c)

d

P3P2

Page 35: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Polygon• Area “inside” a sequence of coplanar pointsoTriangleoQuadrilateraloConvexoStar-shapedoConcaveoSelf-intersecting

oHoles (use > 1 polygon struct)

typedef struct { Point *points; int npoints; } Polygon;

Points are in counter-clockwise order

Page 36: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Sphere• All points at distance “r” from point “(cx, cy, cz)”oImplicit representation:

»(x - cx)2 + (y - cy)2 + (z - cz)2 = r 2oParametric representation:

»x = r cos(φ) cos(Θ) + cx

»y = r cos(φ) sin(Θ) + cy

»z = r sin(φ) + cz

typedef struct { Point center; Distance radius; } Sphere;

r

Origin

Page 37: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Other 3D primitives• Cone

• Cylinder

• Ellipsoid

• Box

• Etc.

Page 38: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

3D Geometric Primitives• More detail on 3D modeling later in course oPointoLine segmentoPolygonoPolyhedronoCurved surfaceoSolid object oetc.

Page 39: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Overview• 3D scene representation

• 3D viewer representation

• Visible surface determination

• Lighting simulation

How is the viewing devicedescribed in a computer?

Page 40: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Camera Models

• The most common model is pin-hole camera oAll captured light rays arrive along paths toward focal point without

lens distortion (everything is in focus)

View plane

Eye position(focal point)

Page 41: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Camera Parameters• What are the parameters of a camera?

Page 42: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Camera Parameters• PositionoEye position (px, py, pz)

• OrientationoView direction (dx, dy, dz)oUp direction (ux, uy, uz)

• ApertureoField of view (xfov, yfov)

• Film plane o“Look at” pointoView plane normal right

back

Up direction

Eye Position

View direction

ViewPlane

“Look at”Point

Page 43: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Other Models: Depth of Field

Close Focused Distance Focused

P. Haeberli

Page 44: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Other Models: Motion Blur• Mimics effect of open camera shutter

• Gives perceptual effect of high-speed motion

• Generally involves temporal super-sampling

Page 45: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Other Models: Lens Distortion• Camera lens bends light, especially at edges

• Common types are barrel and pincushion

Barrel Distortion Pincushion Distortion

Page 46: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Other Models: Lens Distortion• Camera lens bends light, especially at edges

• Common types are barrel and pincushion

Barrel Distortion No Distortion

Page 47: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Other Models: Lens DistortionLens flares are another kind of distortion

Star Wars: Knights of the Old Republic (BioWare)

Page 48: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Overview• 3D scene representation

• 3D viewer representation

• Visible surface determination

• Lighting simulation

How can the front-most surfacebe found with an algorithm?

Page 49: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Visible Surface Determination• The color of each pixel on the view plane

depends on the radiance emanating from visible surfaces

View planeEye position

Simplest methodis ray casting

Rays through

view plane

Page 50: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Ray Casting• For each sample …oConstruct ray from eye position through view planeoFind first surface intersected by ray through pixeloCompute color of sample based on surface radiance

Page 51: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Ray Casting• For each sample …oConstruct ray from eye position through view planeoFind first surface intersected by ray through pixeloCompute color of sample based on surface radiance

Page 52: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Visible Surface Determination• For each sample …oConstruct ray from eye position through view planeoFind first surface intersected by ray through pixeloCompute color of sample based on surface radiance

More efficient algorithmsutilize spatial coherence!

Page 53: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Rendering AlgorithmsRendering is a problem in

sampling and reconstruction!

Page 54: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Overview• 3D scene representation

• 3D viewer representation

• Visible surface determination

» Lighting simulation

How do we compute theradiance for each sample ray?

Page 55: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Lighting Simulation• Lighting parametersoLight source emissionoSurface reflectanceoAtmospheric attenuation

Page 56: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Lighting Simulation• Lighting parametersoLight source emissionoSurface reflectanceoAtmospheric attenuation

NN

Camera

Surface

LightSource

Page 57: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Lighting Simulation• Lighting parametersoLight source emissionoSurface reflectanceoAtmospheric attenuation

Durand & Dorsey Siggraph ‘02Real-Time Volumetric Shadows

paper [Chen et al. 2011]

Page 58: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Lighting Simulation• Direct illuminationoRay castingoPolygon shading

• Global illuminationoRay tracingoMonte Carlo methodsoRadiosity methods

More on these methods later!

NN

Camera

Surface

LightSource

N

Page 59: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Summary• Major issues in 3D rendering o3D scene representationo3D viewer representationoVisible surface determinationoLighting simulation

• Concluding noteoAccurate physical simulation

is complex and intractable»Rendering algorithms apply many approximations to simplify representations and computations

Page 60: 3D Rendering - Connelly Barnes€¦ · 3D Rendering Connelly Barnes CS 4810: Graphics Acknowledgment: slides by Jason Lawrence, Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam

Next Lecture• Ray intersections

• Light and reflectance models

• Indirect illumination

For assignment #2, you will write a ray tracer!

Rendered by Tor Olav Kristensen

using POV-Ray