Namn: (Ifylles av student) Personnummer: (Ifylles av student) Tentamensdatum: Tid: 09: Hjälpmedel: Inga hjälpmedel

Similar documents
TentamensKod: (Ifylles av student) Tentamensdatum: Tid: 10:00 12:00. Hjälpmedel: Inga hjälpmedel

CS 130 Final. Fall 2015

VTU QUESTION PAPER SOLUTION UNIT -1 INTRODUCTION

CHAPTER 1 Graphics Systems and Models 3

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 10

Institutionen för systemteknik

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

Graphics Hardware and Display Devices

Advanced Lighting Techniques Due: Monday November 2 at 10pm

Computer Graphics and Visualization. Graphics Systems and Models

CS 4620 Program 3: Pipeline

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

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

Models and Architectures

Adaptive Point Cloud Rendering

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

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

CS 130 Exam I. Fall 2015

CS 464 Review. Review of Computer Graphics for Final Exam

Topics and things to know about them:

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

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

CS 130 Exam I. Fall 2015

Rasterization Overview

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Introduction to Visualization and Computer Graphics

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.

CS451Real-time Rendering Pipeline

CS 354R: Computer Game Technology

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

TDA361/DIT220 Computer Graphics, January 15 th 2016

Graphics and Interaction Rendering pipeline & object modelling

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

Deferred Rendering Due: Wednesday November 15 at 10pm

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

The Application Stage. The Game Loop, Resource Management and Renderer Design

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

CS452/552; EE465/505. Clipping & Scan Conversion

3D Rasterization II COS 426

Spring 2009 Prof. Hyesoon Kim

Textures. Texture coordinates. Introduce one more component to geometry

Computer Graphics I Lecture 11

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

9. Illumination and Shading

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

CS 4620 Midterm, March 21, 2017

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

Computer Graphics. Shadows

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev


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

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

CEng 477 Introduction to Computer Graphics Fall 2007

Spring 2011 Prof. Hyesoon Kim

Course Title: Computer Graphics Course no: CSC209

CS559 Computer Graphics Fall 2015

CS452/552; EE465/505. Intro to Lighting

Graphics for VEs. Ruth Aylett

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

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

CPSC / Texture Mapping

Z-Buffer hold pixel's distance from camera. Z buffer

Chapter 2 A top-down approach - How to make shaded images?

Introduction to Computer Graphics with WebGL

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

Graphics for VEs. Ruth Aylett

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Hidden Surfaces II. Week 9, Mon Mar 15

Homework 3: Programmable Shaders

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

The Rasterization Pipeline

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

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

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 418: Interactive Computer Graphics. Basic Shading in WebGL. Eric Shaffer

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

For each question, indicate whether the statement is true or false by circling T or F, respectively.

The Traditional Graphics Pipeline

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]

COMP371 COMPUTER GRAPHICS

Game Architecture. 2/19/16: Rasterization

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

lecture 18 - ray tracing - environment mapping - refraction

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

Computer Graphics Coursework 1

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Werner Purgathofer

The Traditional Graphics Pipeline

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of

Computer Graphics 10 - Shadows

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

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

Transcription:

Computer Graphics Provmoment: Ladokkod: Tentamen ges för: Tentamen NDG011 Systemarkitektprogrammet 7,5 högskolepoäng Namn: (Ifylles av student) Personnummer: (Ifylles av student) Tentamensdatum: 2010-03-02 Tid: 09:00 14.00 Hjälpmedel: Inga hjälpmedel Totalt antal poäng på tentamen: För att få respektive betyg krävs: G=21 VG=34 42 poäng Allmänna anvisningar: Skriv dina svar på separata blad Spara alla filer på F: om inte annat specifikt anges Se till att lösningarna inte har bindningar till filer på C: i andra mappar än specifikt angivna Stäng ner samtliga applikationer och logga ut (via ikon) när du är klar med tentamen. Vid olösliga problem med datorkonto, ta ett nytt och lämna in även detta i tentamensmappen. Rättningstiden är som längst tre veckor Viktigt! Glöm inte att skriva namn på alla blad du lämnar in. Lycka till! Ansvarig lärare: Rikard König Telefonnummer: 033 435 5945

Answers (swe. svarsblankett) Namn: (Ifylles av student) Personnummer: (Ifylles av student) Question 1: A B C D a) b) c) d) e) f) g) Question 2: A B C D a) b) c) d) e) f) g) Question 3: A B C D a) b) c) d) e) f) g) Important note: The minimum result on questions 1 to 3 is 10 points. If this is not reached, question 4 to 6 will not be considered and automatically given 0 points. 2

