Rendering. Mike Bailey. Rendering.pptx. The Rendering Equation

Similar documents

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

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

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

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

On the conference DVDs. At the SIGGRAPH Education web site:

CS 488. More Shading and Illumination. Luc RENAMBOT

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing

The Rendering Equation and Path Tracing

Graphics for VEs. Ruth Aylett

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

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

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

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

MITOCW MIT6_172_F10_lec18_300k-mp4

Topics and things to know about them:

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

Global Illumination. COMP 575/770 Spring 2013

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

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

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

Photorealistic 3D Rendering for VW in Mobile Devices

CEng 477 Introduction to Computer Graphics Fall 2007

RASTERISED RENDERING

Mike Bailey Oregon State University.

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

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

COMP371 COMPUTER GRAPHICS

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

The Rendering Equation & Monte Carlo Ray Tracing

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

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

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

Previously... contour or image rendering in 2D

Lecture 18: Primer on Ray Tracing Techniques

Global Illumination The Game of Light Transport. Jian Huang

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Chapter 7 - Light, Materials, Appearance

Ray Tracing. Foley & Van Dam, Chapters 15 and 16

CPSC GLOBAL ILLUMINATION

Global Illumination and the Rendering Equation

Ray Tracing. Kjetil Babington

Ray Tracing Foley & Van Dam, Chapters 15 and 16

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Computer Graphics Global Illumination

Ray Tracer Due date: April 27, 2011

Introduction. Chapter Computer Graphics

521493S Computer Graphics. Exercise 3

Illumination Algorithms

Visible Surface Detection Methods

03 RENDERING PART TWO

Local vs. Global Illumination & Radiosity

Computer Graphics Global Illumination

Rasterization Overview

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

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

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

Virtual Reality for Human Computer Interaction

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

Shadows. COMP 575/770 Spring 2013

REAL-TIME GPU PHOTON MAPPING. 1. Introduction

Lighting. Figure 10.1

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

CS 325 Computer Graphics

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

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

Ray Tracing. Outline. Ray Tracing: History

Ray Tracing I. Internet Raytracing Competition

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

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

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Introduction to Radiosity

The Rendering Equation. Computer Graphics CMU /15-662

Luxo Jr. (Pixar, 1986) Last Time. Real Cameras and Ray Tracing. Standard Rasterization. Lights, Cameras, Surfaces. Now Playing:

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017

782 Schedule & Notes

Graphics and Games. Penny Rheingans University of Maryland Baltimore County

Photon Mapping. Due: 3/24/05, 11:59 PM

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Photorealism: Ray Tracing

Shadows in the graphics pipeline

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

Lecture 8 Ray tracing Part 1: Basic concept Yong-Jin Liu.

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

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Pipeline Operations. CS 4620 Lecture 10

Supplement to Lecture 16

CS Computer Graphics: Introduction to Ray Tracing

CS Computer Graphics: Introduction to Ray Tracing

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

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Volume Rendering. Computer Animation and Visualisation Lecture 9. Taku Komura. Institute for Perception, Action & Behaviour School of Informatics

Transcription:

