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

Similar documents
Distribution Ray-Tracing. Programação 3D Simulação e Jogos

The Rendering Equation & Monte Carlo Ray Tracing

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

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

Local vs. Global Illumination & Radiosity

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

Anti-aliasing. Images and Aliasing

Advanced Shading I: Shadow Rasterization Techniques

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

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

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

CPSC GLOBAL ILLUMINATION

CS770/870 Spring 2017 Radiosity

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

6. Illumination, Lighting

CS770/870 Spring 2017 Radiosity

Sung-Eui Yoon ( 윤성의 )

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

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

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

Lightscape A Tool for Design, Analysis and Presentation. Architecture Integrated Building Systems

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

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.

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

Global Illumination The Game of Light Transport. Jian Huang

Wednesday, 26 January 2005, 14:OO - 17:OO h.

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

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

Radiosity. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

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

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

Photorealism vs. Non-Photorealism in Computer Graphics

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

CS-184: Computer Graphics. Today. Lecture #16: Global Illumination. Sunday, November 8, 2009

Photorealism. Ray Tracing Texture Mapping Radiosity

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

Computer Graphics Global Illumination

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

EECS 487: Interactive Computer Graphics

Ray tracing. EECS 487 March 19,

REYES REYES REYES. Goals of REYES. REYES Design Principles

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

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

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

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

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

Photorealism CS 460/560. Shadows Ray Tracing Texture Mapping Radiosity. Computer Graphics. Binghamton University. EngiNet. Thomas J.

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

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

Building a Fast Ray Tracer

Anti-aliasing and Monte Carlo Path Tracing

Topics and things to know about them:

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

Computer Graphics Global Illumination

Global Illumination and the Rendering Equation

Shadows. COMP 575/770 Spring 2013

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

Computer Graphics. Shadows

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

Global Illumination. COMP 575/770 Spring 2013

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Distributed Ray Tracing

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

Motivation: Monte Carlo Path Tracing. Sampling and Reconstruction of Visual Appearance. Monte Carlo Path Tracing. Monte Carlo Path Tracing

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

Interactive Methods in Scientific Visualization

COM337 COMPUTER GRAPHICS Other Topics

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

3D Rendering. Course Syllabus. Where Are We Now? Rendering. 3D Rendering Example. Overview. Rendering. I. Image processing II. Rendering III.

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

Monte Carlo Ray-tracing and Rendering

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

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

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

Final Project: Real-Time Global Illumination with Radiance Regression Functions

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

Philipp Slusallek Karol Myszkowski. Realistic Image Synthesis SS18 Instant Global Illumination

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

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

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

The Rendering Equation and Path Tracing

Computergrafik. Matthias Zwicker. Herbst 2010

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

Virtual Reality for Human Computer Interaction

The Traditional Graphics Pipeline

Chapter 9- Ray-Tracing

Computer Graphics. - Texturing Methods -

Chapter 11. Caustics and Global Illumination

03 RENDERING PART TWO

Illumination Models and Surface-Rendering Methods. Chapter 10

Rendering. Generate an image from geometric primitives II. Rendering III. Modeling IV. Animation. (Michael Bostock, CS426, Fall99)

CSE528 Computer Graphics: Theory, Algorithms, and Applications

The feature set you are required to implement in your ray tracer is as follows (by order from easy to hard):

Ray-Tracing. Misha Kazhdan

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

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

The Animation Process. Lighting: Illusions of Illumination

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

Transcription:

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

Sampling Ray Casting is a form of discrete sampling. Rendered Image: Sampling of the ground Truth at regular intervals Signal Frequency? Sampling Frequency? Ground Truth: An Exact Mathematic Representation

Anti-Aliasing Aliasing: A distortion or artifact as a result of sampling. Higher frequency removal Signal Sampled To reproduce the signal fully - Nyquist rate Related problem Moiré

Anti-Aliasing Staircasing Pixels on the boundary

Anti-Aliasing Anti-aliasing - The attempt to reduce or eliminate aliasing artifacts

Uniform Supersampling Instead of sampling one point in every pixel. Sample k 2 times (for some n) in uniform intervals Single Pixel - Single Sample Single Pixel - Multiple Sample Set the pixel color to the average of the k 2 colors sampled

Cast ray through pixel Constructing a ray through a pixel Parameters: Eye point P View direction - towards Up direction Field of view (xfov, yfov) Distance to screen d center of screen right = towards x up right and up define the orientation of the screen. up P c yfov P 0 and d define where it s at. P 0 right

Cast ray through pixel P c = P 0 + towards*d P is the pixel at (x pixel, y pixel ) = (2, 2) Calculate (x screen, y screen ) P = P c + x screen *right + y screen *up P up V = (P - P 0 ) / P - P 0 ray direction to P. V P c right yfov ray = P 0 + t*v P 0

Cast ray through pixel Transforming (x pixel, y pixel ) to (x screen, y screen ) xfov = 2.0 pixel-width = 320 px +x +up P c +right yfov = 2.0 +y pixel-height = 240 px Screen In Object Space Application Window

Uniform Supersampling P c = P 0 + towards*d P is the pixel at (x pixel, y pixel ) = (2.5, 2.5) Pixel coordinates can now have fractions Calculate (x screen, y screen ) P = P c + x screen *right + y screen *up P up V = (P - P 0 ) / P - P 0 ray direction to P. P c right yfov ray = P 0 + t*v V do this k 2 times, average results. P 0

Uniform Supersampling Where should you sample the pixel? 1 sample per pixel ¼ ¾ ¼ ¾ 0 ½ 1 0 0 0 ½ 1 ½ 1 ½ 1 4 sample per pixel 9 sample per pixel

