Smooth Shading Gouraud Phong

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

SI23 Introduction to Computer Graphics
7.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 7 Polygon Shading Techniques.
Computer Graphics Inf4/MSc Computer Graphics Lecture 13 Illumination I – Local Models.
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.
Computação Gráfica Coordenadas baricêntricas. Interp. shading for ray tracing Suppose we know colors or normals at vertices –How do we compute the color/normal.
Illumination and Shading
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Lighting/Shading III Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading III Week.
CS 4731: Computer Graphics Lecture 16: Illumination Models Part 2 Emmanuel Agu.
Graphics Programming: Polygon Filling
Lighting and Shading Comp 770 Lecture Notes Spring 2009.
(conventional Cartesian reference system)
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.
©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
1 Dr. Scott Schaefer Generalized Barycentric Coordinates.
Illumination and Shading
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
CS 445 / 645 Introduction to Computer Graphics Lecture 18 Shading Shading.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
1 Dr. Scott Schaefer Generalized Barycentric Coordinates.
1 Texture Mapping ©Anthony Steed Overview n Texture mapping Inverse and Forward Mapping Bilinear interpolation Perspective correction n Mipmapping.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
Shading & Texture. Shading Flat Shading The process of assigning colors to pixels. Smooth Shading Gouraud ShadingPhong Shading Shading.
08 |Lighting and Shading Eriq Muhammad Adams J |
Shading Examples shaderSphere1, 2, 3 & 4 of Chapter 6.
CS 325 Introduction to Computer Graphics 03 / 26 / 2010 Instructor: Michael Eckmann.
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
CS418 Computer Graphics John C. Hart
Komputer Grafik 2 (AK045206) Shading 1/17 Realisme : Shading.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
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.
CS 376 Introduction to Computer Graphics 04 / 02 / 2007 Instructor: Michael Eckmann.
Specular Reflection Lecture 27 Mon, Nov 10, 2003.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
Local Illumination and Shading
Unstructured Volume Rendering. Grid Types uniformrectilinearregularcurvilinear Structured Grids: regularirregularhybridcurved Unstructured Grids:
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
Schedule Update GP 4 – Tesselation/Cg GDS 4 – Subdiv Surf. GP 5 – Object Modeling Lab: Mini-proj Setup GDS 5 – Maya Modeling MCG 6 – Intersections GP 6.
Vectors – The Cross Product Lecture 13 Wed, Sep 24, 2003.
Computer Graphics Lecture 26 Mathematics of Lighting and Shading Part II Taqdees A. Siddiqi
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Birgit Hindman Lake Washington Technical College
A complete pipeline for 3D graphics
Algebra substitution.
Shadows Depth Map shadows Raytrace shadows.
Gouraud Shading with Bilinear Interpolation
Chapter 14 Shading Models.
CSC461: Lecture 23 Shading Computation
Vectors, Normals, & Shading
Introduction to Computer Graphics with WebGL
Introduction to Meshes
CSC418 Computer Graphics Shading Color.
Computer Graphics (Fall 2003)
Chapter 14 Shading Models.
Introduction to Meshes
Clipping Polygons Lecture 31 Fri, Nov 9, 2007.
Presentation transcript:

Smooth Shading Gouraud Phong CSE 681

Interpolate value(s) for point in face from values at vertices http://www.blancmange.info/notes/maths/vectors/primitives/ CSE 681

Compute normals at vertices For each vertex, v Nv = <0,0,0> For each face of vertex Compute face normal Nv += face normal Normalize Nv For each vertex, v Nv = <0,0,0> For each face Compute face normal For each vertex of face Nv += face normal Normalize Nv CSE 681

Interpolate value(s) for point in face from values at vertices Gouraud smooth shading: Compute normals at vertices Compute color at vertices Interpolate interior color CSE 681

Mach Band Effect Smoothly shaded objects Colors are continuous, but not derivatives Eye picks up on this and accentuates discontinuity CSE 681

Interpolate value(s) for point in face from values at vertices Phong smooth shading: Compute normals at vertices Interpolate interior normal Compute color at point CSE 681

Interpolate value(s) for point in face from values at vertices CSE 681

Interpolate value(s) scanline algorithms Interpolate down edges, across scanline CSE 681

Point sample Quadrilateral inverse binlinear map then use u,v values to interpolate CSE 681

Point sample Triangle compute barycentric coordinates then use to interpolate Pc b P a c Pa Pb Normalized so that a+b+c=1 P=aPa+bPb+cPc CSE 681

Area of a triangle - using vector algebra Pc Area = (1/2)h|Vab| h = |Vbc |sin(q) h Area = (1/2) |Vab| |Vbc |sin(q) Pa q |Vab x Vbc| = |Vab | |Vbc|sin(q) Pb Area = (1/2) |Vab x Vbc| CSE 681

Examples of smooth shading See links off of course web site CSE 681