TDA361/DIT220 Computer Graphics, January 15 th 2016

Similar documents
TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

CS 130 Final. Fall 2015

Topics and things to know about them:

CS 130 Exam I. Fall 2015

CHAPTER 1 Graphics Systems and Models 3

Ray Tracer Due date: April 27, 2011

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

CS 465 Program 5: Ray II

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

CS 464 Review. Review of Computer Graphics for Final Exam

Chapter 7 - Light, Materials, Appearance

The University of Calgary

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

The Traditional Graphics Pipeline

Raytracing CS148 AS3. Due :59pm PDT

Pipeline Operations. CS 4620 Lecture 14

The Traditional Graphics Pipeline

Speeding up your game

CS 130 Exam I. Fall 2015

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

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

Institutionen för systemteknik

CS 4620 Midterm, March 21, 2017

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

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

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

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

The Traditional Graphics Pipeline

CS451Real-time Rendering Pipeline


CPSC GLOBAL ILLUMINATION

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

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

Assignment 2 Ray Tracing

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Queen s University CISC 454 Final Exam. April 19, :00pm Duration: 3 hours. One two sided aid sheet allowed. Initial of Family Name:

COMP371 COMPUTER GRAPHICS

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

Spatial Data Structures and Speed-Up Techniques. Ulf Assarsson Department of Computer Science and Engineering Chalmers University of Technology

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

Deferred Rendering Due: Wednesday November 15 at 10pm

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

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

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

CS 4620 Program 4: Ray II

Midterm Exam! CS 184: Foundations of Computer Graphics! page 1 of 13!

CS 4620 Program 3: Pipeline

CS 4620 Midterm 1. Tuesday 22 October minutes

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

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

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

Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

Global Illumination. COMP 575/770 Spring 2013

U.C. Berkeley, EECS, Computer Science TAKE HOME EXAM. Your Class Computer Account: DO NOT OPEN THIS INSIDE SODA HALL -- WAIT UNTIL YOU ARE ALONE!

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

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

Motivation. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

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

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

lecture 18 - ray tracing - environment mapping - refraction

Acceleration Data Structures

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Intro to Ray-Tracing & Ray-Surface Acceleration

Advanced Ray Tracing

RASTERISED RENDERING

Shading 1: basics Christian Miller CS Fall 2011

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

Motivation. Advanced Computer Graphics (Fall 2009) CS 283, Lecture 11: Monte Carlo Integration Ravi Ramamoorthi

CEng 477 Introduction to Computer Graphics Fall 2007

Adaptive Point Cloud Rendering

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections

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

lecture 21 volume rendering - blending N layers - OpenGL fog (not on final exam) - transfer functions - rendering level surfaces

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

Graphics 2009/2010, period 1. Lecture 8: ray tracing

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Blue colour text questions Black colour text sample answers Red colour text further explanation or references for the sample answers

Computer Graphics Coursework 1

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

Course Title: Computer Graphics Course no: CSC209

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

The Rendering Equation & Monte Carlo Ray Tracing

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

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

BRDF Computer Graphics (Spring 2008)

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

CS Simple Raytracer for students new to Rendering

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

Assignment #2. (Due date: 11/6/2012)

Assignment 3: Path tracing

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

Lecture 11. More Ray Casting/Tracing

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

Project 3 Path Tracing

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

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

Transcription:

TDA361/DIT220 Computer Graphics, January 15 th 2016 EXAM (Same exam for both CTH- and GU students) Friday January 15 th, 2016, 8.30 12.30 Examiner Ulf Assarsson, tel. 0701-738535 Permitted Technical Aids None, except English dictionary General Information Numbers within parentheses states the maximum given credit points for the task. Solutions shall be clear and readable. Too complex solutions can cause reductions in the provided number of points Questions to examiner during exam will be possible approximately one hour after the start of the exam. If anything is unclear remember what has been mentioned on the lectures, in the slides and course book and do your best. Grades In order to pass the course, passed exam + exercises (or exam + project) are required. The final grade is calculated from the exam grade. The exam is graded as follows CTH: 24p grade 3 < 36p grade 4 < 48p grade 5 GU: 24p G < 45p VG Max 60p Grades are announced by the LADOK system ~3 weeks after the exam Solutions will be announced on the course home page. Review Opportunity to review the correction of your exam is provided on Wednesday February 10 th at 12.00, room 4117 (next to my office room), 4 th floor (west corridor), EDITbuilding.

