Classic Rendering Pipeline

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

Screen Space & World Space

Sung-Eui Yoon ( 윤성의 )

CS380: Computer Graphics Screen Space & World Space. Sung-Eui Yoon ( 윤성의 ) Course URL:

Illumination and Shading

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

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

Sung-Eui Yoon ( 윤성의 )

Illumination & Shading: Part 1

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

Computer Graphics. Illumination and Shading

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

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

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Interactive Real-Time Raycasting

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

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

Illumination and Shading

03 RENDERING PART TWO

CSE 681 Illumination and Phong Shading

Raytracing CS148 AS3. Due :59pm PDT

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

Review for Ray-tracing Algorithm and Hardware

Shading I Computer Graphics I, Fall 2008

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

Visualisatie BMT. Rendering. Arjan Kok

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

Ray-Tracing. Misha Kazhdan

Local vs. Global Illumination & Radiosity

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

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

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

Shading and Illumination

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

Raytracing. COSC 4328/5327 Scott A. King

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

CPSC 314 LIGHTING AND SHADING

Illumination & Shading

w Foley, Section16.1 Reading

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Models and Architectures

Interacting with a 3D World

Comp 410/510 Computer Graphics. Spring Shading

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

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CGT521 Introduction to

Ray Tracing. Kjetil Babington

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

CS559: Computer Graphics. Lecture 12: OpenGL Li Zhang Spring 2008

to OpenGL Introduction Pipeline Graphics pipeline OpenGL pipeline OpenGL syntax Modeling Arrays Conclusion 1 Introduction Introduction to OpenGL

CS451Real-time Rendering Pipeline

The Traditional Graphics Pipeline

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

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

Turn on the Lights: Reflectance

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

Introduction to Visualization and Computer Graphics

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Illumination Models & Shading

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

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

The Traditional Graphics Pipeline

Complex Shading Algorithms

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

CS5620 Intro to Computer Graphics

Illumination & Shading

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Lighting affects appearance

Computer Graphics. Making Pictures. Computer Graphics CSC470 1

Pipeline Operations. CS 4620 Lecture 10

Reflection and Shading

Computer Graphics. Illumination and Shading

CPSC / Illumination and Shading

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

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

Lighting affects appearance

Rasterization Overview

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

7: Rendering (1) COMP Computer Graphics and Image Processing. Local illumination model. Global illumination model. Direct Direct.

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

COMP371 COMPUTER GRAPHICS

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

CS380: Computer Graphics 2D Imaging and Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL:

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

Photorealistic 3D Rendering for VW in Mobile Devices

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

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

Chapter 7 - Light, Materials, Appearance

Pipeline Operations. CS 4620 Lecture 14

Lecture 10: Ray tracing

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

The Traditional Graphics Pipeline

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

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Global Illumination. COMP 575/770 Spring 2013

Lighting and Shading

Transcription:

CS580: Classic Rendering Pipeline Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/gcg/

Course Objectives Understand classic rendering pipeline Just high-level concepts, not all the details Brief introduction of common under. CG Know its pros and cons 2

The Classic Rendering Pipeline Adopted in OpenGL and DirectX Most of games are based on this pipeline Object primitives defined by vertices fed in at the top Pixels come out in the display at the bottom 3

4 The Classic Rendering Pipeline

Your New World in OpenGL A 2D square ranging from (-1, -1) to (1, 1) You can draw in the box with just a few lines of code 5

Code Example OpenGL Code: glcolor3d(0.0, 0.8, 1.0); glbegin(gl_polygon); glvertex2d(-0.5, -0.5); glvertex2d( 0.5, -0.5); glvertex2d( 0.5, 0.5); glvertex2d(-0.5, 0.5); glend(); 6

OpenGL Command Syntax glcolor3d(0.0, 0.8, 1.0); Suffix Data Type Corresponding C-Type OpenGL Type b 8-bit int. singed char GLbyte s 16-bit int. short GLshort i 32-bit int. int GLint f 32-bit float float GLfloat d 64-bit double double GLdouble ub 8-bit unsinged int. unsigned char GLubyte us 16-bit unsigned int. unsigned short GLushort ui 32-bit unsigned int. unsigned int GLuint 7

