Advanced Rendering II, Sampling Week 9, Wed Mar 9 - - PowerPoint PPT Presentation

advanced rendering ii sampling week 9 wed mar 9
SMART_READER_LITE
LIVE PREVIEW

Advanced Rendering II, Sampling Week 9, Wed Mar 9 - - PowerPoint PPT Presentation

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Advanced Rendering II, Sampling Week 9, Wed Mar 9 http://www.ugrad.cs.ubc.ca/~cs314/Vjan2005 News some people still havent demoed P2 if you


slide-1
SLIDE 1

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner http://www.ugrad.cs.ubc.ca/~cs314/Vjan2005

Advanced Rendering II, Sampling Week 9, Wed Mar 9

slide-2
SLIDE 2
  • News

some people still haven’t demoed P2 if you don’t demo you get a 0!

come see me after class sign up with cyang@cs ASAP

74832049 40112005 84323013 79325999 81163990

slide-3
SLIDE 3
  • News

guest lecture Friday

  • Prof. Robert Bridson, on animation

among the many cool things he’s done:

cloth simulation used for Yoda fight scene

slide-4
SLIDE 4
  • News

summer job available in civil engineering

slide-5
SLIDE 5

5

Summer Job Opportunity

  • Student needed to integrate UBC Earthquake Engineering Research

Student needed to integrate UBC Earthquake Engineering Research Facility Facility with Network for Earthquake Engineering Simulation ( with Network for Earthquake Engineering Simulation (www.nees.org www.nees.org) )

  • Required:

Required:

  • Graphics background

Graphics background

  • Linux familiarity

