Top Banner
CS148: Introduction to Computer Graphics Final Review Session
45

CS148: Introduction to Computer Graphics Final Review Session.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS148: Introduction to Computer Graphics Final Review Session.

CS148: Introduction to Computer Graphics

Final Review Session

Page 2: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Outline

Final Info

Review of TopicsMattes and CompositingSampling and FilteringCompressionProgrammable ShadingCamerasRenderingModeling

Page 3: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Final Exam Info

Time: Thursday March 20, 12:15Location: Meyer Forum 112Duration: 3 hours

Closed book

Consists of a few (4 or 5) multi-part questions

Emphasis on the second half of the course, but don’t forget the first half

Page 4: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Mattes and Compositing

α = Coverage= Area= Opacity= 1 – Transparency

Standard Compositing EquationC = α * CF + (1 – α) * CB

Premultiplied α: C’ = αC = (αr, αg, αb, α)

α

Page 5: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Porter-Duff Compositing Algebra

BBAA CFCFc

Page 6: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Green Screen Matte Extraction

Given:C – Observed colorCB – Backing color

Compute:CF = (αFRF, αFGF, αFBF, αF)

Compositing Equation:C = CF + (1 – αF)CB

3 Equations, 4 Unknowns – must make some assumptions

Page 7: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

The Horrors of Poor Sampling

Page 8: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

The Horrors of Poor Sampling

Retort sequence by Don Mitchell

Page 9: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Nyquist Frequency

Nyquist Frequency – ½ the sampling frequency

A periodic signal with a frequency above the Nyquist frequency cannot be distinguished from a periodic signal below the Nyquist frequency

These indistinguishable signals are called aliases

Page 10: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Fourier Transform

You can express any (periodic) signal as a sum of sinusoids

Page 11: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Fourier Transform

Spatial Domainf(x,y)

Frequency DomainF(ωx, ωy)

Fourier Transform

InverseFourier

Transform

Convolution Multiplication

Multiplication Convolution

Sinc Box

Page 12: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Convolution

Convolution – integration/summation of translated filter with signal

n

nmgnfmgf )()())(*(

Page 13: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Fourier Transform

Page 14: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Low Pass Filter

Page 15: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

High Pass Filter

Page 16: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Band Pass Filter

Page 17: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Sampling – Spatial Domain

Page 18: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Sampling – Frequency Domain

Page 19: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Reconstruction – Frequency Domain

Page 20: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Reconstruction – Spatial Domain

Page 21: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Undersampling – Frequency Domain

Page 22: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Compression

Kolmogorov Complexity – smallest program to generate data

Lossless CodingRun length coding – exploit obvious redundancyHuffman Coding – variable length code, highly probable characters -> shorter codes

Transform Coding – perform invertible transform on data to make it more amenable to compression (applies to lossless and lossy!)

Page 23: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Lossy Image Compression (JPEG)

Image

DiscreteCosine

TransformTransformed

Image

Quantization

(Lossy Step)

Reorder+

Coding CompressedData Stream

JPEG2000 is similar but uses the wavelet transform.Exploit human perception – quantize high frequencies more heavily since we are less sensitive to them.

Page 24: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Wavelet Transform

Just another invertible transform (expresses signal in different basis)

Generated in steps by calculating smoothed (approximate) values and detail (corrective) values

Resulting basis functions have compact support – they are only non-zero over a limited range – error in coefficient causes localized error

Page 25: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Wavelet Transform

6 8 5 9 5 5 6 6

6.25 0 -1 -2 0 0

Full Transform

High Resolution DetailsMedium Resolution DetailsLow Resolution DetailsAverage Value

-.5.75

Page 26: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Rendering Pipeline

Vertex Data

Primitive Data

Tessellation

Vertex Processin

g

Geometry Processin

g

Pixel Processin

g

Texture Sampler

Textured Surface

Pixel Rendering

Page 27: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Example Vertex Shader

Vertex Shader

Page 28: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Example Pixel Shader

Pixel Shader

Page 29: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

GPGPU

CPU

Thread synchronization

Bandwidth limitations

Scheduling overhead

Small number of cores

GPU

All threads independent

Message passing is not allowed

Resource allocation is done by GPU

Many cores available (12 to 48 typical)

Page 30: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

GPGPU Applications

Beyond triangle rendering

Collision detection

Fluid simulation

Physics

Raytracing

Video compression

Beyond graphics

Folding@Home

Speech Recognition

Partial differential equation solvers

Fourier transform

Page 31: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Pinhole Camera

film

f

x’

(x,z)

pinhole

Field of view

Page 32: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Pinhole Camera

z

fxx '

film

f

x’

(x,z)

pinhole

Field of view

f

xfov ')

2tan(

Page 33: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Homogeneous Coordinates

Page 34: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Perspective Transform

Page 35: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Orthographic Projection

Page 36: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Field of View and Focal Length

Page 37: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Depth of Field

Page 38: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Circle of Confusion

Page 39: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Types of Reflection

Mirror

Ideal reflection

Reflection law

Diffuse

Matte

Lambert’s Law

Specular

Highlights and gloss

Microfacet model

Page 40: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Lambert’s Law

Page 41: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Ideal Reflection

Page 42: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Microfacets

Page 43: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Modeling

RepresentationsDense Polygonal MeshesBicubic surfacesSubdivision Surfaces

OperationsInstancingTransformation – linear and non-linearCompression, simplificationDeform, skin, morph, animateSmoothSet operations

Page 44: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Bezier Curve

Page 45: CS148: Introduction to Computer Graphics Final Review Session.

CS148 Final Review Winter 2008

Subdivision Surfaces

Loop subdivision algorithmExtraordinary points