Illumination Model & Surface-rendering Method 2001.07.25 박 경 와.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

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.
Shadow Rendering Techniques A point is in the shadow of a light source if it can not be “seen” by the light source, i.e. the line segment that connects.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
May Visible Surface Detection Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
1 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
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.
Course Website: Computer Graphics 18: Ray-tracing.
Computer Graphics - Class 10
IMGD 1001: Illumination by Mark Claypool
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
7M836 Animation & Rendering
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.
Lecture 8 Advanced Rendering – Ray Tracing, Radiosity & NPR.
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.:
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
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.
-Global Illumination Techniques
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Graphics.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
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.
Komputer Grafik 2 (AK045206) Shading 1/17 Realisme : Shading.
Illumination and Shading
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
CS 376 Introduction to Computer Graphics 04 / 02 / 2007 Instructor: Michael Eckmann.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Local Illumination and Shading
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
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.
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
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)
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.
Shading To determine the correct shades of color on the surface of graphical objects.
Unit-7 Lighting and Shading
RAY TRACING.
Chapter 14 Shading Models.
CSC461: Lecture 23 Shading Computation
Illumination and Shading
Fundamentals of Computer Graphics Part 6 Shading
SHADING MODELS FOR POLYGONS
Illumination and Shading
GR2 Advanced Computer Graphics AGR
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Presentation transcript:

Illumination Model & Surface-rendering Method 박 경 와

Contents ILLUMINATION MODELS – Ambient light, Diffuse reflection, Specular reflection – Illumination in the Phong model POLYGON-RENDERING METHODS – Flat shading – Gouraud shading – Phong shading – Comparision each methods – Ray Tracing Basic Algorithm Methods for getting better quality

BASIC ILLUMINATION MODELS

Ambient Light Color does not depend on the position, only on the object I=IaKa ( Ia : ambient light intensity, Ka: ambient reflection coefficient) Very Crude Model – Object shape is in invisible – But user nevertheless to hide other models artifacts

Ambient Light Example Increasing Ka

Diffuse Reflection Light from the light source is sent in every direction Object aspect independent from viewer position Only depends on relative position of light source I = Ip Kd cos Ø (Ip : point light source intensity Kd : Diffuse reflection coeffcient)

Diffuse Reflection Example Increasing Kd ( Ka=0)

Diffuse + Ambient Increasing Kd Increasing ka

Specular Reflection Light reaching the object is reflected in the direction having the same angle With point light source, effect is visible only at the one point on the surface Useful for indirect illumination (reflection and shadows)

Specular Reflection In the Phong model – Imperfect specular reflector I = IpK s (cosα) n α : angle between reflection and view point Figure. Left and right Imperfect Specular reflector

Phong Model Treats point light sources only Models three types of reflected light – Ambient + diffuse + imperfect specular reflector – I = IaKa + Ip {Kdcosθ + Ks(cosα) n } No physical meaning model

Phong Model Increasing n Ks

POLYGON-RENDERING METHODS

Constant-Intensity Shading Flat Shading – A fast and simple method – Assign all pixels inside each polygon same color V N4 N3 N2 N1 Figure. The normal vector at vertex V calculated as the average of the surface normals for each polygon sharing that vertex

Constant-Intensity Shading Example 1) Image with flat shading

Gouraud Shading Take the colors at the vertices Interpolate these colors across the edges and across the scan lines Typically linear interpolation RGB 1 RGB 2 RGB 3 J K Scan line Interpolated colors

Gouraud Shading Example 2) Image with Gouraud shading and specular highlights.

Phong Shading Take the normals at the vertices Interpolate these normals across the edges and Across the scan lines normal 1 normal 2 normal 3 J K Scan line Interpolated nomals

Phong Shading Example 3) Image with Phong shading and specular highlights.

Comparision Flat shading – The simplest shading method Difference of two shading models – Phong shading is more accurate way of shading a polygon since the illumination model is applied to every point – More computationally intensive than the Gouraud Illumination model is applied more often Interpolated normals need to be normalized

Comparision a) Flat shading b) Gouraud shading c) Phong shading

RAY TRACING METHOD

Ray Tracing One of the shading method To create several kinds of effects – Very difficult or even impossible to do with other methods Include three items – Reflection – Transparency – Shadow

For each pixel ray – Test each surface if it is intersected – Intersected Calculated the distance from the pixel to the surface intersection point The smallest value is visible surface for that pixel – Reflection ray Secondary ray Along specular path – Transparent Send a ray through the surface in the refraction direction Basic Ray-Tracing Algorithm Figure. Ray Tracing

Each secondary ray (reflection or refraction ray) – Repeated the same procedure Objects are tested for intersection The nearest surface along secondary ray path is used to recursively production the next generation of reflection and refraction path – Ray tracing tree Each successively intersected surface is added to a binary ray- tracing tree Basic Ray-Tracing Algorithm Figure. Ray Tracing

Left branch  Reflection Right branch  Transmission Terminated – Reach the preset maximum – Strike a light source Pixel intensity – Sum of intensities at root node – Start at terminal node – Background intensity If tree is empty Ray-Tracing Tree Figure. Ray Trace and Ray-Tracing tree

Reducing Object-Intersection Calculation Ray surface intersection calculation – 95 percent of the processing time in a ray tracer – Spent most of processing time checking objects that are not visible along the ray path Enclose groups of adjacent objects within a bounding volume Check larger boundary volume and,if necessary, smaller boundary volume; and so on.

Space-Subdivision Method The other way to reduce intersection calculation Enclose a scene within a cube Uniform subdivision – (a) – Subdivided the cube into eight equal-size octants at each step Adaptive subdivision – (b) – Only subdivided cube containing objects Example - a Example - b

Anti-aliased Ray Tracing Two basic techniques – Supersampling The pixel is treated as a finite square area instead of a single point – Adaptive sampling Uses unevenly spaced rays in some reason of the pixel area Ex. More rays can be used near object edges to obtains a better estimate of the pixel intensities

Intensity Function I E : Emitted Intensity  K A, K D, K s : Ambient /Diffuse /Specular reflection coefficient  I AL : Ambient-light Intensity  N : Unit normal vector  L i : Unit direction vector to the I-th point light source from a position on the surface  I i : the intensity of the I-th point light source  V : Unit viewing direction vector  R : Specular-reflection direction vector P14 P16