1. Answer with any of the given answers for the following questions. (a) Which of the following statements are true? A. Interlaced mode means that the screen is drawn with alternating vertical and horizontal lines which can result in flicker at close range. B. Plasma screens uses high voltage to energize gases embedded between glass panels. C. In an LED, the electrical field controls the polarization of the liquid crystals in the middle panel, thus turning on and off the light passing through the panel. D. A Cathode-Ray Tube uses phosphor to emit light. (b) Which is the correct order of the four major tasks in the XNA-rendering pipeline? E. Geometry Processing, Vertex Processing, Pixel Processing, Pixel Rendering. F. Pixel Processing, Vertex Processing, Geometry Processing, Pixel Rendering. G. Vertex Processing, Geometry Processing, Pixel Processing, Pixel Rendering. H. Vertex Processing, Pixel Processing, Geometry Processing, Pixel Rendering. (c) Which are the general equations for projecting (using simple perspective) a 3D point (x,y,z) into a 2D point (x p,y p ) at the plane where z=d? (Hint, the figures below can be used to derive both equations) A. x p =x/(d/z), y p =y/(d/z). B. x p =x/(z/d), y p =y/(z/d). C. x p =x/(z/d), y p =y/(d/z). D. x p =x/(d/z), y p =y/(z/d). (d) Which of the following matrices (when applied to row vectors) will increase the size along the z-axis and move it in the positive direction of the y-axis? A B C D 1 0 0 0 1 0 0 2 1 0 0 1 1 0 0 0 0 1 0 2 0 1 0 0,9 0 1,2 0 2 0 1 0 1,1 0 0 1,8 0 0 0 1,2 0 0 0 1 2 0 0 1,1 1,8 0 0 0 1 0 1,2 0 1 0 0 3 1 0 0 0 0,3 3

(e) Why is homogeneous coordinate system used in computer graphics? A. Rotation cannot be calculated using multiplication without homogeneous coordinates. B. Without homogeneous coordinates translation cannot be calculated the same way as scaling. C. Only orthogonal projection can be represented using normal coordinates. D. Homogeneous coordinates increases the number of perspective divisions which is favorable for modern GPUs. (f) What is the result of multiplying the Matrices X and Y? X Y 2 1 2 2 2 1 0 2 1 1 1 2 * 1 0 1 2 3 3 1 3 3 0 1 0 0 2 1 2 0 2 1 2 A B C D 11 6 5 10 11 6 5 10 11 5 6 10 11 6 5 10 6 5 4 8 6 5 4 8 6 5 4 8 6 5 4 8 12 9 7 18 12 9 8 18 12 3 7 8 12 9 7 18 5 4 5 9 7 4 5 8 5 4 5 8 5 4 5 8 (g). Why is normalization of projections important? A. Normalization is crucial since Pythagoras theorem is used when the final projection is calculated. B. Normalization lets us clip against a simple cube that is parallel to the axes, regardless of type of projection C. Normalization delays the final projection until end which is Important for hiddensurface removal since the depth information is preserved as long as possible D. Normalization removes all negative values which ensure the completeness of perspective division. 4

2. Answer with any of the given answers for the following questions. (a) The Object-space and Image-space approaches are suitable for solving the? A. Aliasing problem. B. Hidden-surface-removal problem. C. Scan-line problem. D. Clipping and visibility problem. (b) Two hard cases when applying depth-sort for use with painters algorithm are? A. Cyclic overlap of three or more objects, and when one object penetrates the surface of another object. B. Cyclic overlap of three or more objects, and when two object overlaps in the z- coordinate but not in the others. C. All z-coordinates of an object are behind the corresponding coordinates of all other objects, and when two object overlaps in the z-coordinate but not in the others. D. All z-coordinates of an object are behind the corresponding coordinates of all other objects, and when one object penetrates the surface of another object. (c) Applying polygons on the z-buffer algorithm can be done? A. Inefficient as polygons can overlap in a cyclic overlap. B. Efficient if observing the constants of the plane equation in respect to pixels. C. Inefficient as polygons then need to be rasterized. D. Efficient if first performing a depth-sort of the polygons. (d) The main three mapping methods that are considered are? A. Texture, Polygon and Bump mapping. B. Texture, Environment and Bump mapping. C. Texture, Bilinear and Reflection mapping. D. Texture, Image and Pixel mapping. 5

