Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Similar documents
Intro to Shading Languages

Lecture 10: Part 1: Discussion of SIMT Abstraction Part 2: Introduction to Shading

Illumination and Shading

Rendering Light Reflection Models

Deferred Rendering Due: Wednesday November 15 at 10pm

Lecture 13: Reyes Architecture and Implementation. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

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

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

Lecture 4: Geometry Processing. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

CG Surfaces: Materials, Shading, and Texturing

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

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

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

Computer Graphics. Illumination and Shading

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

Introduction to Visualization and Computer Graphics

The Rendering Equation. Computer Graphics CMU /15-662

REYES REYES REYES. Goals of REYES. REYES Design Principles

Shading. Brian Curless CSE 457 Spring 2017

CPSC / Illumination and Shading

Objectives Shading in OpenGL. Front and Back Faces. OpenGL shading. Introduce the OpenGL shading methods. Discuss polygonal shading

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

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

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

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Shading I Computer Graphics I, Fall 2008

Rendering Light Reflection Models

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

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

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

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

Chapter 7 - Light, Materials, Appearance

Shading Languages Tim Foley

Light Reflection Models

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

Illumination & Shading: Part 1

Virtual Reality for Human Computer Interaction

Introduction to Computer Graphics with WebGL

Models and Architectures

Rendering approaches. 1.image-oriented. 2.object-oriented. foreach pixel... 3D rendering pipeline. foreach object...

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Shading. Brian Curless CSE 457 Spring 2015

CS452/552; EE465/505. Lighting & Shading

Shading and Illumination

Shading. Brian Curless CSE 557 Autumn 2017

History of computer graphics

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics V. Guoying Zhao 1 / 65

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

CS195V Week 9. GPU Architecture and Other Shading Languages

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

The Rendering Equation and Path Tracing

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

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

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

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Illumination & Shading I

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

Interactive Real-Time Raycasting

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

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

CS 4600 Fall Utah School of Computing

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

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

CS GPU and GPGPU Programming Lecture 3: GPU Architecture 2. Markus Hadwiger, KAUST

Level of Details in Computer Rendering

The Rasterization Pipeline

Outline of Lecture. Real-Time High Quality Rendering. Geometry or Vertex Pipeline. Basic Hardware Pipeline. Pixel or Fragment Pipeline

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

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

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

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Sung-Eui Yoon ( 윤성의 )

Comp 410/510 Computer Graphics. Spring Shading

AGGREGATE G-BUFFER ANTI-ALIASING

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

The Rasterization Pipeline

Illumination Models & Shading

Lecture 11of 41. Surface Detail 2 of 5: Textures OpenGL Shading

Lecture 2. Shaders, GLSL and GPGPU

CHAPTER 1 Graphics Systems and Models 3

Pipeline Operations. CS 4620 Lecture 14

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer

Pipeline Operations. CS 4620 Lecture 10

Lecture 6: Texture. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Comparing Reyes and OpenGL on a Stream Architecture

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

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

Rasterization Overview

Computer Graphics Coursework 1

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

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

Intro to Ray-Tracing & Ray-Surface Acceleration

CS348B: Image Synthesis

Global Illumination The Game of Light Transport. Jian Huang

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

CS 464 Review. Review of Computer Graphics for Final Exam

Assignment 6: Ray Tracing

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Transcription:

Lecture 10: Shading Languages Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011)

Review: role of shading languages Renderer handles surface visibility tasks - Examples: clip, cull, rasterizer, z-buffering - Highly optimized implementations on canonical data structures (triangles, fragments, and pixels) Impractical for rendering system to constrain application to use a single parametric model for surface definitions, lighting, and shading - Applications define these behaviors procedurally - Shading language is the interface between application-defined surface, lighting, material reflectance functions and the renderer

Some history: shade trees [Cook 84] Material: diffuse reflection coefficient (note multi-texturing) Diffuse reflectance Specular reflectance * + Material: specular reflection coeff * * +

Aside: more advanced light/surface interaction [Wann Jensen et al. 2001] BRDF BSSRDF Account for internal scattering Light exists surface from different location of location of incidence - Very important to matter translucent materials like skin, foliage, marble

Renderman shading language [Hanrahan and Lawson 90] High-level, domain-specific language - Domain: describing propagation of light through scene

What are the key RSL abstractions? Shaders - Surfaces - Lights - A few more types (but will not address them today) Light shader illuminate construct Surface shader illuminance loop (integrate light) Texturing primitives

Renderman shading language [Hanrahan and Lawson 90] Separate surface shaders from light source shaders Light source shaders describe distribution of energy from a light Surface shaders - Define surface reflectance distribution function (BRDF) - Integrate light from light sources

Recall: rendering equation [Kajiya 86] Surface shader Light shader computes i(x,x ) (accessed as L in RSL surface shader illuminance loop) x x i(x,x ) i(x,x ) x

Shading objects in RSL compiled code (plastic material) current transforms bound parameters kd = 0.5 ks = 0.3 Surface shader object compiled code (spotlight) current transforms bound parameters intensity =0.75 color = (1.0, 1.0, 0.5) position = (5,5,10) axis = (1.0, 1.0, 0) angle = 35 compiled code (point light) current transforms bound parameters position = (5,5,5) intensity =0.75 color = (1.0, 1.0, 0.5) Light shader objects (bound to surface) compiled code (point light) current transforms bound parameters position = (20,20,100) intensity =0.5 color = (0.0, 0.0, 1.0)

Light shaders Example: Attenuating spot-light (no area fall off) illuminate (light_pos, axis, angle) { Cl = my_light_color / (L. L) } light_pos axis L angle Ps

Surface shaders illuminance (position, axis, angle) { } Example: Computing diffuse reflectance surface diffusematerial(color Kd) { Ci = 0; Cl = Value computed by light shader // integrate light over hemisphere illuminance (P, Nn, PI/2) { Ci += Kd * Cl * (Nn. normalize(l)); } } L = Vector from light position (recall light_pos argument to light shader s illuminate) to surface position being shaded (see P argument to illuminance) Surface shader computes Ci

RSL design retrospective (switching to notes by Pat Hanrahan)

Cg (Class discussion)