Uniform Supersampling Global uniformity: Distance between Samples is always the same What NOT to do: Two samples in the same point

Uniform Supersampling

Adaptive Supersampling If the difference between adjacent samples is too great, divide the pixel to 4 and cast more rays Smooth pixels need only 4 samples Edges can still be reproduced smoothly Reuse common rays

Stochastic Sampling Uniform sampling often still can t account for frequency issues Sub-divide the pixel to a grid Choose a random point in every cell Makes the interval of sampling non-uniform Reduce aliasing by introducing noise

Questions?

Surface Parameterization How to add a 2D texture to a surface embedded in 3D? (x,y,z)

Surface Parameterization Simple case - rectangular plane u P 3 P 4 v P P 1 u [0,1], v [0,1] 1. Extract (u,v) from P 2. Get the pixel color at (u,v) P = -v * (P3-P1) + u * (P2-P1) Baricentric coordinates Equation P 2

Surface Parameterization Simple case - rectangular plane u P 3 P 4 v P P 1 u [0,1], v [0,1] 1. Extract (u,v) from P 2. Get the pixel color at (u,v) P = -v * (P3-P1) + u * (P2-P1) Baricentric coordinates Equation P 2

Surface Parameterization A Little more complex - Sphere u P v u [0,1], v [0,1] P = (x,y,z) (,,r) u =, v = 1. Extract (u,v) from P 2. Get the pixel color at (u,v) Sphertical Coordinates

Surface Parameterization General Case A Triangle Mesh

Questions?

Area Light So far we ve see only ideal light sources Light from infinity Point Light Spot Light These produce Hard Shadows Point Light Directed Light To Create a realistic Shadow one option is to use a more realistic light source Area Light

Area Light Point light - Hard Shadows Lighs Source Full Shadow Umbra

Area Light Simple area light - simulated using a uniform grid of point lights. Full Shadow Umbra Lighs Source Soft Shadow Penumbra

Area Light Disadvantages of the simple uniform method: Very time consuming If the grid resolution is low, artifacts appear in the shadows.

Area Light Monte-Carlo Area light Light is modeled as a sphere Highest intensity in the middle. Gradually fade out. Shoot n rays to random points in the sphere Average their value.

Monte Carlo vs Las Vegas Two types of randomized, probabilistic methods for constructing an algorithm Results are statistic Has an expectancy E(X) to be correct. Monte Carlo: Has a predictable time complexity. Result may not be correct. Better results the more you run it Las Vegas: Time complexity not guaranteed Always returns the correct answer Time Result Monte Carlo proof E(X) Las Vegas E(X) proof Convert Monte-Carlo to Las-Vegas?

Global Illumination In the real world light is everywhere. Reflects in every direction from every surface onto every surface. Anywhere in the world, light comes from infinite directions around. In the lighting equation we ve used the Ambient intensity to approximate this.

Monte-Carlo Path Tracing Conventional Ray Tracing: Cast rays from eye through each pixel Trace secondary rays to light sources and reflections

Monte-Carlo Path Tracing A generalization of the concept of Monte-Carlo area light Cast rays from eye through each pixel in a hemisphere Cast random rays from the visible point, average contributions

Monte-Carlo Path Tracing Cast rays from eye through each pixel Cast random rays from the visible point, average contributions Recurse

Monte-Carlo Path Tracing Cast rays from eye through each pixel Cast random rays from the visible point Recurse, accumulate contributions

Monte-Carlo Ray Tracing Cast random rays from the visible point Recurse, accumulate contributions Sample light from all points we visited

Monte-Carlo Path Tracing 1 random ray per pixel, 1 level recursion

Monte-Carlo Path Tracing 16 random rays per pixel, 3 level recursion

Monte-Carlo Path Tracing 64 random rays per pixel, 3 level recursion

Monte-Carlo Path Tracing 64 random rays per pixel, 3 level recursion Notice Color Bleed To White ball

Monte-Carlo Path Tracing 16 random rays per pixel 1 level recursion 16 random rays per pixel 100 level recursion

Glossary Ray Casting: Cast rays from eye through each pixel, find first hit Ray Tracing: Cast rays from eye through each pixel, find first hit Recourse- Ray changes course/divides into few rays Accumulate all results. Path Tracing Cast rays from eye through each pixel, find first hit Recourse- Shoot random rays in the reflect hemisphere Accumulate All results 1-3 rays per recursion step 1-100 rays per recursion step

Glossary Direct Illumination Find a interaction between objects and emitters of light How much light from light source X hits this point Ray Tracing Global Illumination Find interaction between objects and complete environment How much light hits this point, Indirect lighting Path Tracing Faked with The Ambient constant in the light equation. Radiosity Photon mapping

Radiosity (simplified) A different approach to Global Illumination Divide the scene into a set of small areas The radiosicy of a patch is the total amount of light emitted from it Calculate all the amount of light a patch receives from all other patches. Calculate the radiosity Iterate.

Radiosity Calculating the amount of light a patch receives Construct a Hemicube on the patch Render the scene on the hemicube Average the color.

Radiosity Rendering on a hemicube

Radiosity First Iteration Initial State Light emitted = Color * Light received

Radiosity 320 th Iteration 32 nd iteration Compute light emissions once, View from any angle!

Radiosity Direct Illumination Radiosity

Radiosity Surface Subdivision Using a uniform mesh? Wasteful. Smooth areas don t need a great level of detail Hierarchical subdivision Areas with large changes get subdivided.

Ray Tracing exercise Pair up!