Another Code Example OpenGL Code: glcolor3d(0.0, 0.8, 1.0); glbegin(gl_polygon); glvertex2d(-0.5, -0.5); glvertex2d( 0.5, -0.5); glvertex2d( 0.5, 0.5); glend() 8

Drawing Primitives in OpenGL 9 The red book

Yet Another Code Example OpenGL Code: glcolor3d(0.8, 0.6, 0.8); glbegin(gl_line_loop); for (i = 0; i < 360;i = i + 2) { x = cos(i*pi/180); y = sin(i*pi/180); glvertex2d(x, y); } glend(); 10

Triangle Representation, Mesh Triangles can approximate any 2-dimensional shape (or 3D surface) Polygons are a locally linear (planar) approximation Improve the quality of fit by increasing the number edges or faces 11

Modeling Transforms Performed by 4 by 4 matrix multiplication Start with 3D models defined in modeling spaces with their own modeling frames Modeling transformations orient models within a common coordinate frame called world space All objects, light sources, and the camera live in world space 12

Illumination Illuminate potentially visible objects Final rendered color is determined by object s orientation, its material properties, and the light sources in the scene 13

Illumination Illuminate potentially visible objects Final rendered color is determined by object s orientation, its material properties, and the light sources in the scene Lighting Local shading model considering direct illumination 14

OpenGL s Illumination Model numlights j j j j j j n Ir (k aia k didmax((n ˆ Lˆ j),0) k sismax((v ˆ s R) ˆ,0)) j 1 From Wikipedia 15

Ambient Light Source A simple hack for indirect illumination Incoming ambient illumination (I i,a ) is constant for all surfaces in the scene Reflected ambient illumination (I r,a ) depends only on the surface s ambient reflection coefficient (k a ) and not its position or orientation I k I r,a a i,a These quantities typically specified as (R, G, B) triples 16

Ideal Diffuse Reflection Ideal diffuse reflectors (e.g., chalk) Reflect uniformly over the hemisphere Reflection is view-independent Very rough at the microscopic level Follow Lambert s cosine law 17

Lambert s Cosine Law The reflected energy from a small surface area from illumination arriving from direction ˆL is proportional to the cosine of the angle between and the surface normal ˆN I I cosθ ˆL r i I (Nˆ L) ˆ i ˆL 18

Specular Reflection Specular reflectors have a bright, view dependent highlight E.g., polished metal, glossy car finish, a mirror At the microscopic level a specular reflecting surface is very smooth Specular reflection obeys Snell s law 19 Image source: astochimp.com and wiki

Viewing Transformations Maps points from world space to eye space Viewing position is transformed to the origin Viewing direction is oriented along some axis 20

Clipping and Projection We specify a volume called a viewing frustum Map the view frustum to the unit cube Clip objects against the view volume, thereby eliminating geometry not visible in the image Project objects into two-dimensions 21

Rasterization and Display Transform to screen space Rasterization converts objects pixels 22

Why we are using rasterization? Efficiency Reasonably quality 23

Fermi GPU Architecture 16 SM (streaming processors) 512 CUDA cores Memory interfaces 24

25

But what about other visual cues? Lighting Shadows Shading: glossy, transparency Color bleeding, etc. Generality 26 from Henrik s homepage

Recursive Ray Casting Gained popularity in when Turner Whitted (1980) recognized that recursive ray casting could be used for global illumination effects 27

Any Questions? Come up with one question on what we have discussed in the class and submit at the end of the class 1 for already answered questions 2 for typical questions 3 for questions with thoughts Submit questions at least four times before the mid-term exam Multiple questions for the class is counted as only a single time 28

Homework Go over the next lecture slides before the class Watch 2 SIGGRAPH videos and submit your summaries right brefore every Tue. class Just one paragraph for each summary 29 Example: Title: XXX XXXX XXXX Abstract: this video is about accelerating the performance of ray tracing. To achieve its goal, they design a new technique for reordering rays, since by doing so, they can improve the ray coherence and thus improve the overall performance.

Course Objectives were: Understand classic rendering pipeline Just high-level concepts, not all the details Brief introduction of common under. CG Know its pros and cons 30

Next Time Ray tracing 31