From Graphics to Visualization

Similar documents
Illumination Models and Shading

Lighting Models. CS116B Chris Pollett Mar 21, 2004.

Complex Shading Algorithms

Visualisatie BMT. Rendering. Arjan Kok

CEng 477 Introduction to Computer Graphics Fall

Illumination Models & Shading

Illumination and Shading

Shading I Computer Graphics I, Fall 2008

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

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

Illumination & Shading

Introduction to Computer Graphics. Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces

Interpolation using scanline algorithm

CS5620 Intro to Computer Graphics

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Pipeline Operations. CS 4620 Lecture 14

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

Illumination & Shading: Part 1

Comp 410/510 Computer Graphics. Spring Shading

Pipeline Operations. CS 4620 Lecture 10

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

Introduction to Computer Graphics 7. Shading

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Computer Graphics. Illumination and Shading

Illumination and Shading

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

University of Victoria CSC 305 Shading. Brian Wyvill 2016

CSCI 4620/8626. Computer Graphics Illumination Models and Surface Rendering Methods (Chapter 17)

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

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

CPSC 314 LIGHTING AND SHADING

INF3320 Computer Graphics and Discrete Geometry

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Chapter 7 - Light, Materials, Appearance

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

CS230 : Computer Graphics Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

Computer Graphics I Lecture 11

Computer Graphics: 3-Local Illumination Models

Scan Conversion- Polygons

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Level of Details in Computer Rendering

Reflection and Shading

Lighting and Shading

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

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

Graphics and Interaction Surface rendering and shading

Lecture outline Graphics and Interaction Surface rendering and shading. Shading techniques. Introduction. Surface rendering and shading

-=Bui Tuong Phong's Lighting=- University of Utah, but with shaders. Anton Gerdelan Trinity College Dublin

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

Shading. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller/Fuhrmann

The Rasterization Pipeline

Illumination and Shading

Graphics for VEs. Ruth Aylett

Simple Lighting/Illumination Models

Illumination Models and Surface-Rendering Methods. Chapter 10

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

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Graphics and Visualization

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Graphics for VEs. Ruth Aylett

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

Interactive Real-Time Raycasting

Three-Dimensional Graphics V. Guoying Zhao 1 / 55

w Foley, Section16.1 Reading

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Shading. Why we need shading. Scattering. Shading. Objectives

Raytracing CS148 AS3. Due :59pm PDT

Computer Graphics and GPGPU Programming

CS Illumination and Shading. Slide 1

Rendering and Radiosity. Introduction to Design Media Lecture 4 John Lee

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Deferred Rendering Due: Wednesday November 15 at 10pm

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Illumination. Illumination CMSC 435/634

CSE 690: GPGPU. Lecture 2: Understanding the Fabric - Intro to Graphics. Klaus Mueller Stony Brook University Computer Science Department

Computer Graphics MTAT Raimond Tunnel

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Sung-Eui Yoon ( 윤성의 )

CS770/870 Spring 2017 Color and Shading

Computer Graphics Coursework 1


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

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Introduction to Visualization and Computer Graphics

Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Illumination in Computer Graphics

CPSC / Illumination and Shading

CS 325 Computer Graphics

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

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Homework #2. Shading, Ray Tracing, and Texture Mapping

Computer Graphics I. Assignment 3

Transcription:

From Graphics to Visualization

Introduction Light Sources Surface Lighting Effects Basic (Local ) Illumination Models Polgon-Rendering Methods Texture Mapping Transparenc and Blending Visualization Pipeline outline

Introduction Illumination Model (Lighting/Shading Model) Calculation of color on an illuminated position on the surface of an object Surface Rendering A procedure for appling a lighting model to obtain pixels colors for all projected surface positions

Light Sources Point Source Diverging ra paths from a point light source

Light Sources Distributed Light Source Light ras from an infinitel distant light source illuminate an object along nearl parallel light paths

Surface Lighting Effects Diffuse reflections from a surface (dull/rough surface) (shin surface) Specular reflection superimposed on diffuse reflection vectors (Global Illumination) Surface lighting effects are produced b a combination of illumination from light sources and reflection from other surfaces.

Illumination Models Rendering methods differ in approximating lighting effects Global illumination: ra tracing, accurate b computationall expensive Local illumination: relate the illumination of a given scene point directl to the light set, not to an other scene points If we denote the angle of incidence between the incoming Light direction and the surface

) Ambient Light I ambdif f ka I 2) Diffuse Reflection Basic (Local )Illumination a Models If we denote the angle of incidence between the incoming Light direction and the surface normal as θ Angle of incidence θ between the unit lightsource direction vector L and the unit normal vector N at a surface position.

