Homework 3: Shading, Raytracing, and Image Processing

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

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

w Foley, Section16.1 Reading

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

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

Topics and things to know about them:

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

Ray Tracer Due date: April 27, 2011

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

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

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

CS 488. More Shading and Illumination. Luc RENAMBOT

Homework #1. Displays, Alpha Compositing, Image Processing, Affine Transformations, Hierarchical Modeling

Illumination Models & Shading

Graphics Hardware and Display Devices

CS5620 Intro to Computer Graphics

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

Shading. Brian Curless CSE 557 Autumn 2017

The Traditional Graphics Pipeline

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

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

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

The Traditional Graphics Pipeline

CS 4620 Midterm, March 21, 2017

Lecture 11. More Ray Casting/Tracing

CMSC427 Final Practice v2 Fall 2017

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

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

Ray Tracing COMP575/COMP770

Shading. Brian Curless CSE 457 Spring 2017

Comp 410/510 Computer Graphics. Spring Shading

The Traditional Graphics Pipeline

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

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

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

EECS 487: Interactive Computer Graphics

Pipeline Operations. CS 4620 Lecture 10

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

TDA361/DIT220 Computer Graphics, January 15 th 2016

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

Ray Tracing Foley & Van Dam, Chapters 15 and 16

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

Shading I Computer Graphics I, Fall 2008

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

A Little Background. Motivation. Motivation

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

CS 325 Computer Graphics

Evolution of Imaging Technology in Computer Graphics. Related Areas

Draw Guide. Chapter 7 Working with 3D Objects

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CEng 477 Introduction to Computer Graphics Fall 2007

9. Illumination and Shading

COM337 COMPUTER GRAPHICS Other Topics

Assignment 6: Ray Tracing

Photorealistic 3D Rendering for VW in Mobile Devices

Ray Tracing. Last Time? Reading for Today. Reading for Today

Projections and Hardware Rendering. Brian Curless CSE 557 Fall 2014

Shadows. COMP 575/770 Spring 2013

Interpolation using scanline algorithm

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

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

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

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

CS384G Midterm Examination Spring 2008

Local vs. Global Illumination & Radiosity

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

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

Introduction to Computer Graphics 7. Shading

Ray-Tracing. Misha Kazhdan

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

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

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Intro to Ray-Tracing & Ray-Surface Acceleration

CS 4620 Program 3: Pipeline

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

Interactive Real-Time Raycasting

Chapter 7 - Light, Materials, Appearance

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Graphics for VEs. Ruth Aylett

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

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

Illumination & Shading

Computer Graphics. Illumination and Shading

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

Theoretically Perfect Sensor

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

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

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Computer Graphics. Rendering. by Brian Wyvill University of Calgary. cpsc/enel P 1

CS 130 Final. Fall 2015

CHAPTER 1 Graphics Systems and Models 3

CPSC / Illumination and Shading

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

Illumination and Shading

Lecture 21: Shading. put your trust in my shadow. Judges 9:15

Complex Shading Algorithms

Transcription:

Computer Graphics CSE 457, Spring 1999 Craig Kaplan Douglas Zongker Homework 3: Shading, Raytracing, and Image Processing Received: Friday May 7, 1999 Due: Friday May 21, 1999 DIRECTIONS Please provide short written answers to the questions in the space provided. If you require extra space, you may staple additional pages to the back of your assignment. Feel free to talk over the problems with your classmates, but please answer the questions on your own. NAME:

Problem 1. The Phong shading model can be summarized by the following equation: I phong ns [ k ( N L ) + k ( V R ) ] = ke + kai a + I l d i + s i + i min 1, a 1 + a d + a d i 2 0 1 i 2 i where the summation i is taken over all light sources. The variables used in the Phong shading equation are summarized below: I a 0 a 1 a 2 d i k e k a k d k s n s I a I li L i R i N V (a) Which of the quantities above are affected if... the viewing direction changes? the position of the i th light changes? the orientation of the surface changes?

