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.:

Slides:



Advertisements
Similar presentations
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Advertisements

CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 6.
CSPC 352: Computer Graphics
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 고려대학교 컴퓨터 그래픽스 연구실.
Light Issues in Computer Graphics Presented by Saleema Amershi.
Illumination and Shading
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.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
Rendering (彩現 渲染).
IMGD 1001: Illumination by Mark Claypool
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
CS 376 Introduction to Computer Graphics 03 / 30 / 2007 Instructor: Michael Eckmann.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
Illumination and Shading
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Lighting & Shading.
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.
Shading Surface can either (both) 1.Emit light. E.g. light bult 2.Reflect light. E.g. Mirror.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
CS 445 / 645: Introductory Computer Graphics
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Shading I Shandong University Software College Instructor: Zhou Yuanfeng
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
19/17/ :25 UML Graphics: Conceptual Model Real Object Human Eye Display Device Graphics System Synthetic Model Synthetic Camera Real Light Synthetic.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
CS 325 Introduction to Computer Graphics 03 / 26 / 2010 Instructor: Michael Eckmann.
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
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
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.
Chris Mayer & Nic Shulver Shading Definitions Light emanating from small surfaces is called a Point light sourcee.g. the sun (not really small though!)
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[] =
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Illumination and Shading Sang Il Park Sejong University.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
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.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
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.
Unit-7 Lighting and Shading
Fundamentals of Computer Graphics Part 6 Shading
Isaac Gang University of Mary Hardin-Baylor
Illumination and Shading
Computer Graphics (Fall 2003)
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
Presentation transcript:

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.: Interactive Computer Graphics – A Top Down Approach with OpenGL, Addison Wesley, 2001

Fundamentals of Computer Graphics2 Shading – Light and Matter Our perception depends on: –light directly – intensity, spectrum (color), position –material of objects that “reflects” or “transmit” light, roughness, color of the surface Speed of computation – significant factor

Fundamentals of Computer Graphics3 Shading – Light and Matter Generally we do not need to compute all, but just those rays that contribute to the final image Methods: Global – ray tracing, radiosity – very slow Local – constant, Gouraud, Phong etc. – relatively fast

Fundamentals of Computer Graphics4 Shading – Light and Matter Interaction between light and materials can be classified as specular surfaces – ideal mirror diffuse surfaces – reflected light is ideally reflected to all directions uniformly translucent surfaces – allow some lights to penetrate the surface – refraction – glass, watter optical properties – Snell’s law

Fundamentals of Computer Graphics5 Shading – Light sources Light source – an object with a surface Each point (x,y,z) on the surface can emit light with characterization: direction of emission ( ,  ) intensity of energy emitted at each wavelength illumination function I(x,y,z, , , ) Basic light sources (sufficient for rendering the most simple scenes): ambient lighting point sources spotlights distance light

Fundamentals of Computer Graphics6 Shading – Light sources Light - an object with a surface Each point (x,y,z) on the surface can emit light with characterization: direction of emission ( ,  ) intensity of energy emitted at each wavelength illumination function I(x,y,z, , , ) Usually I = [ I r, I g, I b ] T is handled as a scalar value Basic light sources - sufficient for rendering the most simple scenes: ambient lighting point sources spotlights distance light

Fundamentals of Computer Graphics7 Shading – Light sources Ambient light I a - uniform light in the space (room etc.) Ideal point source – emits equally in all directions I(p 0 ) Light received at a point p full shadow – umbra partial shadow – penumbra for non-point sources (d is distance)

Fundamentals of Computer Graphics8 Shading – Light sources Spotlights – very narrow angles of emission, if  = 180° -> point source distribution of light within the cone – usually cos e (  ) ; e determines how rapidly intensity drops off cos(  ) = s T l s – vector that points from p s to a point s on a surface l – vector of the light direction

Fundamentals of Computer Graphics9 Shading – Distant light sources we replace location of light sources with their directions p 0 = [ x, y, z, 0 ] T ( 0 is correct !) Phong Reflection Model I = I a + I d + I s disadvantages linear model superposition

Fundamentals of Computer Graphics10 Ambient, Diffuse, Specular Reflections Ambient reflection 0  k a  1 I a = k a L a global ambient term or light Diffuse reflection characterized by rough surfaces perfectly diffuse surfaces – Lambertian surfaces

Fundamentals of Computer Graphics11 Ambient, Diffuse, Specular Reflections Lambert’s law: diffuse reflection 0  k d  1 if the influence of the distance is considered

Fundamentals of Computer Graphics12 Ambient, Diffuse, Specular Reflections Specular Reflection: 0  k s  1 as  ideal specular reflection   metallic surfaces

Fundamentals of Computer Graphics13 Polygonal Shading How to display surfaces with shading? Flat (constant) shading glShadeModel(GL_FLAT); Mach bands

Fundamentals of Computer Graphics14 Polygonal Shading Interpolative and Gouraud shading Gouraud shading glShadeModel(GL_SMOOTH); normal in a vertex average normal vector intensity computation for a vertex intensity & color interpolation for a scan-line

Fundamentals of Computer Graphics15 Polygonal Shading Phong shading normal in a vertex interpolation of a normal normal interpolation along the scan-line intensity computation Phong shading is almost always done off-line

Fundamentals of Computer Graphics16 Light Sources in OpenGL Study 6.6 – 6.9 on your own

Fundamentals of Computer Graphics17 Global Rendering – Ray tracing global versus local lightings models

Fundamentals of Computer Graphics18 Global Rendering – Ray tracing Algorithm complexity: O(M 2 N 2 k ) M – resolution of a screen N – number of objects k – number of levels of the tree Typical program: POV Ray – available free