Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.

Slides:



Advertisements
Similar presentations
Illumination Lighting and Shading CSE 470/598 Introduction to Computer Graphics Arizona State University Dianne Hansford.
Advertisements

Lecture 14 Illumination II – Global Models
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Graphics Graphics Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
1 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
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.
Illumination Model & Surface-rendering Method 박 경 와.
Computer Graphics - Class 10
IMGD 1001: Illumination by Mark Claypool
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
7M836 Animation & Rendering
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
LIGHTING Part One - Theory based on Chapter 6. Lights in the real world Lights bounce off surfaces and reflect colors, scattering light in many directions.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Shading 03/19/2003. Lighting Principles Lighting based on how objects reflect light –Surface characteristics –Light color and direction –Global lighting.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Illumination and Shading
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Local Illumination and Shading
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
Lighting and Shading Part 2. Global Ambient Light There are at least 8 OpenGL lights and 1 Global Ambient Setting the Global Ambient globalAmbient[] =
Illumination 2013, Fall. Ray Casting Image RayCast(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for (int.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
1. Ray Casting Surface intersection Visible surface detection Ray Tracing Bounce the ray Collecting intensity Technique for global reflection and transmission.
Illumination and Shading Sang Il Park Sejong University.
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics.
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.
Basic Ray Tracing CMSC 435/634.
3D Rendering 2016, Fall.
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Illumination 2016, Fall.
© University of Wisconsin, CS559 Spring 2004
Shading To determine the correct shades of color on the surface of graphical objects.
Unit-7 Lighting and Shading
Chapter 10: Computer Graphics
Lighting.
CSE 470 Introduction to Computer Graphics Arizona State University
Illumination and Shading
Fundamentals of Computer Graphics Part 6 Shading
SHADING MODELS FOR POLYGONS
CS5500 Computer Graphics May 29, 2006
Illumination and Shading
Advanced Computer Graphics
Simple Illumination CSE 681.
ייצוג בעולם 3D ייצוג מצולעים (פוליגונים) צלע קודקוד צלעe0 : {v1,v2}
GR2 Advanced Computer Graphics AGR
Computer Graphics (Fall 2003)
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Presentation transcript:

Illumination Model 고려대학교 컴퓨터 그래픽스 연구실

Shading Compute the radiance for each object Figure out which pixels to fill Determine a color for each filled pixel

Illumination Components Emission at light sources Scattering at surfaces Wireframe Without Illumination With Illumination

Light Source Model Simple mathematical models Point light Directional light Spot light

Point Light Source Omni-directional point source, ex) bulb Intensity (I) Position (px, py, pz)

Directional Light Source Point light source at infinity, ex) sun Intensity (I) Direction (dx,dy,dz)

Spot Light Source Point light source with direction, ex) Luxo Intensity (I), Position (px, py, pz) Direction (dx, dy, dz)

Light Intensity Function IE: emitted intensity for light sources KA, KD, Ks Ambient / diffuse / specular reflection coefficient IAL: ambient light intensity N: unit normal vector L Unit direction vector to the point light source from a position on the surface IL: the intensity of the point light source V: unit viewing direction vector R: specular reflection vector

Reflectance Model Simple analytic model Diffuse reflection Specular reflection Emission Ambient

Diffuse Reflection Surface reflects equally in all directions With equal intensity

Diffuse Reflection How much light is reflected? N L Depends on angle of incident light dL = dA cos  = N  L Maximum at the head-on light ( = 0) N L

Specular Reflection Strongest reflection near the mirror angle Examples: mirrors, metals

Specular Reflection How much light is reflected? Depends on Angle of incident light Angle to viewer

Ks: Specular Reflectance Factor Specular Reflection Phong model {cos(a)}n = (VR)n n: exponent Ks: Specular Reflectance Factor

Effects of Exponent Ambient Exponent(n)

Emission Light emitting directly from surfaces ex) light source

Ambient Term Compensated reflection of indirect illumination

Reflectance Model Simple analytic model Diffuse reflection Specular reflection Emission Ambient

Reflectance Model Simple analytic model Diffuse reflection Specular reflection Emission Ambient Affected by the position of the light source Not affected by the position of the light source

Ambient and Diffuse Ambient Diffuse

Surface Illumination Calculation Single light source

Surface Illumination Calculation Multiple light sources Not Affected

Shadows Which light sources are blocked Cast ray towards each light source Li Si = 0 if ray is blocked, Si = 1 otherwise Shadow Term

Transparency Alpha value Back to front How much light can be transmitted? Back to front

Polygon Shading Spatial coherence Illumination calculations for pixels covered by the same primitive

Flat Shading Constant-intensity shading OK for polyhedral objects Not so good for ones with smooth surfaces

Flat Shading Process One illumination calculation per polygon Assign all pixels inside each polygon the same color Polygon Normal Vector

<Gouraud Shading> Intensity-interpolation scheme Produces smoothly shaded polygonal mesh Piecewise linear approximation To capture subtle lighting effects Needs fine mesh  Phong shading solves it <Flat Shading> <Gouraud Shading>

Mesh with Shared Normals at Vertices Gouraud Shading Polygonal mesh with the vertex normal vectors Smooth shading over adjacent polygons Curved surfaces Illumination highlights Soft shadows Mesh with Shared Normals at Vertices

Gouraud Shading Process (1/2) One lighting calculation per vertex Assign pixels inside polygon By interpolating colors computed at vertices N1 Viewer L1 Light V1 N2 N3 Polygon Vertex Normal Vector

Gouraud Shading Process (2/2) Bilinearly interpolate colors at vertices Down and across scan lines I1 I I2 I3

Vertex Normal Vector Average of the surface normals For each polygon sharing that vertex N2 N1 N3 N4

Phong Shading Normal-vector interpolation shading Subtle illumination effects in polygon interiors

Phong Shading Process (1/2) One lighting calculation per pixel Approximate surface normals for inside points N1 Viewer L1 Light V1 N2 N3 Polygon

Phong Shading Process (2/2) Bilinearly interpolate surface normals at vertices Down and across scan lines N1 N α β γ N2 N3

Various Shading Results <Wireframe> <Flat> <Gouraud> <Phong>

Ray Casting & Tracing Independent lighting calculation for every pixel

Ray Casting & Tracing

Ray Casting Find surface intersection point Visible surface detection Ray from eye to the screen pixel No reflection or refraction Direct illumination Visible surface detection Shadow calculation

Ray Tracing Recursive ray casting Inter-object light reflection effects Global (mutual) illumination For global reflection and transmission Highly realistic quality vs. computation time Overview Bounce (reflect) or refract the ray Collecting its intensity At each reflection point

Ray Tracing Example <Reflection and refraction ray paths through a scene for a screen pixel>

<Ray Tracing Tree> Left branch: reflection Right branch: transmission (refraction) Terminate when Reaches the defined maximum depth Strikes the light sources Accumulate the intensity From the bottom to top <Ray Tracing Tree>

Radiosity Goal Simulate diffuse inter-object reflections and shadows

Radiosity Basic Idea Treat every polygon as light source

Ray Tracing & Radiosity Characteristics Radiosity is good at diffuse inter-object reflection Ray tracing is good at specular inter-object reflection  Combine both approaches for each component!!!

Summary Polygon shading Ray casting Ray tracing Radiosity Flat shading Gouraud shading Phong shading Ray casting Ray tracing Recursive ray casting Inter-object reflection (global illumination) Highly realistic quality vs. computation time Radiosity Supported by OpenGL