David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke...

23
David Luebke 1/19/99 CS 551/651: CS 551/651: Advanced Computer Advanced Computer Graphics Graphics David Luebke David Luebke [email protected] [email protected] http://www.cs.virginia.edu/ http://www.cs.virginia.edu/ ~cs551dl ~cs551dl

Transcript of David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke...

Page 1: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

CS 551/651: CS 551/651: Advanced Computer GraphicsAdvanced Computer Graphics

David LuebkeDavid Luebke

[email protected]@cs.virginia.edu

http://www.cs.virginia.edu/~cs551dlhttp://www.cs.virginia.edu/~cs551dl

Page 2: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

AdministriviaAdministrivia

Hand out syllabusHand out syllabus– Instructor/TA coordinatesInstructor/TA coordinates– Topic listTopic list– PrereqsPrereqs– TextbookTextbook– AssignmentsAssignments– Grading & Honor CodeGrading & Honor Code

Page 3: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

AdministriviaAdministrivia

Hand out bio sheetHand out bio sheet– Front: for me to calibrate the courseFront: for me to calibrate the course– Back: for me to get to know youBack: for me to get to know you

Realistically, you should probably Realistically, you should probably have 3’s and 4’s on the front sectionshave 3’s and 4’s on the front sections

Page 4: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Questions?Questions?

Page 5: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

RealismRealism

What is not realistic about the What is not realistic about the following images?following images?

Page 6: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 7: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 8: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 9: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 10: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 11: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 12: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 13: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism?Realism?

Page 14: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Realism…Realism…

A big part of realism is realistic A big part of realism is realistic lightinglighting

Is OpenGL’s lighting model realistic?Is OpenGL’s lighting model realistic?– Empirical specular termEmpirical specular term– ““Ambient” termAmbient” term– No shadowsNo shadows– No surface interreflectionNo surface interreflection

Crude light-surface interaction model

Strictly local illumination model

Page 15: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Global IlluminationGlobal Illumination

Realistic lighting is Realistic lighting is globalglobal, not local, not local– Surfaces shadow each otherSurfaces shadow each other– Surfaces illuminate each otherSurfaces illuminate each other

So realistic graphics = So realistic graphics = simulationsimulation Two long-time approachesTwo long-time approaches

– Ray-tracing: simulate light-ray opticsRay-tracing: simulate light-ray optics– Radiosity: simulate physics of light Radiosity: simulate physics of light

transfertransfer

Page 16: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Ray TracingRay Tracing

Powerful, elegant idea that unified:Powerful, elegant idea that unified:– Hidden surface determinationHidden surface determination– ShadowsShadows– Reflective surfacesReflective surfaces

Read Chapter 8 Read Chapter 8 (Browse 8.3.1-8.3.6)(Browse 8.3.1-8.3.6)

Page 17: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Ray Tracing OverviewRay Tracing Overview

To determine visible surfaces at To determine visible surfaces at each pixel:each pixel:– Cast a ray from the eyepoint through Cast a ray from the eyepoint through

the center of the pixelthe center of the pixel– Intersect the ray with all objects in the Intersect the ray with all objects in the

scenescene– Whatever it hits first is the visible objectWhatever it hits first is the visible object

This is called This is called ray castingray casting

Page 18: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Ray CastingRay Casting

An example:An example:

ScreenEyepoint Scene

Page 19: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Recursive Ray TracingRecursive Ray Tracing

Obvious extension: Obvious extension: – Spawn additional rays off reflective Spawn additional rays off reflective

surfacessurfaces– Spawn transmitted rays through Spawn transmitted rays through

transparent surfacestransparent surfaces Leads to Leads to recursiverecursive

ray tracingray tracing

Primary Ray

Secondary Rays

Page 20: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Recursive Ray TracingRecursive Ray Tracing

Slightly less obvious extension:Slightly less obvious extension:– Trace a ray from point of intersection to Trace a ray from point of intersection to

light sourcelight source– If ray hits anything before light source, If ray hits anything before light source,

object is in shadowobject is in shadow– These are called These are called shadow raysshadow rays

Page 21: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Ray Tracing OverviewRay Tracing Overview

Ray tracing is simpleRay tracing is simple– No clipping, perspective projection No clipping, perspective projection

matrices, scan conversion of polygonsmatrices, scan conversion of polygons Ray tracing is powerfulRay tracing is powerful

– Reflection, refraction, shadowsReflection, refraction, shadows

Page 22: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Ray Tracing OverviewRay Tracing Overview

So why don’t we use ray tracing for So why don’t we use ray tracing for all our computer graphics needs?all our computer graphics needs?

Ray tracing is Ray tracing is slowslow– Complexity proportional to # of pixelsComplexity proportional to # of pixels– Typical screen ~ 1,000,000 pixelsTypical screen ~ 1,000,000 pixels– Typical scene « 1,000,000 polygonsTypical scene « 1,000,000 polygons

Page 23: David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke cs551dl@cs.virginia.educs551dl.

David Luebke 1/19/99

Where We’re GoingWhere We’re Going

Next 2-3 lectures: Basic ray tracingNext 2-3 lectures: Basic ray tracing– Casting primary rays, intersection Casting primary rays, intersection

tests, speedup techniques, etc.tests, speedup techniques, etc.– Exercise 1Exercise 1: RSRT: RSRT

2-3 lecture digression: Antialiasing2-3 lecture digression: Antialiasing– Signal theory, sampling, A-buffer, etc.Signal theory, sampling, A-buffer, etc.– Assignment 1Assignment 1: Sampling strategies: Sampling strategies

1-2 lectures: advanced ray tracing1-2 lectures: advanced ray tracing