2) Diffuse Reflection Basic (Local )Illumination Models I I,diff =K d I l cos θ I I,diff =K d I l (N L) k d : diffuse-reflection coefficient, or diffuse reflectivit. Lambertian reflectors Lambert s cosine law Total Diffuse-reflection of a single point-source illumination I diff kai a kai a, k I ( N d l L), if N L 0 if N L 0

Basic (Local )Illumination Models 3) Specular Reflection and Phong Model Specular reflection angle equals angle of incidence θ Phong Specular-Reflection Model (Phong Model) I l, spec I ksil ( V R) 0.0, W ( l, spec n s ) I, if V R if V R l cos n s 0 and N L 0 0 or N L 0 (2-4) (2-5)

Basic (Local )Illumination Models 3) Specular Reflection and Phong Model Modeling specular reflections (shaded area) with parameter n s The projection of either L or R onto the direction of the normal vector N has a magnitude equal to N L. R (2N L) N L

Basic (Local )Illumination Models 3) Specular Reflection and Phong Model Specular reflections from a spherical surface for varing specular parameter values and a single light source

Basic (Local )Illumination Models 3) Specular Reflection and Phong Model Halfwa vector H along the bisector of the angle between L and V. H L V L V

Color Intensit Calculations Phong Algorithm: I = I a + I d + I s I a: ambient reflection I d : diffuse reflection I s : specular reflection I l L N α α β R V I a =k a I e I d =k d I l cosα here cosα =(L N) I s =k s I l cos m β here cosβ=(r V) P L, N, R, V are vectors Multiple light sources: I I a n i I d r i i I s C i r constant Here r i is ithe distance to the light i and C is a i

Shading Technique To Render Solid Surfaces Determines How Surfaces Will Be Filled Process for Computing the Color Intensit Value for Each Pixel Contained in a Polgon The Most Common Shading Techniques Are: Flat Shading glshademodel (GL_FLAT); Gouraud Shading glshademodel (GL_SMOOTH); Phong Shading (OpenGL b default doesn't do phong shading )

Shading Techniques No Shading Flat Shading Gouraud Shading Phong Shading

Flat Shading

Flat Shading Constant Shading Or Flat Shading The Simplest and Cheapest and Therefore Fastest Shading Method Filling An Entire Polgon with One Color Intensit This Model is Onl Valid (Realistic) If: The light source is imagined to be at infinit The viewer is at infinit The polgon is not an approximation to a curved surface

Gouraud Shading

Gouraud Shading Also called Smooth shading Color Interpolation Algorithm Interpolation along polgon edges Interpolation across polgon surfaces V2 V V3 Color Values Given On A Per Vertex Basis Interpolation Along The Edges Interpolation Across The Surface

Gouraud Shading Illustration I 2 s ( x, ) 2 2 s I a I ( x, ) I s I b I 3 ( x, ) 3 3 I I ( ) I ( ) a s 2 2 s 2 I I I ( ) I ( ) b s 3 3 s 3 s x b x a I ( x x ) I ( x x ) a b s b s a I a j I, a, j Ia I I I I, I, I I j a 2 ( I I ) I 2 b, j b, j b b 3 ( I I ) I 3 i s i s s s x b x a ( I I ) b a

Phong Shading

Phong Shading An Interpolation Process Similar To Gouraud Shading Interpolation Over Normal Vector Instead of Vertex Color Normal vectors tell about an objects orientation Surface orientation is important in respect to the position of The observer/viewer of a scene The source of lighting Creates greater realism than Gouraud shading Speciall when combined with an illumination model Usuall implemented through application software Ver computing intense

Phong Shading Illustration (, ) x 2 2 (, ) x 3 3 s N N 3 N 2 N a N b N s ) ( ) ( 2 2 2 s s a N N N ) ( ) ( 3 3 3 s s b N N N ) ( ) ( a s b s b a a b s x x N x x N x x N ), ( x

Fill (Filled) Area Fill-Area Primitives -- An area filled with some solid color or a pattern Surface Tessellation -- Approximating a curved surface with polgon facets (a polgon mesh)

Texture Mapping Texture Mapping (a) Texture Image; (b) Texture-mapped object

Texture Mapping Texture Image

Texture Mapping Texture Mapping: Coordinates Transformations

Texture Mapping Texture Mapping

Transparenc and Blending The Gaussian Surface (a) as Background + (b) as Foreground => blended as (c) The Grid Height plot of e -(x^2+^2) drawn on top of the domain grid

Visualization Pipeline f( x, ) e ( x 2 2 ) Continuous data Data Acquisition float data[n_x,n_] Discrete dataset Data Mapping Class Quad Geometric object Rendering Displaed image