CS 464 Review. Review of Computer Graphics for Final Exam

Similar documents
Pipeline Operations. CS 4620 Lecture 10

CS 130 Final. Fall 2015

CHAPTER 1 Graphics Systems and Models 3

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

Pipeline Operations. CS 4620 Lecture 14

Topics and things to know about them:

Institutionen för systemteknik

Computer Graphics I Lecture 11

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

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

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

Illumination and Shading

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

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

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

CS4620/5620: Lecture 14 Pipeline

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

3D Rasterization II COS 426

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

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

3D graphics, raster and colors CS312 Fall 2010

Course Title: Computer Graphics Course no: CSC209

CS 130 Exam I. Fall 2015

Graphics for VEs. Ruth Aylett

CS451Real-time Rendering Pipeline

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

Graphics Hardware and Display Devices

Graphics for VEs. Ruth Aylett

The Rasterization Pipeline

Computer Graphics Introduction. Taku Komura

CS 130 Exam I. Fall 2015

The Viewing Pipeline Coordinate Systems

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

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

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

Advanced Lighting Techniques Due: Monday November 2 at 10pm

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

CS 4620 Program 3: Pipeline

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Models and Architectures

Graphics and Interaction Rendering pipeline & object modelling

- Rasterization. Geometry. Scan Conversion. Rasterization

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

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

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

Introduction to Visualization and Computer Graphics

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

Computer Graphics Fundamentals. Jon Macey

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

CEng 477 Introduction to Computer Graphics Fall 2007

Illumination and Shading

Graphics Pipeline 2D Geometric Transformations

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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


Introduction to Computer Graphics with WebGL

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.

RASTERISED RENDERING

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

CS 354R: Computer Game Technology

TDA361/DIT220 Computer Graphics, January 15 th 2016

Introduction to Computer Graphics

Rasterization Overview

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

Advanced Shading I: Shadow Rasterization Techniques

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CS 4620 Midterm, March 21, 2017

CS559 Computer Graphics Fall 2015

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

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

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

Game Programming. Bing-Yu Chen National Taiwan University

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

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

Contents. Graphics Library Display 2D/3D objects Coordinate Systems Window and Viewport Transformation. CAD Graphics - 1

Projections and Hardware Rendering. Brian Curless CSE 557 Fall 2014

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

Level of Details in Computer Rendering

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

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

Sung-Eui Yoon ( 윤성의 )

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

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

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

The Traditional Graphics Pipeline

OXFORD ENGINEERING COLLEGE (NAAC Accredited with B Grade) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

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

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

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.

CMSC427 Final Practice v2 Fall 2017

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

Computer Graphics. Bing-Yu Chen National Taiwan University

History of computer graphics

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

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

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

The Traditional Graphics Pipeline

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

Computergrafik. Matthias Zwicker. Herbst 2010

Transcription:

CS 464 Review Review of Computer Graphics for Final Exam

Goal: Draw 3D Scenes on Display Device 3D Scene Abstract Model Framebuffer Matrix of Screen Pixels In Computer Graphics: If it looks right then it is right

Components of 3D Scene Model Components Coordinate System Geometry = Models of Objects Lights Camera Textures Materials transforms Common Attributes Coordinates = x,y,z Cartesian Colors = r, g,b = Red, Green, Blue

Framebuffer device for showing pictures. Framebuffer Matrix of Screen Pixels Core Features of Framebuffer Matrix of Pixels Pixels: 8 bits of Red,Green,Blue, Alpha for 32 bits per pixel. Fixed width Fixed height Coordinates go left right, top to bottom. clearbuffer(acolor); setpixel(x,y, acolor);

What are our challenges? How do we draw simple 2D primitives? Lines (x,y) Triangles (x,y) How do we draw simple 3D primitives? Lines (x,y,z) Triangles (x,y,z)

What are our challenges? How do we draw simple 2D primitives? Lines (x,y) rasterize between two points. Triangles (x,y) clip the triangle, then rasterize. How do we draw simple 3D primitives? Lines (x,y,z) Project from 3D to 2D then use 2D methods. Triangles (x,y,z) Project from 3D to 2D then use 2D methods. Projection: - Perspective Projection and Orthographic Projection

Simple 2D Scene: Lines Scene Definition A simple list of vertices L1 L2 L3 L={ } xb1,yb1,xe1,ye1, xb2,yb2,xe2,ye2,. xb6,yb6,xe6,ye6 L7 L4 L6 L5 Coordinate Space= Framebuffer

Coordinate Spaces Normalized Device Coordinates Framebuffer Matrix of Screen Pixels 0,0 319,0 0,239 319,239 Coordinate Transform: F x =W x, F y =W y -F ymax

What are our Challenges? Normalized Device Coordinates are very limited How do I move objects? How do I map objects to different coordinates? How can I look at a scene from any view position I would like?

What are our Challenges? Normalized Device Coordinates are very limited How do I move objects? Matrix Transform How do I map objects to different coordinates? Matrix Transform How can I look at a scene from any view position I would like? View Transformation

3D to 2d: Perspective Projection Provides foreshortening. Has much higher visual realism. What users expect. Very simple perspective projection. X = x/z Y = y/z

View Tranformation

Standard Sequence of Transforms Image credits: http://www.cs.cornell.edu/courses/cs4620/2009fa/lectures/10viewing.pdf

Now Where are We? 3D Scene Abstract Model Framebuffer Matrix of Screen Pixels In Computer Graphics: If it looks right then it is right