Linux familiarity

  • NSERC USRA eligible (http://

NSERC USRA eligible (http://www.nserc.ca www.nserc.ca/) /)

  • Contact Ken Elwood (

Contact Ken Elwood (elwood@civil.ubc.ca elwood@civil.ubc.ca) and CC me ) and CC me

  • Contact

Contact today today by 2pm by 2pm

  • Decision will be made by Friday!

Decision will be made by Friday!

slide-6
SLIDE 6
  • News

summer job available in civil engineering

today is last day to express interest! position must be filled by Friday come see me after class

if you’re interested even if you already sent mail, so that I can

match faces to names

slide-7
SLIDE 7
  • Review: Particle Systems

changeable/fluid stuff

fire, steam, smoke, water, grass, hair, dust,

waterfalls, fireworks, explosions, flocks

life cycle

generation, dynamics, death

rendering tricks

avoid hidden surface computations

slide-8
SLIDE 8
  • Review: Simple Ray Tracing

view dependent method

cast a ray from viewer’s

eye through each pixel

compute intersection of

ray with first object in scene

cast ray from

intersection point on

  • bject to light sources

projection reference point pixel positions

  • n projection

plane

slide-9
SLIDE 9
  • Review: Recursive Ray Tracing

ray tracing can handle

reflection (chrome) refraction (glass) shadows

spawn secondary rays

reflection, refraction

if another object is hit,

recurse to find its color

shadow

cast ray from intersection

point to light source, check if intersects another object

projection reference point pixel positions

  • n projection

plane

slide-10
SLIDE 10
  • Review: Subsurface Scattering

light enters surface, bounces around inside,

leaves at different location on the surface

slide-11
SLIDE 11
  • Advanced Rendering II
slide-12
SLIDE 12
  • Radiosity

radiosity definition

rate at which energy emitted or reflected by a surface

radiosity methods

capture diffuse-diffuse bouncing of light

indirect effects difficult to handle with raytracing

slide-13
SLIDE 13
  • Radiosity

recall radiative heat transfer

conserve light energy in a volume model light transport until convergence solution captures diffuse-diffuse bouncing of light

view independent technique

calculate solution for entire scene offline browse from any viewpoint in realtime

heat/light source thermometer/eye reflective objects energy packets

slide-14
SLIDE 14
  • Radiosity

[IBM] [IBM]

divide surfaces into small patches loop: check for light exchange between all pairs

form factor: orientation of one patch wrt other patch (n x n matrix)

slide-15
SLIDE 15
  • Raytracing vs. Radiosity Comparison

ray-tracing: great specular, approx. diffuse

view dependent

radiosity: great diffuse, specular ignored

view independent, mostly-enclosed volumes

advanced hybrids: combine them

raytraced radiosity

slide-16
SLIDE 16
  • Image-Based Rendering

store and access only pixels

no geometry, no light simulation, ... input: set of images

  • utput: image from new viewpoint

surprisingly large set of possible new viewpoints

slide-17
SLIDE 17
  • IBR Characteristics

display time not tied to scene complexity

expensive rendering or real photographs

massive compression possible (120:1) can point camera in or out

QuickTimeVR: camera rotates, no translation

slide-18
SLIDE 18
  • Characterizing Light

7D plenoptic function: P(x, y, z, θ, φ, λ, t)

(x,y,z): every position in space (θ, φ): every angle λ: every wavelength of light t: every time

can simplify to 4D function

fix time: static scene fix wavelength: static lighting partially fix position: empty space between

camera and object

slide-19
SLIDE 19
  • 4D Light Field / Lumigraph

P(u,v,s,t)

images: just one kind of 2D slice

slide-20
SLIDE 20
  • Non-Photorealistic Rendering

look of hand-drawn sketches or paintings

www.red3d.com/cwr/npr/

slide-21
SLIDE 21
  • NPRQuake

www.cs.wisc.edu/graphics/Gallery/NPRQuake/

slide-22
SLIDE 22
  • Advanced Rendering

so many more algorithms, so little class time!

Renderman REYES photon mapping and lots more...

slide-23
SLIDE 23
  • Sampling
slide-24
SLIDE 24
  • Samples

most things in the real world are continuous everything in a computer is discrete the process of mapping a continuous function to a

discrete one is called sampling

the process of mapping a discrete function to a

continuous one is called reconstruction

the process of mapping a continuous variable to a

discrete one is called quantization

rendering an image requires sampling and

quantization

displaying an image involves reconstruction

slide-25
SLIDE 25
  • Line Segments

we tried to sample a line segment so it would

map to a 2D raster display

we quantized the pixel values to 0 or 1 we saw stair steps, or jaggies

slide-26
SLIDE 26
  • Line Segments

instead, quantize to many shades but what sampling algorithm is used?

slide-27
SLIDE 27
  • Unweighted Area Sampling

shade pixels wrt area covered by thickened line equal areas cause equal intensity, regardless of

distance from pixel center to area

rough approximation formulated by dividing each pixel

into a finer grid of pixels

primitive cannot affect intensity of pixel if it does not

intersect the pixel

slide-28
SLIDE 28
  • Weighted Area Sampling

intuitively, pixel cut through the center should be

more heavily weighted than one cut along corner

weighting function, W(x,y)

specifies the contribution of primitive passing through

the point (x, y) from pixel center

x Intensity W(x,y)

slide-29
SLIDE 29
  • Images

an image is a 2D function (x, y) that

specifies intensity for each point (x, y)

slide-30
SLIDE 30
  • Image Sampling and Reconstruction

convert continuous image to discrete set of

samples

display hardware reconstructs samples into

continuous image

finite sized source of light for each pixel

discrete input values continuous light output

slide-31
SLIDE 31
  • Point Sampling an Image

simplest sampling is on a grid sample depends

solely on value at grid points

slide-32
SLIDE 32
  • Point Sampling

multiply sample grid by image intensity to

  • btain a discrete set of points, or samples.

Sampling Geometry

slide-33
SLIDE 33
  • some objects missed entirely, others poorly sampled

could try unweighted or weighted area sampling but how can we be sure we show everything?

need to think about entire class of solutions!

Sampling Errors

slide-34
SLIDE 34
  • Image As Signal

image as spatial signal 2D raster image

discrete sampling of 2D spatial signal

1D slice of raster image

discrete sampling of 1D spatial signal

!"#

$%&&

%%

slide-35
SLIDE 35
  • Sampling Theory

how would we generate a signal like this out

  • f simple building blocks?

theorem

any signal can be represented as an (infinite)

sum of sine waves at different frequencies

slide-36
SLIDE 36
  • Sampling Theory in a Nutshell

terminology

bandwidth – length of repeated sequence on

infinite signal

frequency – 1/bandwidth (number of repeated

sequences in unit length)

example – sine wave

bandwidth = 2π frequency = 1/ 2π

slide-37
SLIDE 37
  • Summing Waves I
slide-38
SLIDE 38
  • Summing Waves II

represent spatial

signal as sum of sine waves (varying frequency and phase shift)

very commonly

used to represent sound “spectrum”

slide-39
SLIDE 39
  • 1D Sampling and Reconstruction
slide-40
SLIDE 40
  • 1D Sampling and Reconstruction
slide-41
SLIDE 41
  • 1D Sampling and Reconstruction
slide-42
SLIDE 42
  • 1D Sampling and Reconstruction
slide-43
SLIDE 43
  • 1D Sampling and Reconstruction

problems

jaggies – abrupt changes

slide-44
SLIDE 44
  • 1D Sampling and Reconstruction

problems

jaggies – abrupt changes lose data

slide-45
SLIDE 45
  • Sampling Theorem

continuous signal can be completely recovered from its samples iff sampling rate greater than twice maximum frequency present in signal

  • Claude Shannon
slide-46
SLIDE 46
  • Nyquist Rate

lower bound on sampling rate

twice the highest frequency component in the

image’s spectrum

slide-47
SLIDE 47
  • Falling Below Nyquist Rate

when sampling below Nyquist Rate, resulting

signal looks like a lower-frequency one

this is aliasing!

slide-48
SLIDE 48
  • Nyquist Rate
slide-49
SLIDE 49
  • Aliasing

incorrect appearance of high frequencies as

low frequencies

to avoid: antialiasing

supersample

sample at higher frequency

low pass filtering

remove high frequency function parts aka prefiltering, band-limiting

slide-50
SLIDE 50
  • Supersampling

None 3x3 5x5

slide-51
SLIDE 51
  • Low-Pass Filtering
slide-52
SLIDE 52
  • Low-Pass Filtering
slide-53
SLIDE 53
  • Filtering

low pass

blur

high pass

edge finding

slide-54
SLIDE 54
  • Previous Antialiasing Example

texture mipmapping: low pass filter