(e) Two-part mapping works by? A. First mapping to an intermediate shape as a box, sphere or cylinder and then to the actual shape. B. First performing a pass with calculating the vectors and then performing a second pass with calculating the actual pixels. C. Allowing complex objects that consists of two or more shapes to be drawn by finding the inverse s() and t() functions. D. First mapping the 2D image to a 3D surface and then mapping the surface to the screen window.. (f) Bresenham s algorithm is efficient for drawing lines as it? A. Requires only integer arithmetic. B. Requires only one floating-point operation per pixel. C. Does not need any additional solution for solving the problem with steep lines. D. Only have three candidate pixels in the y-axis for each x pixel. (g) From an high overview, a non-hierarchical model is basically made up of? A. Bones and Meshes. B. Meshes and Transformations. C. Symbols and Instances. D. Graphs and Edges. 6

3. Consider the modified Blinn-Phong shading equation at a fragment with normal n and the material parameters c d, c s (colors) and m (shininess). The direction towards the directional light source is l and the direction to the viewer is v. There are three terms contributing to the final fragment color: ambient, diffuse and specular. For each term mark the subset of the parameters that is needed to compute that term: (a) specular (b) ambient (c) diffuse A c d B c s C m D n E L F v Do not forget to fill in your answers on the first page too! Answer with any of the given answers for the following questions. (d) To draw a scene with both opaque and translucent meshes without artifacts? A. Draw the translucent meshes the Z-buffer write enabled, and then the opaque meshes in back-to-front order with the Z-buffer readonly. B. Draw the translucent meshes in back-to-front order with the Z-buffer readonly, and then the opaque meshes with the Z-buffer write enabled. C. Enable blending and draw the meshes in any order. D. Draw the opaque meshes with the Z-buffer write enabled, and then the translucent meshes in back-to-front order with the Z-buffer readonly. (e) The required minimal output of a fragment/pixel shader is? A. The fragment position in clip coordinates. B. The fragment color in RGBA. C. The fragment normal and texture coordinates. D. The index of the fragment in the vertex buffer. 7

(f) Environment mapping is the name of a set of techniques that produce the appearance of? A. Small surface details by perturbing the normal used by the shading equation at each fragment. B. Reflections of the surrounding environment on the object surface. C. The distant surrounding environment in the scene by mapping images on a sky dome or sky box. D. A terrain surface by creating a mesh of vertices from a height map image. (g) In a bump mapping shader effect the output from a vertex shader program is sent to the pixel shader program(s)? A. As one copy for each fragment created by the rasterizer. B. Directly by reference. C. Interpolated over each object by the vertex processor(s). D. Interpolated for each fragment of a primitive by the rasterizer. 8

4. Create a program that displays two pyramids close to each other in the middle of the screen. One of the pyramids should be rotating around the y- axis and the other around the x axis. The pyramid should be defined in a separate class and should be drawn using indexed vertices that are uploaded to the GPU using vertex buffers. Drawing the pyramid without indexing and uploading the vertices to the GPU can result in maximum 4p. 5. Create a program using XNA that displays a long road, with a moving snowplow placed on it. The road should be dynamically created by tiling a given texture ( roadtile.jpg ) together as a long mesh, consisting of at least 100 tiles. The snowplow should be loaded as a model ( snowplow.fbx ) and while moving along the road the snowplow should relatively move at least one part (bone) in some pattern. The necessary binary contents are provided in the directory ContentQuestion5 on your account. As a helping reminder, the basic algorithm for drawing a model is outlined as follows: foreach(modelmesh mesh in model.meshes) { foreach(basiceffect effect in mesh.effects) { // fix effect } mesh.draw(); } 6. Create a program using XNA that displays the tractor model with the camera rotating around it or movable so the tractor can be inspected from different directions. Create a. An effect that shades all fragments of a mesh part bright green (i.e. the RGB values (0.0, 1.0, 0.0)) regardless of lighting. Apply it to all parts of the mesh named box.003 in the tractor. b. An effect that colors each fragment of a mesh according to the world space normal at that fragment using the encoding color.rgb = 0.5*normal.xyz + 0.5. Apply it to all parts of the meshes named cylinder, box.001 and box.002 in the tractor. (To convince yourself that the world space normals turn out ok it is useful to try setting the color from just one of the normal s x, y and z components at a time.) If you wish you may use a copy of your solution to question 5 as a starting point. 9

10