Problem 1 - continued. (b) Blinn and Newell have suggested that, when V and L are assumed to be constants, the computation of V R can be simplified by associating with each light source a fictitious light source that will generate specular reflections. This second light source is located in a direction H halfway n between L and V. The specular component is then computed from ( N H) s + n instead of from ( V R) s. + Under what circumstances might L and V be assumed to be constant? How does the new equation using H simplify shading equations? (c) The ambient term in the Phong model is one way to guarantee that all visible surfaces receive some light. Another possibility is to use the "headlamp" method in which a point light source is positioned at the eye, but no ambient term is used. Are these two methods equivalent? If so, explain why. If not, describe a scene in which the results would be clearly different.

Problem 1 - continued. (d) Respond TRUE or FALSE to each of these statements and explain your reasoning. The Phong model is a physical simulation of the behavior of real-world light. For polished metal, the specular component n s would be large. A rough surface with many tiny microfacets is likely to have a large diffuse reflection coefficient. (e) Describe the relationships between N, L i, and R i that would result in a point shaded with the Phong model appearing maximally bright. (f) The equation above is not the only hallmark to Mister Phong s fame. We also talked in class about the difference between two polygon shading methods, one called Phong and one called Gouraud. Describe a scene where the difference between Phong and Gouraud shading would be noticeable.

Problem 2. (a) The company you work for has just bought rights to a raytracing engine. Unfortunately, you don t have the source code, just a compiled library. You have been asked to determine how rays are terminated. So, you call the authors you find out even they don t remember for sure. All they can tell you is this: The termination criteria for tracing rays is either (a) rays are traced to a maximum recursion depth of 5, or (b) rays are adaptively terminated based on their contribution to a pixel color. Describe a scene that can be used to determine which method is used. Be specific about all relevant aspects of the scene and what you would look for in the resulting image to determine which termination method is used.

Problem 2 - continued. (b) One of the features included in the raytracing engine your company bought is a brand new algorithm for antialiasing by adaptive supersampling. The normal implementation is to sample rays at the corner of every pixel, compare the colors of each sample, and if the difference between neighboring sample colors is too great, subdivide that region recursively and sample more times. (See the diagram below, or Foley, et al., 15.10.4) A B Scene geometry One pixel of image plane Another pixel of image plane Place where a ray is cast C D However, in this new algorithm, we subdivide and supersample if neighboring rays intersect different objects. In other words, note the lightgrey pixel above. Three of the four corner samples (a, b, and c) intersect the scene geometry. The fourth corner (d), misses the geometry completely. So we choose to supersample this pixel without ever comparing colors. In what ways is this better than the traditional way? In what ways is it worse?

Problem 2 - continued. (c) Your next job at your company is to go through old images in the archives and decide how they were built. One such 3D model is shown below, rendered from two different viewpoints. Describe the Constructive Solid Geometry (CSG) operations that might have yielded this shape. Note that we looking for how CSG could have formed this shape, including the names of the primitives used and what CSG operations were used to combine them. We are not expecting you to generate the transformations (scale, rotate, translate) that were used to move each primitive into position.

Problem 3. (a) Respond TRUE or FALSE to each of these statements and explain your reasoning. Mean filters can be used for smoothing an image as well as reducing noise. When using a mean filter, increasing the size of the filter sharpens the image. A median filter does a better job of throwing out impulse and salt and pepper noise than a mean filter. A median filter is a type of convolution filter.

Problem 3 - continued. (b) Convolution filtering can modify images in a variety of ways. Describe the expected effect of filtering an image using the following convolution kernel. Justify your answer. 1 3 1 3 16 3 1 3 1 (c) Some image I(i,j) is given as an array of greyscale values, each between 0 and 1. If we filter this image with the convolution kernel in part (b), we get a new image I (i,j). What are the maximum and minimum values the filtered image I (i,j) can take on at a particular pixel?

Problem 3 - continued. (d) Why might the following convolution kernel be a good choice for smoothing images taken from interlaced video? 1 38 1 1 1 8 16 8 1 1 1 (e) Suppose you had a digital photograph where the camera was moving downward at the exact instant the picture was taken. That is, everything in the image is blurred a little bit vertically, but not horizontally. Devise a convolution operator to sharpen this image. Note that a general sharpen filter would work, but for this special case, it can be done better.