csc418 computer graphics n raytracing n shadows n global illumination

51
CSC418 Computer Graphics Raytracing Shadows Global Illumination

Upload: ralph-powell

Post on 23-Dec-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

CSC418 Computer GraphicsCSC418 Computer Graphics

Raytracing Shadows Global Illumination

Page 2: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Local vs. Global IlluminationLocal vs. Global Illumination

Local Illumination Models e.g. Phong Model source from a light reflected once off a surface towards

the eye Indirect light is included with an ad hoc “ambient” term which

is normally constant across the scene

Global Illumination Models e.g. ray tracing or radiosity (both are incomplete) Try to measure light propagation in the scene Model interaction between objects and other objects and

objects and their environment

Page 3: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

All surfaces are not created equalAll surfaces are not created equal

Specular surfaces– e.g. mirrors, glass balls– An idealized model provides ‘perfect’ reflection

Incident ray is reflected back as a ray in a single direction

No scattering (unrealistic)

Diffuse surfaces– e.g. flat paint, chalk– Lambertian surfaces– Incident light is scattered in all directions

Also unrealistic for most surfaces

Page 4: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Categories of light transportCategories of light transport

Specular-Specular Specular-Diffuse Diffuse-Diffuse Diffuse-Specular

Page 5: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Real surfaces are more complex…Real surfaces are more complex…

Page 6: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray TracingRay Tracing

Traces path of specularly reflected or transmitted (refracted) rays through environment

Rays are infinitely thin Don’t disperse Signature: shiny objects exhibiting sharp, multiple reflections

Page 7: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray TracingRay Tracing

Unifies in one framework– Hidden surface removal – Shadow computation– Reflection of light– Refraction of light– Global specular interaction

Page 8: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Raytracing slides borrowed from…Raytracing slides borrowed from…

Page 9: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 10: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray tracing setupRay tracing setup

Page 11: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 12: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray does not intersect objectsRay does not intersect objects

Page 13: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 14: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 15: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 16: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray hits objectRay hits object

Page 17: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 18: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Shadow testShadow test

Page 19: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 20: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Point in shadowPoint in shadow

With a simple lighting model, apply the ambient term for the shadow region

Page 21: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 22: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 23: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Reflected ray is sent out from intersection point

Reflected ray is sent out from intersection point

Page 24: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Reflected ray has hit objectReflected ray has hit object

Local illumination model calculated where ray intersects with second object

Result carried back to origin of ray on first object, contributes to object’s colour

Page 25: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 26: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Transmitted ray generated for transparent objects

Transmitted ray generated for transparent objects

Page 27: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Transmitted ray hit objectTransmitted ray hit object

Local illumination model calculated where the ray hit object Result carried back to the point of first intersection

Page 28: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 29: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

No reflectionNo reflection

Page 30: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Single reflectionSingle reflection

Page 31: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Double reflectionDouble reflection

Page 32: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray Tracing DeficienciesRay Tracing Deficiencies

Local specular illumination model spreads rays in specular reflection, but global model doesn’t

Ignores major light transport mechanisms– Interaction of diffuse surfaces

Intersection computation time is very long

Page 33: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray Tracing Efficiency ImprovementsRay Tracing Efficiency Improvements

Bounding volumes Spatial subdivision

– Octrees– SEADS– BSP

Page 34: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray Tracing Improvements: Image QualityRay Tracing Improvements: Image Quality

Backwards ray tracing– Trace from the light to the surfaces and then from the eye

to the surfaces– “shower” scene with light and then collect it– “Where does light go?” vs “Where does light come from?”– Good for caustics

Page 35: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ray Tracing Improvements: Image QualityRay Tracing Improvements: Image Quality

Cone tracing– Models some dispersion effects

Distributed Ray Tracing– Super sample each ray– Blurred reflections, refractions– Soft shadows– Depth of field– Motion blur

Page 36: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

RadiosityRadiosity

Diffuse interaction within a closed environment Theoretically sound View independent No specular interactions

Page 37: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Global IlluminationGlobal Illumination

Page 38: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Direct light is only part of the storyDirect light is only part of the story

Page 39: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Ambient lightAmbient light

Page 40: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Lambertian Reflection and Colour BleedingLambertian Reflection and Colour Bleeding

Page 41: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

RadiosityRadiosity

Page 42: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Radiosity EquationRadiosity Equation

Page 43: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Form FactorsForm Factors

Page 44: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Techniques for Calculating Form FactorsTechniques for Calculating Form Factors

Page 45: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Techniques for Calculating Form FactorsTechniques for Calculating Form Factors

Page 46: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 47: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 48: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 49: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 50: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination
Page 51: CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination

Where to next?Where to next?

The general rendering equation (not part of this course!)

Next class…Curves and Surfaces