Question 1 a) [1p] Assume you have implemented a DDA algorithm for line drawing that only can draw lines with a low slope correctly, but has problems with steep lines (see image below). How can you in a simple way make it plot steep lines as well? Answer: Swap roles of x and y. I.e., loop over y, instead of x, to plot the (x,y)- value. b) [1p] What does the geometry shader do? Answer: takes one primitive as input and outputs 0 or more new primitives - possibly other primitives. E.g. triangles, lines, points. c) [2p] To draw transparent objects using for instance OpenGL, you typically divide the triangles in two groups: the transparent ones and the opaque ones. 1) Which of these two groups needs to be sorted, 2) why, 3) and in which order? Answer: 1) the transparent triangles, 2) for correct blending, 3) back-to-front. d) [1p] What is the z-buffer for? Answer: to resolve visibility / avoid depth sorting. e) [2p] Why do we want to use double buffering? Explain what can happen without it. Answer: 1p: to avoid screen tearing. 1p: if explanation of screen tearing is given f) [3p] State the 4x4 shear matrix that shear x along y, as in the figure below. Answer: 1 a 0 0 0 1 0 0 0 0 1 0 0 0 0 1 where a is non-zero (e.g. ~0.3).

Question 2 a) [5p] Emission is one of the terms in the standard real-time shading model. Which are the 3 other terms? Also, describe how each of the 3 parts are computed (give the formulas and draw picture when needed). State both Blinn s and Phong s model for the corresponding term. Answer: specular, diffuse, ambient, (1p if this is given) 4m (1.5p) spec: = Blinn: max 0, n h shininess m s (also ok without the factor 4) (1.5p) spec: = Phong: (1p) diff: = (1p) amb: = m ( ( ) ) spec spec m max( 0, ( r v) shininess ) m spec s spec ( n l) m diff s diff amb s amb (No reduction in points if the max() are excluded) b) [1p] What is the difference between supersampling and multisampling? Answer: multisampling only runs the fragment shader once per fragment (not once per sample-inside-each-pixel). I.e., multisampling shares computations e.g. executes fragment shader for only one sample, but takes several depth samples. c) [2p] Describe how jittering works and also tell me what is the main advantage compared to other sampling schemes? Answer: replaces undersampling artifacts with noise. Take a random sample position per subcell. d) [2p] Which matrices are involved in the transformation of a vertex from model space to screen space? I.e., give the names for these matrices. Answer: modelviewmatrix (or model-to-world and world-to-view/camera matrix), projection matrix, (viewport matrix). Question 3 a) [3p] Describe the shadow map algorithm. Answer: 1. Render a shadow (depth) map from the light source. 2. Render image from the eye. For each generated pixel, transform/warp the

