Chapter XVI Texturing toward Global Illumination

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

Computer graphics & visualization Global Illumination Effects.
Environment Mapping CSE 781 – Roger Crawfis
Lecture 14 Illumination II – Global Models
Real-Time Rendering Self-Shadowing
Computer Graphics In4/MSc Computer Graphics Lecture Notes #15 Illumination III View Independent Rendering.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
7M836 Animation & Rendering
1 Dr. Scott Schaefer Radiosity. 2/38 Radiosity 3/38 Radiosity Physically based model for light interaction View independent lighting Accounts for indirect.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
-Global Illumination Techniques
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
CSCE 441: Computer Graphics Ray Tracing
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
Illumination Model How to compute color to represent a scene As in taking a photo in real life: – Camera – Lighting – Object Geometry Material Illumination.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
COMPUTER GRAPHICS CS 482 – FALL 2015 OCTOBER 27, 2015 SCATTERING LIGHT SCATTERING PHYSICALLY BASED SCATTERING SUBSURFACE SCATTERING AMBIENT OCCLUSION.
Ambient Occlusion Patrick Cozzi University of Pennsylvania CIS Fall 2013.
Distributed Ray Tracing. Can you get this with ray tracing?
Distributed Ray Tracing. Can you get this with ray tracing?
Computer Graphics Lecture 30 Mathematics of Lighting and Shading - IV Taqdees A. Siddiqi
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Chapter X Advanced Texturing
3D Graphics Rendering PPT By Ricardo Veguilla.
Understanding Theory and application of 3D
Models and Architectures
Real-Time Volume Graphics [06] Local Volume Illumination
Michael Tanaya , Hua ming Chen
(c) 2002 University of Wisconsin
Lighting.
Chapter IX Bump Mapping
Chapter V Illumination and Shaders
Radiosity Dr. Scott Schaefer.
CSCE 441 Computer Graphics: Radiosity
UMBC Graphics for Games
Models and Architectures
Isaac Gang University of Mary Hardin-Baylor
Chapter XIV Normal Mapping
Chapter IX Lighting.
CS5500 Computer Graphics May 29, 2006
Models and Architectures
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Illumination and Shading
CSCE 441: Computer Graphics Ray Tracing
OPTICS III, IV: Global Illumination
Chapter XV Shadow Mapping
CS 480/680 Computer Graphics Shading.
Environment Mapping.
Introduction to Ray Tracing
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Distributed Ray Tracing
Real-time Global Illumination with precomputed probe
Presentation transcript:

Chapter XVI Texturing toward Global Illumination

Local vs. Global Illuminations Lighting or illumination models are divided into two categories. Local illumination Global illumination The Phong model is the representative of local illumination models, where the illumination of an object depends solely on the properties of the object and the light sources. Neither (a) nor (b) is correct. The global illumination (GI) model considers the scene objects as potential indirect light sources, producing (c).

Ray Tracing The primary ray spawns three secondary rays. Shadow ray toward the light source Reflection ray Transmitted/refraction ray for a translucent object

Ray Tracing (cont’d) An image generated by ray tracing

Light Mapping When both the object and the light source are static, the diffuse reflections remain constant over the quad independently of the camera position. Consider the diffuse reflection term, max(n·l,0)sdmd, of the Phong model. We can precompute max(n·l,0)sd which represents the incoming light named the irradiance, and md will be read from an image texture at run time. The pre-computed irradiance is stored in a texture, named the light map.

Light Mapping (cont’d) When the irradiance values are pre-computed, there is no real-time constraint. Therefore, we can use an expensive global illumination model. In most cases, we use the radiosity algorithm presented in Section 16.1.2. Consequently, light-mapped scenes show higher quality than the ones locally illuminated. The method for creating a light map is similar to the one for creating a normal map presented in Section 14.5. The surface to be light-mapped is parameterized and rasterized in a texture. For each sampled surface point corresponding to a texel, irradiance is computed.

Environment Mapping A shiny object reflects its surrounding environment. For this, a special texture, named the environment map, is used. It captures the surrounding environment. Shown below is a cube map.

Cube Mapping The cube map (illustrated as a box) surrounds an object. A ray fired from the viewpoint is traced to determine the color reflected at p. Environment mapping is often called a simplified ray tracing in the sense that only the one-bounce reflection vector, R, is traced. It is just a small step out of local illumination. For example, a concave object does not reflect itself.

Cube Mapping (cont’d) Cube map creation As usual, glGenTextures and glBindTexture are invoked. Each face of the cube map is named after the axis pointing toward that face. The symbolic constants for the faces are defined by adding one in succession.

Cube Mapping (cont’d) Vertex shader

Cube Mapping (cont’d) Fragment shader

Ambient Occlusion In the Phong lighting model, the ambient term, sama, accounts for indirect lighting. It assumes that the ambient light randomly bounces in the scene and arrives at a surface point from all directions. In reality, however, some of the directions may be occluded. The ambient occlusion algorithm estimates how much of the ambient light is occluded, which we call the occlusion degree. In order to compute the occlusion degree, a hemisphere could be used. It is evenly sampled and then rays are cast from a surface point toward the sampled points.

Ambient Occlusion (cont’d) Unfortunately, ray casting is expensive. An alternative is to partition the hemisphere into ‘occupied’ and ‘empty’ spaces. The occlusion degree may be approximated as the ratio between the occupied space and the entire hemisphere space.

Ambient Occlusion (cont’d) Measuring the ratio is again approximated by using a set of sample points distributed within the hemisphere. Computing the ratio is approximated by the depth test using the depth map and the points sampled in the hemisphere. This is similar to the depth comparison performed in shadow mapping.

Ambient Occlusion (cont’d) Examples

Ambient Occlusion (cont’d) A problem Nonetheless, such artifacts are rarely perceived by the average users, and ambient occlusion is widely accepted in games.