What are our Challenges? How do we represent complex Geometry? How do we integrate Lighting? How do we select colors for the Geometry we want to draw? How do we handle overlapping Triangles?

What are our Challenges? How do we represent complex Geometry? Modeling = easiest method is to use Triangles. How do we integrate Lighting? Lighting Models = ambient, diffuse, specular(phong) How do we select colors for the Geometry we want to draw? Shading Models = flat, gouraud, phong Texture Mapping = select a color from an image. Materials = define colors of the triangles and assign directly. How do we handle overlapping Triangles? Painters algorithm Z-Buffer à the standard.

How do we implement solutions? How do we represent complex Geometry? Triangles = vertices, normals, faces indices, use Program to create large models. How do we integrate Lighting? Typically = we generate a light color for each vertex and save it for rasterization. How do we select colors for the Geometry we want to draw? Rasterization = when rasterizing, we pick the color from: Light value interpolate. Texture Map = interpolate texture coordinates. Materials = use a triangle specific color and interpolate its value with the lighting. How do we handle overlapping Triangles? Painters algorithm sort all triangles before rendering and draw back to front. Z-Buffer à For each screen pixel keep a Z value and overwrite the closer pixels.

So what can we do now? 3D Scene Abstract Model Framebuffer Matrix of Screen Pixels In Computer Graphics: If it looks right then it is right

So how do we implement this so it is FAST!

So how do we implement this so it is FAST! We Introduce the Graphics Pipeline gl.drawelements(gl.triangles, cubevertexindexbuffer.numitems, gl.unsigned_short, 0);

Graphics Pipeline: process to draw scene. General Pipeline Geometry Pipeline

What are our Challenges? How do we represent complex Geometry? Modeling = easiest method is to use Triangles. How do we integrate Lighting? Lighting Models = ambient, diffuse, specular(phong) How do we select colors for the Geometry we want to draw? Shading Models = flat, gouraud, phong Texture Mapping = select a color from an image. Materials = define colors of the triangles and assign directly. How do we handle overlapping Triangles? Painters algorithm Z-Buffer à the standard.

How do we represent Geometry? Modeling Collections of triangles defined by: Vertices, Edges, Faces, Normals A set of vertices, a set of triangle indices = bare minimum geometry. Normals are present for what purposes? How to create complex models? Create by hand Use a program = Maya or Blender Scan the real world = Lidar Scanner and post-process. Collections of photographs = photogrammetry. Complex Geometry à eventually all translated to triangles. NURBS Parametric Surfaces Subdivision Surfaces Implicit Surfaces Constructive Solid Geometry

Blender http://en.wikipedia.org/wiki/image:blender_node_screen_242a.jpg

Constructive Solid Geometry (CSG) Represent solid object as hierarchy of boolean operations Union Intersection Difference

How Do We Select Colors for Pixels? Assign Simple Materials = simply store an r,g,b color with each object or face. Shading Models à controls how colors are modified Flat Shading Gouraud Shading Phong Shading Texture/Image Maps Assign s,t texture coordinates to Vertices and interpolate. What are types of things we can use Image maps for? Procedural Textures Pixel = f(s,t) where f is a function à I = cos(theta)*sin(phi) Programmable Fragment Shaders Use programmable code to calculate pixel color = most powerful.

How do we introduce Lighting? Lighting Components Ambient = a general representation for the common light in the room. Diffuse = the light that reflects in all direction from a surface. Specular = the light that reflects differently based on the viewing angle. Lighting Models Ambient Lighting Model à Ia = Ka*Ia Diffuse Lighting Model à Id = Kd * Id*Dot(Idir, Normal) Phong Lighting Model à Is = Ks * Dot(2*(Dot(Idir,N)N Idir),Idir)^alpha*ls

How Deal With Overlapping 3D Triangles Painters Algorithm What is an example of this failing? Z Buffer Algorithm What is an example of this failing?

Color Spaces RGB = Red, Green, Blue CMYK = Cyan, Magenta, Yellow, Black HSV = Hue, Saturation, Value HSI = Hue Saturation, Intensity LAB = Luminance, A=green-red, B = blue-yellow

Simple Linear Interplation Linear interpolation à c = a + t*b : t is a parameter from 0 to 1.0 Bilinear Interpolation Trilinear Interpolation

Simple Vector Arithmetic Vector addition = simply addition of all vector terms. Vector multiplication = Cross product Vector Normalization Angle between two products = Dot Product

What are Affine Transformations? What do Affine Transforms Preserve?

What are Affine Transformations? What do Affine Transforms Preserve? Points, straight lines, parallel lines, planes. Is the Perspective Projection an Affine transform? Examples of Affine transforms: Translation Scaling Rotations Shears Our typical Matrix transformations.

So What Can We Do Now????????? You Tell Me

What Can t We Do Yet? Shadows Reflections Anti-aliasing Scene Graphs Binary Space Partitioning Advanced Lighting à Diffuse/Diffuse interaction Stereo Systems Ray tracing and volume tracing.

What Can t We Do Yet? Shadows --> Draw the Scene Twice. Reflections à Draw the Scene once for every reflective surface. Anti-aliasing à Over-render the scene and scale down. Scene Graphs à Organize complex Scenes with Trees. Binary Space Partitioning à Rapid advanced modeling. Advanced Lighting à Diffuse/Diffuse interaction Stereo Systems à Use Two Cameras. Ray tracing and volume tracing.

The End Work on your final projects Study for Exam Practice Exam Available on Thursday