x,y,z coordinate to light space and compare the depth with the stored depth value in the shadow map (at the pixel position (x,y)). If greater point is in shadow Else point is not in shadow (Bias/offset is necessary due to disretization and precision problems.) b) [1p] Why do you need to use a bias in the shadow map algorithm? What is the cause of the problem? Answer: 1p We compare two different discretizations one from the eye and one from the camera. (1p to avoid z-fighting (incorrect self shadowing) and light leaking, 1p the view sample can lie further from the light than the shadow map sample (due to discrete sampling) ) c) [2p] How many texels needs to be accessed/read (by e.g. the hardware) to compute a tri-linear filtered mipmap value? Explain. Answer: 8 (i.e., 4 per mipmap layer, two layers). d) [4p] Draw a simple scene and visually divide it into 1) an Axis Aligned Bounding Box hierarchy, 2) an Octree or Quadtree, 3) an Axis Aligned Binary Space Partitioning Tree, 4) and a recursive or hierarchical grid You can do all your drawings in 2D for simplicity and you may use different scenes for the different hierarchies. (You don t need to show the corresponding tree structures). The differences in the spatial divisions between all the types of data structures should be clear from your examples, for any score. Question 4 a) [3p] This is the rendering equation. Explain the equation and all of its components. You can include a figure in your answer. L o = Le + Ω f r ( x, ω, ω') L ( x, ω')( ω' n) dω' Answer: f r is the BRDF, w is incoming direction, n is normal at point x, Ω is hemisphere around x and n, L i is incoming radiance, x is position on surface, w is outgoing direction vector. L o (x,w)=l e (x, w)+l r (x, w) (slightly different terminology than Kajiya) I.e., outgoing radiance =emitted + reflected radiance. Integral represents reflected radiance. i

b) [3p] Path tracing: Draw and explain, using the example below, how the color of one of the pixels is computed with path tracing. Observe that it is an area light source. Illustrate using a suitable number of ray paths and recursion depth. c) [2p] Photon mapping: Why do we use a separate global map and caustics map, instead of just having one combined map? Answer: global map represents correct, but sparsely sampled, light distribution. However, the caustics map needs very high sampling (high-frequency phenomenon) to be captured correctly. Instead of shooting a huge amount of photons in all directions, photons are mostly shot in directions of specular objects. Thus, its distribution is biased. d) [2p] Describe the Fresnell effect for dielectric materials and metals, respectively. (You may draw graphs or describe with words.) Answer: dielectrics: High transmittance/low reflectivity for low angles. Low transmittance/high reflectivity for high angles. Metals: high reflectivity for all angles (there can be a slight dip e.g. around 85 degrees) Question 5 a) [1p] Draw the Quincunx pattern and state the weights per sample. Answer: 1 sample in each of the four pixel corners (with weight=1/8) and 1 sample in the pixel center (with weight=0.5) b) [3p] Euler rotations can be used to describe the rotation of an object. The rotation is often defined by head, pitch and roll, which each is a rotation around one of the world space axes. E.g., the combined rotation is M = R z (r) R x (p) R y (h), where R i rotates around the world space axis i. Question: Is M dependent on the multiplication order of R x, R y, and R z? Motivate your answer well.

Answer: Yes. E.g., simply use an example with a 90-degree rotation for the first rotation (head) and then it can be seen that the meaning of the pitch and roll are now flipped. a) [3p] Describe an efficient and conservative method for course pruning of noncolliding objects. Answer: see sweep-and-prune: Collision detection for x,y,z-axes, sort start and end of AABBs, active interval list, update sort using bubble sort, flip bits of matrices. a) [3p] Show how to compute the intersection between a ray and a sphere (in 3D). Answer: See slides from lecture 6. Sphere center: c, and radius r Ray: r(t)=o+td Sphere formula: p-c =r Replace p by r(t): r(t)-c =r and solve for t. Return r(t) Question 6 Miscellaneous a) [2p] In which ways are NURBS more general than B-Splines? Answer: control points can be set at non-uniform intervals and they can have different weights. b) [1p] Assume p=(7,4,1,5). Perform the homogenization step on p. c) [1p] Manually normalize the vector x=(2,3,1).

d) [2p] Describe how to do a simple intersection test between a tetrahedron and a plane. Answer: If all points lie on the same side of the plane, then no intersection. Else, intersection. Insert points into the plane equation and check signs. Hardware e) [4] Draw the logical layout of a modern graphics card. You can use the major functional blocks that we have mentioned in the course. (Hint: preferably I want the layout as described in the hardware lecture, e.g. with the different parallel shader units and the other functional units).