Color in OpenGL Polygonal Shading Light Source in OpenGL Material Properties Normal Vectors Phong model

Size: px
Start display at page:

Download "Color in OpenGL Polygonal Shading Light Source in OpenGL Material Properties Normal Vectors Phong model"

Transcription

1 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 2

2 We know how to rasterze - Gven a 3D trangle and a 3D vewpont, we know whch pxels represent the trangle But what color should those pxels be? 3

3 Adds realsm to our objects Suppose we create a model of a sphere usng many polygons and color t wth glcolor. But our objectve s 4

4 n ths verson of OpenGL, the sphere s drawn from the front to the back. So f the depth test s cancelled, what we wll see s the back of the sphere. n another verson of OpenGL the results can be dfferent. 5

5 Lght-materal nteractons affect vertces appearance Due to ths nteracton, each vertex would have dfferent color and shade Need to consder - Lght sources - Materal propertes - Locaton of vewer - Surface orentaton 6

6 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 7

7 glcolor3f(red, green, blue) glcolor4f(red, green, blue, alpha) 8

8 s OpenGL lghtng enabled? NO YES Color determned by glcolor3f( ) gnorng: normals lghts materal propertes Color determned by shades Usng: normals lghts materal propertes 9

9 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 10

10 Shadng s defned as a smooth transton from one color to another Curved surfaces are approxmated by polygons Types of shadng are: - Flat shadng - Smooth Shadng 11

11 Enabled wth glshademodel(gl_flat) Shadng s constant across polygon Color of last vertex determnes nteror color Only sutable for very small polygons v2 v0 v1 12

12 Enable wth glshademodel(gl_smooth) nterpolate color n nteror Computed durng rasterzaton Much better than flat shadng More expensve to calculate v2 v0 v1 13

13 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 14

14 Lghtng n general must be enabled glenable(gl_lghtng) Each ndvdual lght must be enabled glenable(gl_lght0) OpenGL supports at least 8 lght sources There are 3 types of effects of lght source: Ambent Dffuse Specular 15

15 Ambent lght : Drectonless Objects are evenly lt on all surfaces n all drectons Objects are evenly shaded regardless of ther vewng angle Dffuse lght: Comes from a partcular drecton Reflected evenly off a surface Specular lght: Comes from a partcular drecton Reflected sharply and n a partcular drecton To make objects specular, both lght source and object must have specular property set 16

16 17

17 Use vectors (r, g, b, a) for lght propertes Beware: lght postons wll be transformed by the modelvew matrx GLfloat lght_ambent[] = {0.2, 0.2, 0.2, 1.0}; GLfloat lght_dffuse[] = {1.0, 1.0, 1.0, 1.0}; GLfloat lght_specular[] = {1.0, 1.0, 1.0, 1.0}; GLfloat lght_poston[] = {-1.0, 1.0, -1.0, 0.0}; gllghtfv(gl_lght0, GL_AMBENT, lght_ambent); gllghtfv(gl_lght0, GL_DFFUSE, lght_dffuse); gllghtfv(gl_lght0, GL_SPECULAR, lght_specular); gllghtfv(gl_lght0, GL_POSTON, lght_poston); 18

18 Drectonal lght gven by poston vector (parallel rays) GLfloat lght_poston[] = {-1.0, 1.0, -1.0, 0.0}; gllghtfv(gl_lght0, GL_POSTON, lght_poston); Pont source gven by poston pont (spotlght) GLfloat lght_poston[] = {-1.0, 1.0, -1.0, 1.0}; gllghtfv(gl_lght0, GL_POSTON, lght_poston); 19

19 A lght source whch located nsde the scene. Lght spreads n a cone shape Can be drected CUTOFF angle s between 0 to 90 unless t s 180. (ths s the defualt value) GLfloat lght_drecton[]={1,-1,-1,1}; gllghtfv(gl_lght0, GL_SPOT_DRECTON, lght_drecton); gllghtf(gl_lght0, GL_SPOT_CUTOFF, 45); 20

20 Lght sources are geometrc objects whose postons or drectons are affected by OpenGL matrces t s possble to: Move the lght source(s) wth the object(s) Move the lght source(s) and object(s) ndependently Fx the object(s) and move the lght source(s) Fx the lght source(s) and move the object(s) 21

21 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 22

22 Materal have certan reflectve color propertes Put a blue ball n a dark room wth only yellow lght, how would t looks lke? Materal propertes stay n effect untl changed GLfloat mat_a[] = {0.1, 0.5, 0.8, 1.0}; GLfloat mat_d[] = {0.1, 0.5, 0.8, 1.0}; GLfloat mat_s[] = {1.0, 1.0, 1.0, 1.0}; GLfloat low_sh[] = {5.0}; glmateralfv(gl_front, GL_AMBENT, mat_a); glmateralfv(gl_front, GL_DFFUSE, mat_d); glmateralfv(gl_front, GL_SPECULAR, mat_s); glmateralfv(gl_front, GL_SHNNESS, low_sh); glenable(gl_color_materal); 23

