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

Similar documents
Chapter 7 - Light, Materials, Appearance

Pipeline Operations. CS 4620 Lecture 10

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

Pipeline Operations. CS 4620 Lecture 14

Graphics for VEs. Ruth Aylett

3D Rasterization II COS 426

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

03 RENDERING PART TWO

9. Illumination and Shading

Interpolation using scanline algorithm

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

CS 488. More Shading and Illumination. Luc RENAMBOT

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

CS5620 Intro to Computer Graphics

CHAPTER 1 Graphics Systems and Models 3

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

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

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

Graphics for VEs. Ruth Aylett

Level of Details in Computer Rendering

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

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

Reflection and Shading

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

Lighting and Shading

Global Illumination. COMP 575/770 Spring 2013

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

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Illumination Models & Shading

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

The Traditional Graphics Pipeline

Photorealistic 3D Rendering for VW in Mobile Devices

Intro to Ray-Tracing & Ray-Surface Acceleration

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Illumination and Shading

CS 325 Computer Graphics

Lecture 12: Advanced Rendering

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

Sung-Eui Yoon ( 윤성의 )

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Virtual Reality for Human Computer Interaction

The Traditional Graphics Pipeline

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

The University of Calgary

CS 464 Review. Review of Computer Graphics for Final Exam

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

Graphics Hardware and Display Devices

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Computer Graphics I Lecture 11

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Shadows. COMP 575/770 Spring 2013

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

Introduction to Visualization and Computer Graphics

Introduction to Computer Graphics with WebGL

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Advanced Shading I: Shadow Rasterization Techniques

Models and Architectures

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Photorealism: Ray Tracing

Complex Shading Algorithms

History of computer graphics

Dithering and Rendering. CS116B Chris Pollett Apr 18, 2004.

Computer Graphics. Illumination and Shading

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

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

The Traditional Graphics Pipeline

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

SEOUL NATIONAL UNIVERSITY

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Review. Stephen J. Guy

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

CPSC / Illumination and Shading

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

Rasterization Overview

COMP371 COMPUTER GRAPHICS

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Real-Time Shadows. André Offringa Timo Laman

Supplement to Lecture 16

Deferred Rendering Due: Wednesday November 15 at 10pm

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

COMP environment mapping Mar. 12, r = 2n(n v) v

Photorealism vs. Non-Photorealism in Computer Graphics

How do we draw a picture?

Overview: Ray Tracing & The Perspective Projection Pipeline

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

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

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

Topics and things to know about them:

- Rasterization. Geometry. Scan Conversion. Rasterization

Shading. Shading = find color values at pixels of screen (when rendering a virtual 3D scene).

Local Illumination physics. Law of reflection and Snell s law of refraction

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Transcription:

Computer Graphics 1 Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering 1

The 3D rendering pipeline (our version for this class) 3D models in model coordinates 3D models in world coordinates 2D Polygons in camera coordinates Pixels in image coordinates Scene graph Camera Rasterization Animation, Interaction Lights 2

Local Illumination: Shading Local illumination: light calculations are done locally without the global scene no cast shadows (since those would be from other objects, hence global) object shadows are OK, only depend on the surface normal Loop over all polygons For each polygon: determine the pixels it occupies on the screen and their color draw using e.g., Z-buffer algorithm to get occlusion right Each polygon only considered once Each pixel considered multiple times 3

Flat shading Determine one surface normal for each triangle Compute the color for this triangle using e.g., the phong illumination model using the normal, camera and light positions Draw the entire triangle in this color neighboring triangles will have different shades visual crease between triangles cheapest and fastest form of shading can be a wanted effect, e.g. with primitives 4

Gouraud shading Determine normals for all mesh vertices i.e., triangle now has 3 normals Compute colors at all vertices using e.g., the phong illumination model using the 3 normals, camera and light positions Interpolate between these colors along the edges neighboring triangles will have smooth transitions if normals at a vertex are the same for all triangles using it simplest form of smooth shading specular highlights only if they fall on a vertex by chance 5

Phong Shading Determine normals for all mesh vertices Interpolate between these normals along the edges Compute colors at all vertices using e.g., the phong illumination model using the interpolated normal, camera and light positions neighboring triangles will have smooth transitions if normals at a vertex are the same for all triangles using it has widely substituted gouraud shading specular highlights in arbitrary positions have to compute phong illumination model for every pixel 6

Scan-line algorithms Sort all polygons by their top Y position in the image Scan through the image line by line load polygons which start there into memory discard polygons that have ended on the scan line before Draw all polygons currently loaded sort from left to right by intersecting edges with scan line using appropriate depth calculation (e.g., Z-Buffer) using appropriate lighting (e.g., phong illumination model) Only a small number of polygons considered in each line good for optimizing memory access and caching Each polygon only considered once Each pixel considered only once 7

Global illumination: Ray tracing Global illumination: light calculations are done globally considering the entire scene i.e. cast shadows are OK if properly calculated object shadows are OK anyway Ray casting: from the eye, cast a ray through every screen pixel find the first polygon it intersects with determine its color at intersection and use for the pixel also solves occlusion (makes Z-Buffer unnecessary) Ray tracing: recursive ray casting from intersection, follow reflected and refracted beams up to a maximum recursion depth http://pclab.arch.ntua.gr/03postgra/mladenstamenico/ (probably not original) 8

http://hof.povray.org/glasses.html 9

source: LMU München Blender Medieninformatik Gallery Andreas Butz Computergraphik 1 SS2010 10

source: Blender Gallery 11

Brainstorming: what makes Ray Tracing hard? 12

Recent development: Real Time Ray Tracing Various optimizations presented over the last few years Real time ray tracing has become feasible Follow http://openrt.de/ (images from there) 13

Global illumination: Radiosity source: Blender Gallery Simulation of energy flow in scene Can show color bleeding blueish and reddish sides of boxes Naturally deals with area light sources Creates soft shadows Only uses diffuse reflection does not produce specular highlights http://www.webreference.com/3d/lesson46/ 14

Radiosity algorithm Divide all surfaces into small patches For each patch determine its initial energy Loop until close to energy equilibrium loop over all patches determine energy exchange with every other patch radiosity solution : energy for all patches Recompute if changes http://en.wikipedia.org/wiki/file:radiosity_progress.png http://pclab.arch.ntua.gr/03postgra/mladenstamenico/ (probably not original) 15

source: Blender Gallery 16

Non-Photorealistic Rendering (NPR) Create graphics that look like drawings or paintings One method: stroke-based NPR instead of grey shades, determine a stroke density and pattern imitates pencil drawings or etchings (Kupferstich) Other methods: using image manipulation on rendered images can in principle often be done in photoshop http://www.cs.ucdavis.edu/~ma/siggraph02/course23/ Active field of research http://www.cs.ucdavis.edu/~ma/siggraph02/course23/ http://graphics.uni-konstanz.de/forschung/npr/watercolor/ many others http://www.katrinlang.de/npr/ 17