DOC PREVIEW
UVA CS 445 - Local Illumination

This preview shows page 1-2-3-4-27-28-29-30-55-56-57-58 out of 58 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 58 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Local IlluminationRay CastingSlide 3Slide 4IlluminationGoalOverviewModeling Light SourcesEmpirical ModelsOpenGL Light Source ModelsPoint Light SourceDirectional Light SourceSpot Light SourceSlide 14Modeling Surface ReflectanceSlide 16OpenGL Reflectance ModelSlide 18Diffuse ReflectionSlide 20Slide 21Slide 22Slide 23Specular ReflectionGeometry of ReflectionSlide 26Slide 27Slide 28Slide 29Slide 30EmissionSlide 32Ambient TermSlide 34Slide 35Slide 36Surface Illumination CalculationSlide 38Slide 39Global IlluminationShadowsRay Casting (last lecture)Recursive Ray TracingMirror reflectionsTransparencySlide 46Refractive TransparencyRefractive TranparencySlide 49Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55PrecisionSummaryIllumination TerminologyGreg HumphreysCS445: Intro GraphicsUniversity of Virginia, Fall 2003Local IlluminationGreg HumphreysUniversity of VirginiaCS 445, Fall 2003Ray CastingImage RayCast(Camera camera, Scene scene, int width, int height){Image image = new Image(width, height);for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j);Intersection hit = FindIntersection(ray, scene);image[i][j] = GetColor(scene, ray, hit);}}return image;}Image RayCast(Camera camera, Scene scene, int width, int height){Image image = new Image(width, height);for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j);Intersection hit = FindIntersection(ray, scene);image[i][j] = GetColor(scene, ray, hit);}}return image;}WireframeRay CastingImage RayCast(Camera camera, Scene scene, int width, int height){Image image = new Image(width, height);for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j);Intersection hit = FindIntersection(ray, scene);image[i][j] = GetColor(scene, ray, hit);}}return image;}Image RayCast(Camera camera, Scene scene, int width, int height){Image image = new Image(width, height);for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j);Intersection hit = FindIntersection(ray, scene);image[i][j] = GetColor(scene, ray, hit);}}return image;}Without IlluminationRay CastingImage RayCast(Camera camera, Scene scene, int width, int height){Image image = new Image(width, height);for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j);Intersection hit = FindIntersection(ray, scene);image[i][j] = GetColor(scene, ray, hit);}}return image;}Image RayCast(Camera camera, Scene scene, int width, int height){Image image = new Image(width, height);for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { Ray ray = ConstructRayThroughPixel(camera, i, j);Intersection hit = FindIntersection(ray, scene);image[i][j] = GetColor(scene, ray, hit);}}return image;}With IlluminationIllumination•How do we compute radiance for a sample ray?Angel Figure 6.2image[i][j] = GetColor(scene, ray, hit);Goal•Must derive computer models for ...Emission at light sourcesScattering at surfacesReception at the camera•Desirable features …ConciseEfficient to compute“Accurate”Overview•Direct (Local) IlluminationEmission at light sourcesScattering at surfaces•Global illuminationShadowsRefractionsInter-object reflectionsDirect IlluminationModeling Light Sources•IL(x,y,z,) ... describes the intensity of energy, leaving a light source, …arriving at location(x,y,z), ...from direction (), ...with wavelength (x,y,z)LightEmpirical Models•Ideally measure irradiant energy for “all” situationsToo much storageDifficult in practiceOpenGL Light Source Models•Simple mathematical models:Point lightDirectional lightSpot lightPoint Light Source•Models omni-directional point sourceintensity (I0), position (px, py, pz), factors (kc, kl, kq) for attenuation with distance (d)2qlc0kkkIddIL2qlc0kkkIddILdLight(px, py, pz)Directional Light Source•Models point light source at infinityintensity (I0), direction (dx,dy,dz) 0IIL0IIL(dx, dy, dz)No attenuationwith distanceSpot Light Source•Models point light source with directionintensity (I0), position (px, py, pz), direction (dx, dy, dz)attenuation2qlc0kkk)(IddLDIL-2qlc0kkk)(IddLDIL-dLight(px, py, pz) DLOverview•Direct IlluminationEmission at light sourcesScattering at surfaces•Global illuminationShadowsRefractionsInter-object reflectionsDirect IlluminationModeling Surface Reflectance•Rs(,) ... describes the amount of incident energy, arriving from direction (), ...leaving in direction (,), …with wavelength Surface())Empirical Models•Ideally measure radiant energy for “all” combinations of incident angles Too much storageDifficult in practiceSurface())OpenGL Reflectance Model•Simple analytic model: diffuse reflection +specular reflection +emission +“ambient”SurfaceBased on modelproposed by PhongBased on modelproposed by PhongOpenGL Reflectance Model•Simple analytic model: diffuse reflection +specular reflection +emission +“ambient”SurfaceBased on Phong illumination modelBased on Phong illumination modelBased on modelproposed by PhongBased on modelproposed by PhongDiffuse Reflection•Assume surface reflects equally in all directionsExamples: chalk, claySurfaceDiffuse Reflection•How much light is reflected?Depends on angle of incident lightSurfaceDiffuse Reflection•How much light is reflected?Depends on angle of incident lightSurfacedL cosdAdLdADiffuse Reflection•Lambertian modelcosine law (dot product)LDDILNKI )( -LDDILNKI )( -SurfaceNLOpenGL Reflectance Model•Simple analytic model: diffuse reflection +specular reflection +emission +“ambient”SurfaceSpecular Reflection•Reflection is strongest near mirror angleExamples: mirrors, metalsNLRGeometry of ReflectionNIRN(I)iri=rGeometry of ReflectionNIRN(I) i=rcos(i)NGeometry of ReflectionNIRN(I) i=r-(I.N)N-I-2(I.N)N( ) ( ) ( )( ) ( )22NNR I I I N NR I I I N N+ - =- �= - �Specular ReflectionHow much light is seen?Depends on: angle of incident lightangle to


View Full Document

UVA CS 445 - Local Illumination

Documents in this Course
Lighting

Lighting

49 pages

Color

Color

20 pages

Clipping

Clipping

10 pages

Shadows

Shadows

95 pages

Color

Color

37 pages

Radiosity

Radiosity

49 pages

Clipping

Clipping

59 pages

Assign 3

Assign 3

28 pages

Splines

Splines

17 pages

Color

Color

17 pages

Load more
Download Local Illumination
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Local Illumination and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Local Illumination 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?