23 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 24

24 Defne unt normal before each vertex glnormal3f(nx, ny, nz); glvertex3f(x1, y1, z1); glvertex3f(x2, y2, z2); glvertex3f(x3, y3, z3); same normal for all vertces glnormal3f(nx1, ny1, nz1); glvertex3f(x1, y1, z1); glnormal3f(nx2, ny2, nz2); glvertex3f(x2, y2, z2); glnormal3f(nx3, ny3, nz3); glvertex3f(x3, y3, z3); dfferent normals 25

25 Length of normals changes under some modelvew transformatons (but not under translatons and rotatons) Ask OpenGL to automatcally re-normalze glenable(gl_normalze); 26

26 Color n OpenGL Polygonal Shadng Lght Source n OpenGL Materal Propertes Normal Vectors Phong model 27

27 cosne law (dot product) N L N L cos Nˆ Lˆ cos K ( Nˆ Lˆ) D D L N q L Surface

28 Phong Model Vˆ Rˆ cos(a) n max(0, Vˆ ˆ) R Phong exponent: apparent smoothness of the surface Vewer R a q N q L V K ( Vˆ Rˆ ) S S n L

29 Sngle lght source: Vewer R a q N q L V E K A A K D ( N L) K ( V L S R) n L

30 Multple lght sources: Vewer L 1 N L 2 V E K A A ( K D ( N L ) K S ( V R ) n )

31 Vsual llustraton of the Phong equaton: here the lght s whte, the ambent and dffuse colors are both blue, and the specular color s whte, reflectng a small part of the lght httng the surface. The ntensty of the dffuse component vares wth the drecton of the surface.