1 Rendering This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License Mike Bailey mjb@cs.oregonstate.edu Rendering.pptx d i d 0 P P d i The Rendering Equation Ω d 0 2 P P B P, d 0,λ E P,d 0,λ + B P, d i, λ f λ, d i,d Ω 0 )(d i n dω This is the true rendering situation. Essentially, it is an energy balance: Light Shining from a point P = Light emitted by that point + Reflectivity * Σ(Light arriving from all other points) But, this is time-consuming to solve exactly. So, we need to know how much of an approximation we need 1

Rendering 3 Rendering is the process of creating an image of a geometric model. There are questions you need to ask: For what purpose am I doing this? How realistic do I need this image to be? How much compute time do I have to create this image? Do I need to take lighting into account? Does the illumination need to be global or will local do? Do I need to create shadows? Do I need to create reflections and refractions? How good do the reflections and refractions need to be? Local vs. Global Illumination 4 Local Global If the appearance of an object is only affected by its own characteristics and the characteristics of the light sources, then you have Local Illumination. If the appearance of an object is also affected by the appearances of other objects, then you Computer have Global Graphics Illumination. 2

Local Illumination at Work 5 If the appearance of an object is only affected by its own characteristics and the characteristics of the light sources, then you have Local Illumination. OpenGL rendering uses Local Illumination. Global Illumination at Work 6 The left wall is green. The right wall is red. The back wall is white. The ceiling is blue with a light source in the middle of it. The objects sitting on the floor are white. If the appearance of an object is also affected by the appearances of other objects, then you have Global Illumination. http://www.swardson.com/unm/tutorials/mentalray3/ 3

Two Directions for the Rendering to Happen 7 1. Starts at the object, works towards the eye 2. Starts at the eye, works towards the object Starts at the Object, Works Towards the Eye 8 This is the kind of rendering you get on a graphics card (e.g., OpenGL). You have been doing this all along. Start with the geometry and project it onto the pixels. 4

How do things in front look like they are really in front? 9 Your application might draw this cube s polygons in 1-2-3-4-5-6 order, but 1, 3, and 4 still need to look like they were drawn last: 4 5 1 3 6 2 Solution #1: Sort your polygons in 3D by depth and draw them back-to-front. In this case 1-2-3-4-5-6 becomes 5-6-2-4-1-3. This is called the Painter s Algorithm. It sucked to have to do things this way. How do things in front look like they are really in front? 10 Your application might draw this cube s polygons in 1-2-3-4-5-6 order, but 1, 3, and 4 still need to look like they were drawn last: 4 5 1 3 6 2 Solution #2: Add an extension to the framebuffer to store the depth of each pixel. This is called a Depthbuffer or Z-buffer. Only allow pixel stores when the depth of the incoming pixel is closer to the viewer than the pixel that is already there. 5

11 Incoming RGBZ Compare No Z incoming closer to the viewer than Z existing? Yes Do nothing Allow RGBZ incoming to overwrite RGBZ existing Existing RGBZ Starts at the Eye, Works Towards the Objects 12 The most common approach in this category is ray-tracing: Splat! The pixel is painted the color of the nearest object that is hit. 6

Starts at the Eye 13 It s also straightforward to see if this point lies in a shadow: Fire another ray towards each light source. If the ray hits anything, then the point does not receive that light. Starts at the Eye 14 It s also straightforward to handle reflection normal Fire another ray that represents the bounce from the reflection. Paint the pixel the color that this ray sees. 7

Starts at the Eye 15 It s also straightforward to handle refraction normal Fire another ray that represents the bend from the refraction. Paint the pixel the color that this ray sees. Determining Ray-Shape Intersections 16 Eye x E t P E y E t P E z E t P E t 1. Pixel At Bt C 0 solve substitute collect terms 1. t = 3 cases: x x y y z z R 2. 3. 8

IronCAD Ray-tracing Example 17 Blender Ray-tracing Example 18 Refraction Reflection 9

More Ray-tracing Examples 19 Quake 4 Ray-Tracing Project More Ray-tracing Examples 20 IBM s Cell Interactive Ray-tracer 10

More Ray-tracing Examples 21 Bunkspeed Subsurface Scattering 22 Subsurface Scattering mathematically models light bouncing around within an object before coming back out. This is a good way to render skin, wax, milk, etc. Subsurface scattering Original rendering 11

Another From-the-Object Method -- Radiosity 23 Based on the idea that all surfaces gather light intensity from all other surfaces The fundamental radiosity equation is an energy balance that says: The light energy leaving surface i equals the amount of light energy generated by surface i plus surface i s reflectivity times the amount of light energy arriving from all other surfaces BA EA B AF i i i i i j j j i j This is a very good approximation to the Rendering Equation The Radiosity Equation 24 B i A i E i i Fj B A E A B A F i i i i i j j j i j is the light energy intensity shining from surface element i is the area of surface element i is the internally-generated light energy intensity for surface element i is surface element i s reflectivity i is referred to as the Shape Factor, and describes what percent of the energy leaving surface element j arrives at surface element i 12

The Radiosity Shape Factor 25 cos cos F visibility( di, dj) da da i j j i 2 j i Dist( di, dj) Ai Aj Does it seem to you that the light just keeps propagating and you never get an answer? 26 To many people, radiosity seems like this: Use x to get y Use y to get x y = 3x + 5 x = y - 7 x produces y, then y produces x, then x produces y, then Not really it is simply N equations, N unknowns you solve for the unique solution -3x + y = 5 x - y = -7 x = 1 y = 8 13

The Radiosity Matrix Equation 27 Expand B A E A B A F i i i i i j j j i j For each surface element, and re-arrange to solve for the surface intensities, the B s: 1 1F1 1 1F1 2 1F1 N B1 E1 2F2 1 1 2F2 2 2F 2 N B 2 E 2 F F 1 F B E N N 1 N N 2 N N N N N This is a lot of equations! Radiosity Examples 28 Cornell University Cornell University 14

Radiosity Examples 29 AR Toolkit Autodesk Path Tracing 30 Somewhat like radiosity where light can bounce around the scene, but has more sophisticated effects. 15

Path Tracing 31 Path Tracing 32 16

Path Tracing 33 Path Tracing 34 Clearly this is capable of spawning an infinite number of rays. How do we handle this? Monte Carlo simulation to the rescue! Each time a ray hits a surface, use the equation at that point. Continue until 1. Nothing is hit 2. A light is hit 3. Some maximum number of bounces are found LightGathered ResultOfRaysCastInRandomDirection N Recurse by applying this equation for all ray hits (yikes!) 17

Path Tracing using the Blender Cycles Renderer 35 Reflection Non-point Light Source Soft Shadows Refraction Attempt at Caustics 18