32 Shadow terms tell whch lght sources are blocked Cast ray towards each lght source L S = 0 f ray s blocked, S = 1 otherwse n S D A A E S R V K L N K K ) ) ( ) ( ( Shadow Term

33 R R n S D A A E K S R V K L N K K ) ) ( ) ( ( Also trace secondary rays from ht surfaces Global llumnaton from mrror reflecton and transparency

34 Trace secondary ray n drecton of mrror reflecton Evaluate radance along secondary ray and nclude t nto llumnaton model R R n S D A A E K S R V K L N K K ) ) ( ) ( ( Radance for mrror reflecton ray

35 E Materal Emsson A Global ambent Lght Source ntensty R Reflecton ntensty K A Materal Ambent K D Materal Dffuse K S Materal Specular K R Materal Reflecton S Lght Shadowed? n Materal Shnness Normalzed vectors: L ntersecton to lght N ntersecton normal V ntersecton to Eye R ntersecton to reflected lght n E K A A ( K D ( N L ) K S ( V R ) ) S K R R

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides) Computer Graphcs Jeng-Sheng Yeh 葉正聖 Mng Chuan Unversty (modfed from Bng-Yu Chen s sldes) llumnaton and Shadng llumnaton Models Shadng Models for Polygons Surface Detal Shadows Transparency Global llumnaton

More information

Scan Conversion & Shading

Scan Conversion & Shading Scan Converson & Shadng Thomas Funkhouser Prnceton Unversty C0S 426, Fall 1999 3D Renderng Ppelne (for drect llumnaton) 3D Prmtves 3D Modelng Coordnates Modelng Transformaton 3D World Coordnates Lghtng

More information

Scan Conversion & Shading

Scan Conversion & Shading 1 3D Renderng Ppelne (for drect llumnaton) 2 Scan Converson & Shadng Adam Fnkelsten Prnceton Unversty C0S 426, Fall 2001 3DPrmtves 3D Modelng Coordnates Modelng Transformaton 3D World Coordnates Lghtng

More information

Lighting. Dr. Scott Schaefer

Lighting. Dr. Scott Schaefer Lghtng Dr. Scott Schaefer 1 Lghtng/Illumnaton Color s a functon of how lght reflects from surfaces to the eye Global llumnaton accounts for lght from all sources as t s transmtted throughout the envronment

More information

Surface Mapping One. CS7GV3 Real-time Rendering

Surface Mapping One. CS7GV3 Real-time Rendering Surface Mappng One CS7GV3 Real-tme Renderng Textures Add complexty to scenes wthout addtonal geometry Textures store ths nformaton, can be any dmenson Many dfferent types: Dffuse most common Ambent, specular,

More information

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes SPH3UW Unt 7.3 Sphercal Concave Mrrors Page 1 of 1 Notes Physcs Tool box Concave Mrror If the reflectng surface takes place on the nner surface of the sphercal shape so that the centre of the mrror bulges

More information

5.2 Shading in OpenGL

5.2 Shading in OpenGL Fall 2017 CSCI 420: Computer Graphics 5.2 Shading in OpenGL Hao Li http://cs420.hao-li.com 1 Outline Normal Vectors in OpenGL Polygonal Shading Light Sources in OpenGL Material Properties in OpenGL Example:

More information

Shading in OpenGL. Outline. Defining and Maintaining Normals. Normalization. Enabling Lighting and Lights. Outline

Shading in OpenGL. Outline. Defining and Maintaining Normals. Normalization. Enabling Lighting and Lights. Outline CSCI 420 Computer Graphics Lecture 10 Shading in OpenGL Normal Vectors in OpenGL Polygonal Shading Light Source in OpenGL Material Properties in OpenGL Approximating a Sphere [Angel Ch. 6.5-6.9] Jernej

More information

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning Computer Anmaton and Vsualsaton Lecture 4. Rggng / Sknnng Taku Komura Overvew Sknnng / Rggng Background knowledge Lnear Blendng How to decde weghts? Example-based Method Anatomcal models Sknnng Assume

More information

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Caching. Irradiance Calculation. Advanced Computer Graphics (Fall 2009)

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Caching. Irradiance Calculation. Advanced Computer Graphics (Fall 2009) Advanced Computer Graphcs (Fall 2009 CS 29, Renderng Lecture 6: Recent Advances n Monte Carlo Offlne Renderng Rav Ramamoorth http://nst.eecs.berkeley.edu/~cs29-13/fa09 Dscusson Problems dfferent over years.

More information

Real-time. Shading of Folded Surfaces

Real-time. Shading of Folded Surfaces Rhensche Fredrch-Wlhelms-Unverstät Bonn Insttute of Computer Scence II Computer Graphcs Real-tme Shadng of Folded Surfaces B. Ganster, R. Klen, M. Sattler, R. Sarlette Motvaton http://www www.vrtualtryon.de

More information

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces Range mages For many structured lght scanners, the range data forms a hghly regular pattern known as a range mage. he samplng pattern s determned by the specfc scanner. Range mage regstraton 1 Examples

More information

Illumination Models. To calculate the color of an illuminated position on the

Illumination Models. To calculate the color of an illuminated position on the llumination Models 5 th Week, 2008 Sun-Jeong Kim Realistic Scene in CG Perspective projection of objects + natural lighting effects to the visible surface Light reflections, transparency, surface texture,

More information

Diffuse and specular interreflections with classical, deterministic ray tracing

Diffuse and specular interreflections with classical, deterministic ray tracing Dffuse and specular nterreflectons wth classcal, determnstc ray tracng Gergely Vass gergely_vass@sggraph.org Dept. of Control Engneerng and Informaton Technology Techncal Unversty of Budapest Budapest,

More information

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Fall 2009)

Discussion. History and Outline. Smoothness of Indirect Lighting. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Fall 2009) Advanced Computer Graphcs (Fall 2009 CS 283, Lecture 13: Recent Advances n Monte Carlo Offlne Renderng Rav Ramamoorth http://nst.eecs.berkeley.edu/~cs283/fa10 Dscusson Problems dfferent over years. Intally,

More information

Physics 132 4/24/17. April 24, 2017 Physics 132 Prof. E. F. Redish. Outline

Physics 132 4/24/17. April 24, 2017 Physics 132 Prof. E. F. Redish. Outline Aprl 24, 2017 Physcs 132 Prof. E. F. Redsh Theme Musc: Justn Tmberlake Mrrors Cartoon: Gary Larson The Far Sde 1 Outlne Images produced by a curved mrror Image equatons for a curved mrror Lght n dense

More information

REFRACTION. a. To study the refraction of light from plane surfaces. b. To determine the index of refraction for Acrylic and Water.

REFRACTION. a. To study the refraction of light from plane surfaces. b. To determine the index of refraction for Acrylic and Water. Purpose Theory REFRACTION a. To study the refracton of lght from plane surfaces. b. To determne the ndex of refracton for Acrylc and Water. When a ray of lght passes from one medum nto another one of dfferent

More information

Global Illumination and Radiosity

Global Illumination and Radiosity Global Illumnaton and Radosty CS535 Danel G. Alaga Department of Computer Scence Purdue Unversty Recall: Lghtng and Shadng Lght sources Pont lght Models an omndrectonal lght source (e.g., a bulb) Drectonal

More information

Global Illumination and Radiosity

Global Illumination and Radiosity Global Illumnaton and Radosty CS535 Danel G. Alaga Department of Computer Scence Purdue Unversty Recall: Lghtng and Shadng Lght sources Pont lght Models an omndrectonal lght source (e.g., a bulb) Drectonal

More information

Shading , Fall 2004 Nancy Pollard Mark Tomczak

Shading , Fall 2004 Nancy Pollard Mark Tomczak 15-462, Fall 2004 Nancy Pollard Mark Tomczak Shading Shading Concepts Shading Equations Lambertian, Gouraud shading Phong Illumination Model Non-photorealistic rendering [Shirly, Ch. 8] Announcements Written

More information

Barycentric Coordinates. From: Mean Value Coordinates for Closed Triangular Meshes by Ju et al.

Barycentric Coordinates. From: Mean Value Coordinates for Closed Triangular Meshes by Ju et al. Barycentrc Coordnates From: Mean Value Coordnates for Closed Trangular Meshes by Ju et al. Motvaton Data nterpolaton from the vertces of a boundary polygon to ts nteror Boundary value problems Shadng Space

More information

COMP250: Computer Graphics

COMP250: Computer Graphics COMP250: Computer Graphics Jérôme Waldispühl School of Computer Science McGill University Slides assembled from M. BlancheGe (McGill), T. Thorne (U. of Edinburgh) Slide by M. BlancheGe (McGill) Computer

More information

AP PHYSICS B 2008 SCORING GUIDELINES

AP PHYSICS B 2008 SCORING GUIDELINES AP PHYSICS B 2008 SCORING GUIDELINES General Notes About 2008 AP Physcs Scorng Gudelnes 1. The solutons contan the most common method of solvng the free-response questons and the allocaton of ponts for

More information

Global Illumination: Radiosity

Global Illumination: Radiosity Last Tme? Global Illumnaton: Radosty Planar Shadows Shadow Maps An early applcaton of radatve heat transfer n stables. Projectve Texture Shadows (Texture Mappng) Shadow Volumes (Stencl Buffer) Schedule

More information

Our objects so far have mostly looked as if they plan to stay home and watch

Our objects so far have mostly looked as if they plan to stay home and watch cgbook 2018/8/22 0:58 page 329 #357 CHAPTER 11 Color and Lght Our objects so far have mostly looked as f they plan to stay home and watch the game. It s tme now to dress up and go party. The goal for ths

More information

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information llumination Model Wireframe rendering simple, ambiguous Color filling flat without any 3D information Requires modeling interaction of light with the object/surface to have a different color (shade in

More information

Why we need shading?

Why we need shading? Why we need shading? Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like But we want Light-material interactions cause each point to have a different

More information

Electrical analysis of light-weight, triangular weave reflector antennas

Electrical analysis of light-weight, triangular weave reflector antennas Electrcal analyss of lght-weght, trangular weave reflector antennas Knud Pontoppdan TICRA Laederstraede 34 DK-121 Copenhagen K Denmark Emal: kp@tcra.com INTRODUCTION The new lght-weght reflector antenna

More information

Monte Carlo Rendering

Monte Carlo Rendering Monte Carlo Renderng Last Tme? Modern Graphcs Hardware Cg Programmng Language Gouraud Shadng vs. Phong Normal Interpolaton Bump, Dsplacement, & Envronment Mappng Cg Examples G P R T F P D Today Does Ray

More information

Consistent Illumination within Optical See-Through Augmented Environments

Consistent Illumination within Optical See-Through Augmented Environments Consstent Illumnaton wthn Optcal See-Through Augmented Envronments Olver Bmber, Anselm Grundhöfer, Gordon Wetzsten and Sebastan Knödel Bauhaus Unversty Bauhausstraße 11, 99423 Wemar, Germany, {olver.bmber,

More information

PHYS 219 Spring semester Lecture 20: Reflection of Electromagnetic Radiation: Mirrors and Images Formed by Mirrors

PHYS 219 Spring semester Lecture 20: Reflection of Electromagnetic Radiation: Mirrors and Images Formed by Mirrors PHYS 219 Sprng semester 2014 Lecture 20: eflecton of Electromagnetc adaton: Mrrors and Images Formed by Mrrors on efenberger Brck Nanotechnology Center Purdue Unversty Lecture 20 1 evew: Snapshot of an

More information

Some Tutorial about the Project. Computer Graphics

Some Tutorial about the Project. Computer Graphics Some Tutoral about the Project Lecture 6 Rastersaton, Antalasng, Texture Mappng, I have already covered all the topcs needed to fnsh the 1 st practcal Today, I wll brefly explan how to start workng on

More information

Illumination and Shading

Illumination and Shading Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture

More information

Interactive Rendering of Translucent Objects

Interactive Rendering of Translucent Objects Interactve Renderng of Translucent Objects Hendrk Lensch Mchael Goesele Phlppe Bekaert Jan Kautz Marcus Magnor Jochen Lang Hans-Peter Sedel 2003 Presented By: Mark Rubelmann Outlne Motvaton Background

More information

Global Illumination and Radiosity

Global Illumination and Radiosity Global Illumnaton and Radosty CS535 Danel lg. Alaga Department of Computer Scence Purdue Unversty Recall: Lghtng and Shadng Lght sources Pont lght Models an omndrectonal lght source (e.g., a bulb) Drectonal

More information

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision SLAM Summer School 2006 Practcal 2: SLAM usng Monocular Vson Javer Cvera, Unversty of Zaragoza Andrew J. Davson, Imperal College London J.M.M Montel, Unversty of Zaragoza. josemar@unzar.es, jcvera@unzar.es,

More information

DIFFRACTION SHADING MODELS FOR IRIDESCENT SURFACES

DIFFRACTION SHADING MODELS FOR IRIDESCENT SURFACES DIFFRACTION SHADING MODELS FOR IRIDESCENT SURFACES Emmanuel Agu Department of Computer Scence Worcester Polytechnc Insttute, Worcester, MA 01609, USA emmanuel@cs.wp.edu Francs S.Hll Jr Department of Electrcal

More information

Introduction to Radiosity

Introduction to Radiosity EECS 487: Interactve Computer Graphcs EECS 487: Interactve Computer Graphcs Renderng a Scene Introducton to Radosty John. Hughes and ndres van Dam rown Unversty The scene conssts of a geometrc arrangement

More information

Overview. Shading. Shading. Why we need shading. Shading Light-material interactions Phong model Shading polygons Shading in OpenGL

Overview. Shading. Shading. Why we need shading. Shading Light-material interactions Phong model Shading polygons Shading in OpenGL Overview Shading Shading Light-material interactions Phong model Shading polygons Shading in OpenGL Why we need shading Suppose we build a model of a sphere using many polygons and color it with glcolor.

More information

UNIT 2 : INEQUALITIES AND CONVEX SETS

UNIT 2 : INEQUALITIES AND CONVEX SETS UNT 2 : NEQUALTES AND CONVEX SETS ' Structure 2. ntroducton Objectves, nequaltes and ther Graphs Convex Sets and ther Geometry Noton of Convex Sets Extreme Ponts of Convex Set Hyper Planes and Half Spaces

More information

Global Illumination. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/26/07 1

Global Illumination. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/26/07 1 Global Illumnaton Computer Graphcs COMP 770 (236) Sprng 2007 Instructor: Brandon Lloyd 3/26/07 1 From last tme Robustness ssues Code structure Optmzatons Acceleraton structures Dstrbuton ray tracng ant-alasng

More information

Three-Dimensional Graphics V. Guoying Zhao 1 / 55

Three-Dimensional Graphics V. Guoying Zhao 1 / 55 Computer Graphics Three-Dimensional Graphics V Guoying Zhao 1 / 55 Shading Guoying Zhao 2 / 55 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material

More information

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading

More information

Finding Intrinsic and Extrinsic Viewing Parameters from a Single Realist Painting

Finding Intrinsic and Extrinsic Viewing Parameters from a Single Realist Painting Fndng Intrnsc and Extrnsc Vewng Parameters from a Sngle Realst Pantng Tadeusz Jordan 1, Davd G. Stork,3, Wa L. Khoo 1, and Zhgang Zhu 1 1 CUNY Cty College, Department of Computer Scence, Convent Avenue

More information

Surface Rendering Methods

Surface Rendering Methods Surface Rendering Methods 6 th Week, 2008 Sun-Jeong Kim Polygon Rendering Methods Determining the surface intensity at every projected pixel position using an illumination model Light-material interactions

More information

Structure from Motion

Structure from Motion Structure from Moton Structure from Moton For now, statc scene and movng camera Equvalentl, rgdl movng scene and statc camera Lmtng case of stereo wth man cameras Lmtng case of multvew camera calbraton

More information

Shading Intro. Shading & Lighting. Light and Matter. Light and Matter

Shading Intro. Shading & Lighting. Light and Matter. Light and Matter Shading Intro Shading & Lighting Move from flat to 3-D models Orthographic view of sphere was uniformly color, thus, a flat circle A circular shape with many gradations or shades of color Courtesy of Vincent

More information

2.2 Photometric Image Formation

2.2 Photometric Image Formation 2.2 Photometrc Image Formaton mage plane n source sensor plane optcs!1 Illumnaton Computer son ory s ten deeloped wth assumpton a pont source at nfnty. But een sun has a fnte extent (about 0.5 deg sual

More information

Illumination and Shading ECE 567

Illumination and Shading ECE 567 Illumination and Shading ECE 567 Overview Lighting Models Ambient light Diffuse light Specular light Shading Models Flat shading Gouraud shading Phong shading OpenGL 2 Introduction To add realism to drawings

More information

Slide 1 SPH3UW: OPTICS I. Slide 2. Slide 3. Introduction to Mirrors. Light incident on an object

Slide 1 SPH3UW: OPTICS I. Slide 2. Slide 3. Introduction to Mirrors. Light incident on an object Slde 1 SPH3UW: OPTICS I Introducton to Mrrors Slde 2 Lght ncdent on an object Absorpton Relecton (bounces)** See t Mrrors Reracton (bends) Lenses Oten some o each Everythng true or wavelengths

More information

Computer graphics III Light reflection, BRDF. Jaroslav Křivánek, MFF UK

Computer graphics III Light reflection, BRDF. Jaroslav Křivánek, MFF UK Computer graphcs III Lght reflecton, BRDF Jaroslav Křvánek, MFF UK Jaroslav.Krvanek@mff.cun.cz Basc radometrc quanttes Image: Wojcech Jarosz CG III (NPGR010) - J. Křvánek 2015 Interacton of lght wth a

More information

Illumination & Shading: Part 1

Illumination & Shading: Part 1 Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the

More information

Inverse Kinematics (part 2) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Spring 2016

Inverse Kinematics (part 2) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Spring 2016 Inverse Knematcs (part 2) CSE169: Computer Anmaton Instructor: Steve Rotenberg UCSD, Sprng 2016 Forward Knematcs We wll use the vector: Φ... 1 2 M to represent the array of M jont DOF values We wll also

More information

Shading and Illumination

Shading and Illumination Shading and Illumination OpenGL Shading Without Shading With Shading Physics Bidirectional Reflectance Distribution Function (BRDF) f r (ω i,ω ) = dl(ω ) L(ω i )cosθ i dω i = dl(ω ) L(ω i )( ω i n)dω

More information

Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading

Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading Objectives Shading in OpenGL Introduce the OpenGL shading methods - per vertex shading vs per fragment shading - Where to carry out Discuss polygonal shading - Flat - Smooth - Gouraud CITS3003 Graphics

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) CS380: Computer Graphics Illumination and Shading Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Course Objectives (Ch. 10) Know how to consider lights during rendering models

More information

Objectives. Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out

Objectives. Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out Objectives Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out 1 Steps in OpenGL shading Enable shading and select

More information

ESTIMATION OF INTERIOR ORIENTATION AND ECCENTRICITY PARAMETERS OF A HYBRID IMAGING AND LASER SCANNING SENSOR

ESTIMATION OF INTERIOR ORIENTATION AND ECCENTRICITY PARAMETERS OF A HYBRID IMAGING AND LASER SCANNING SENSOR ESTIMATION OF INTERIOR ORIENTATION AND ECCENTRICITY PARAMETERS OF A HYBRID IMAGING AND LASER SCANNING SENSOR A. Wendt a, C. Dold b a Insttute for Appled Photogrammetry and Geonformatcs, Unversty of Appled

More information

S1 Note. Basis functions.

S1 Note. Basis functions. S1 Note. Bass functons. Contents Types of bass functons...1 The Fourer bass...2 B-splne bass...3 Power and type I error rates wth dfferent numbers of bass functons...4 Table S1. Smulaton results of type

More information

Simulation and Animation of Fire

Simulation and Animation of Fire Smulaton and Anmaton of Fre Overvew Presentaton n Semnar on Motvaton Methods for smulaton of fre Physcally-based Methods for 3D-Games and Medcal Applcatons Dens Stenemann partcle-based flud-based flame-based

More information

Harmonic Coordinates for Character Articulation PIXAR

Harmonic Coordinates for Character Articulation PIXAR Harmonc Coordnates for Character Artculaton PIXAR Pushkar Josh Mark Meyer Tony DeRose Bran Green Tom Sanock We have a complex source mesh nsde of a smpler cage mesh We want vertex deformatons appled to

More information

Monte Carlo Integration

Monte Carlo Integration Introducton Monte Carlo Integraton Dgtal Image Synthess Yung-Yu Chuang 11/9/005 The ntegral equatons generally don t have analytc solutons, so we must turn to numercal methods. L ( o p,ωo) = L e ( p,ωo)

More information

Objectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.

Objectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading. Shading II 1 Objectives Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading Flat Smooth Gouraud 2 Phong Lighting Model A simple model

More information

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1 Today s class Simple shadows Shading Lighting in OpenGL Wednesday, November 21, 27 Computer Graphics - Class 1 1 Simple shadows Simple shadows can be gotten by using projection matrices Consider a light

More information

Dependence of the Color Rendering Index on the Luminance of Light Sources and Munsell Samples

Dependence of the Color Rendering Index on the Luminance of Light Sources and Munsell Samples Australan Journal of Basc and Appled Scences, 4(10): 4609-4613, 2010 ISSN 1991-8178 Dependence of the Color Renderng Index on the Lumnance of Lght Sources and Munsell Samples 1 A. EL-Bally (Physcs Department),

More information

6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm

6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm 6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm In this assignment, you will add an interactive preview of the scene and solid

More information

CS 325 Computer Graphics

CS 325 Computer Graphics CS 325 Computer Graphics 04 / 02 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Illumination modelling Ambient, Diffuse, Specular Reflection Surface Rendering / Shading models Flat

More information

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL: CS580: Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/gcg/ Recursive Ray Casting Gained popularity in when Turner Whitted (1980) recognized that recursive ray casting could

More information

Calibrating a single camera. Odilon Redon, Cyclops, 1914

Calibrating a single camera. Odilon Redon, Cyclops, 1914 Calbratng a sngle camera Odlon Redon, Cclops, 94 Our goal: Recover o 3D structure Recover o structure rom one mage s nherentl ambguous??? Sngle-vew ambgut Sngle-vew ambgut Rashad Alakbarov shadow sculptures

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lecture 15: Shading-I. CITS3003 Graphics & Animation Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional

More information

Lecture #15 Lecture Notes

Lecture #15 Lecture Notes Lecture #15 Lecture Notes The ocean water column s very much a 3-D spatal entt and we need to represent that structure n an economcal way to deal wth t n calculatons. We wll dscuss one way to do so, emprcal

More information

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic. Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary

More information

Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics

Fast, Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics Thrteenth Eurographcs Workshop on Renderng (2002) P. Debevec and S. Gbson (Edtors) Fast, Arbtrary BRDF Shadng for Low-Frequency Lghtng Usng Sphercal Harmoncs Jan Kautz 1, Peter-Pke Sloan 2 and John Snyder

More information

Analysis of Continuous Beams in General

Analysis of Continuous Beams in General Analyss of Contnuous Beams n General Contnuous beams consdered here are prsmatc, rgdly connected to each beam segment and supported at varous ponts along the beam. onts are selected at ponts of support,

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading () Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

Freeform Shading and Lighting Systems from Planar Quads

Freeform Shading and Lighting Systems from Planar Quads Freeform Shadng and Lghtng Systems from Planar Quads Cagu Jang, Jun Wang Kng Abdullah Unversty of Scence and Technology, Thuwal, Saud Araba Phllppe Bompas Archtect, 70 rue du Temple, Pars, France Helmut

More information

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects Displays almost always 2 dimensional. Depth cues needed to restore the third

More information

FEATURE EXTRACTION. Dr. K.Vijayarekha. Associate Dean School of Electrical and Electronics Engineering SASTRA University, Thanjavur

FEATURE EXTRACTION. Dr. K.Vijayarekha. Associate Dean School of Electrical and Electronics Engineering SASTRA University, Thanjavur FEATURE EXTRACTION Dr. K.Vjayarekha Assocate Dean School of Electrcal and Electroncs Engneerng SASTRA Unversty, Thanjavur613 41 Jont Intatve of IITs and IISc Funded by MHRD Page 1 of 8 Table of Contents

More information

PBRT core. Announcements. pbrt. pbrt plug-ins

PBRT core. Announcements. pbrt. pbrt plug-ins Announcements PBRT core Dgtal Image Synthess Yung-Yu Chuang 9/27/2007 Please subscrbe the malng lst. Wndows complaton Debuggng n Wndows Doxygen (onlne, download or doxygen by yourself) HW#1 wll be assgned

More information

Module 6: FEM for Plates and Shells Lecture 6: Finite Element Analysis of Shell

Module 6: FEM for Plates and Shells Lecture 6: Finite Element Analysis of Shell Module 6: FEM for Plates and Shells Lecture 6: Fnte Element Analyss of Shell 3 6.6. Introducton A shell s a curved surface, whch by vrtue of ther shape can wthstand both membrane and bendng forces. A shell

More information

Illumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface.

Illumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface. Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading

More information

Virtual Reality for Human Computer Interaction

Virtual Reality for Human Computer Interaction Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color

More information

CEng 477 Introduction to Computer Graphics Fall

CEng 477 Introduction to Computer Graphics Fall Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics Fall 2007 2008 Illumination Models and Surface Rendering Methods In order to achieve realism in computer generated

More information

ROBOT KINEMATICS. ME Robotics ME Robotics

ROBOT KINEMATICS. ME Robotics ME Robotics ROBOT KINEMATICS Purpose: The purpose of ths chapter s to ntroduce you to robot knematcs, and the concepts related to both open and closed knematcs chans. Forward knematcs s dstngushed from nverse knematcs.

More information

Fitting & Matching. Lecture 4 Prof. Bregler. Slides from: S. Lazebnik, S. Seitz, M. Pollefeys, A. Effros.

Fitting & Matching. Lecture 4 Prof. Bregler. Slides from: S. Lazebnik, S. Seitz, M. Pollefeys, A. Effros. Fttng & Matchng Lecture 4 Prof. Bregler Sldes from: S. Lazebnk, S. Setz, M. Pollefeys, A. Effros. How do we buld panorama? We need to match (algn) mages Matchng wth Features Detect feature ponts n both

More information

Accounting for the Use of Different Length Scale Factors in x, y and z Directions

Accounting for the Use of Different Length Scale Factors in x, y and z Directions 1 Accountng for the Use of Dfferent Length Scale Factors n x, y and z Drectons Taha Soch (taha.soch@kcl.ac.uk) Imagng Scences & Bomedcal Engneerng, Kng s College London, The Rayne Insttute, St Thomas Hosptal,

More information

Display Reflectance Model Based on the BRDF

Display Reflectance Model Based on the BRDF CITATION: E. F. Kelley, G. R. Jones, and T. A. Germer, "Dsplay Reflectance Model Based on the BRDF." Dsplays, Vol. 19, No. 1, June 30, 1998, pp. 27-34 (June 1998). Dsplay Reflectance Model Based on the

More information

Illumination & Shading

Illumination & Shading Illumination & Shading Goals Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can be used with real time graphics hardware Why we need Illumination

More information

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Programming For this assignment you will write a simple ray tracer. It will be written in C++ without

More information

TEST-05 TOPIC: OPTICS COMPLETE

TEST-05 TOPIC: OPTICS COMPLETE Q. A boy s walkng under an nclned mrror at a constant velocty V m/s along the x-axs as shown n fgure. If the mrror s nclned at an angle wth the horzontal then what s the velocty of the mage? Y V sn + V

More information

Reading. 14. Subdivision curves. Recommended:

Reading. 14. Subdivision curves. Recommended: eadng ecommended: Stollntz, Deose, and Salesn. Wavelets for Computer Graphcs: heory and Applcatons, 996, secton 6.-6., A.5. 4. Subdvson curves Note: there s an error n Stollntz, et al., secton A.5. Equaton

More information

Illumination and Shading

Illumination and Shading Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading

More information

Parallel Computation of the Functions Constructed with

Parallel Computation of the Functions Constructed with PDCS 013 (Ukrane, Kharkv, March 13-14, 013) Parallel Computaton of the Functons Constructed wth R-operatons usng CUDA Roman A. Uvarov Podgorny Insttute for Mechancal Engneerng Problems of NAS of Ukrane,

More information

Object Recognition Based on Photometric Alignment Using Random Sample Consensus

Object Recognition Based on Photometric Alignment Using Random Sample Consensus Vol. 44 No. SIG 9(CVIM 7) July 2003 3 attached shadow photometrc algnment RANSAC RANdom SAmple Consensus Yale Face Database B RANSAC Object Recognton Based on Photometrc Algnment Usng Random Sample Consensus

More information

Shading I Computer Graphics I, Fall 2008

Shading I Computer Graphics I, Fall 2008 Shading I 1 Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics

More information

Shape Representation Robust to the Sketching Order Using Distance Map and Direction Histogram

Shape Representation Robust to the Sketching Order Using Distance Map and Direction Histogram Shape Representaton Robust to the Sketchng Order Usng Dstance Map and Drecton Hstogram Department of Computer Scence Yonse Unversty Kwon Yun CONTENTS Revew Topc Proposed Method System Overvew Sketch Normalzaton

More information

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. Mach band effect The Mach band effect increases the visual unpleasant representation of curved surface using flat shading. A B 320322: Graphics and Visualization 456 Mach band effect The Mach band effect

More information

VISUAL SELECTION OF SURFACE FEATURES DURING THEIR GEOMETRIC SIMULATION WITH THE HELP OF COMPUTER TECHNOLOGIES

VISUAL SELECTION OF SURFACE FEATURES DURING THEIR GEOMETRIC SIMULATION WITH THE HELP OF COMPUTER TECHNOLOGIES UbCC 2011, Volume 6, 5002981-x manuscrpts OPEN ACCES UbCC Journal ISSN 1992-8424 www.ubcc.org VISUAL SELECTION OF SURFACE FEATURES DURING THEIR GEOMETRIC SIMULATION WITH THE HELP OF COMPUTER TECHNOLOGIES

More information

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements Module 3: Element Propertes Lecture : Lagrange and Serendpty Elements 5 In last lecture note, the nterpolaton functons are derved on the bass of assumed polynomal from Pascal s trangle for the fled varable.

More information