Logistics Paper summaries on Ray Tracing Any takers? Advanced - - PDF document

logistics
SMART_READER_LITE
LIVE PREVIEW

Logistics Paper summaries on Ray Tracing Any takers? Advanced - - PDF document

Logistics Paper summaries on Ray Tracing Any takers? Advanced Ray Tracing About the Animation Course Announcement 12-hour programming competition Tenatively scheduled for: Sponsored by Computer Science House & Redbull


slide-1
SLIDE 1

Advanced Ray Tracing

Logistics

  • Paper summaries on Ray Tracing

– Any takers?

About the Animation Course

  • Tenatively scheduled for:

– MW – 4:00 – 5:50pm – Spring 2003 – Will be cross listed for grads/undergrads

Announcement

  • 12-hour programming competition

– Sponsored by Computer Science House & Redbull – Friday, January 17 – 7pm – 7am – Teams of 3 – 5 – objectives will be based around an 'energy' theme – Free Redbull and pizza – http://www.csh.rit.edu/redbull – http://www.csh.rit.edu/redbull/info.html

Schedule change

  • Tuesday, Feb 11

– Prof. Peter Anderson (CS) will be here talking about his research in Linear Pixel Shuffling – Reading list has been updated appropriately

  • Paper available only via Web site, not at library

Assignments

  • Assignment #1

– Write-up and sample input on Web site – Slight change

  • kr and kt now associated with each sphere
  • New input format
  • Assignment #2

– Write-up and sample input up by Thursday.

  • Any problems or questions with assignments?
slide-2
SLIDE 2

Assignments

  • Assignment #1

– Questions on

  • Netppm
  • Focal length and frame size

Assignments

  • Assignment #1

Logistics

  • Projects

– Please sign up for presentation time – 20 minutes/presentation – E-mail day/time

  • 1st, 2nd, 3rd preference

Logistics

  • Project roll call!

Before we begin

  • Any questions?

Computer Graphics as Virtual Photography

camera (captures light) synthetic image camera model (focuses simulated lighting)

processing

photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print

slide-3
SLIDE 3

Today’s Class

  • Advanced Ray Tracing

– Spatial Subdivision – Alternate approaches to the ray – Stochastic Ray Tracing

Ray Tracing - Basics

– Light rays are traced from the eye, through a viewing plane, into scene – When rays strike an object, further rays are spawned representing reflection and refraction. – These newly spawned rays can strike objects and spawn more rays, etc… – Light emitted is the sum or contributions from reflected and refracted rays

Ray Tracing - Basics

Sometimes you don’t hit an object

Ray Tracing - Basics

  • Illumination at each intersection point

d transmitte reflected local

I k I k I I

t r

+ + =

Local Illumination Determined using your favorite shading model Do only if shadow ray reaches a light source. kr & kt may be wavelength dependent

Ray Tracing - Basics

Ray Tracing - Practical Considerations

  • Problems with Ray Tracing

– Object - Ray Intersection – Ray traced images are point sampled

  • “Too sharp”
  • Sharp shadows
  • Sharp Reflection/Refraction
  • Aliasing
slide-4
SLIDE 4

Ray Tracing - Object - Ray Intersection

  • For each ray, intersection test needs to be

made for each object

– This could costly if you have may

  • bjects…consider if object == n polygons

– Solutions

  • Bounding Volume
  • Spatial Subdivision

Ray Tracing - Bounding Volumes

  • Place simple objects (i.e sphere or box)

around complex objects

  • Do initial intersection tests on bounding
  • bjects.
  • If ray intersects bounding volume, then test

complex bounded object

Ray Tracing - Spatial Subdivision

  • Subdivide your scene volume into

hierarchical regions

  • Create a tree structure that indicates for

each region:

– if the region is empty – the object present at that particular region

  • Test ray intersection with region volume

Ray Tracing - Spatial Subdivision

  • Motivation

– Without spatial subdivision, for each ray, you will need to query all objects/polygons and test for intersection – With spatial subdivision, you know which

  • bjects are in which volume so you only test
  • bjects that are in the volumes where a ray is

traveling.

Ray Tracing - Spatial Subdivision

Foley/Van Dam

Ray Tracing - Spatial Subdivision

  • Octrees

– Recursively subdivide volume into equal regions. – If subregion is empty, then stop – Otherwise further subdivide subregion. – Continue until each subregion is empty or contains a single object.

slide-5
SLIDE 5

Ray Tracing - Spatial Subdivision

  • Subdivisions represented as a tree

Ray Tracing - Spatial Subdivision

  • Let’s see how this is done in 2D

– Quadtree applet – http://njord.umiacs.umd.edu:1601/users/brabec/ quadtree/points/pointquad.html

Ray Tracing -- Octrees

  • Images from flipCode.com

Ray Tracing -- Octrees Ray Tracing -- Octrees Ray Tracing -- Octrees

slide-6
SLIDE 6

Ray Tracing -- Octrees

  • Questions?

Ray Tracing - Spatial Subdivision

  • Binary Space Partitioning Trees (BSP

Trees)

– Like Octrees but divides space into a pair of subregions – Subregions need not be equally spaced – Planes separating regions can be placed at

  • bject boundaries.

Ray Tracing - Spatial Subdivision

  • Octrees vs BSP Trees

Watt/Watt

Ray Tracing - Spatial Subdivision

  • BSP Trees

Watt/Watt

Ray Tracing - Spatial Subdivision

  • BSPTree applet

Ray Tracing - Spatial Subdivision

  • Advantages

– Efficient means for finding objects within your space – Compact representation

  • Disadvantages

– Preprocessing required – If scene changes, must rebuild your tree – Not foolproof

slide-7
SLIDE 7

Ray Tracing - Spatial Subdivision

  • Potential Problems

Watt/Watt

Ray Tracing - Spatial Subdivision

  • Octrees vs BSP trees

– BSP Trees are generally more balanced than Octrees – BSP Traversal more efficient – BSP Trees have additional storage overhead (must story subdivision planes)

Ray Tracing - Spatial Subdivision

  • Any questions?
  • Let’s break

Ray Tracing

  • Avoid that “ray traced look”

– Ray tracing is point sampling

  • 1 ray per pixel

– assumes pixel is a single point

  • 1 ray for transmission & reflection

– Assumes all reflection is specular – Assumes that BRDF for all incoming directions is single

  • ut going direction

Ray Tracing

  • Avoiding that “ray traced look”

– Two approaches

  • Trace objects other than rays
  • Stochastic sampling

Tracing things other than rays

  • Beam tracing – pyramidal beams
  • Cone tracing – cones
  • Pencil Tracing – bundle of rays
slide-8
SLIDE 8

Tracing things other than rays Tracing things other than rays

  • Same as traditional ray tracing except

– Intersection is a surface – Surfaces spawn more cones, beams, pencils – Intersection mathematics far hairier than traditional ray tracing

Stochastic Ray Tracing

  • Introduce randomness in ray spawning
  • Kajiya’s means for solving rendering

equation

– Either reflection or refraction is spawned – Can reflection can be spawned in diffuse direction – Multiple “paths” per pixel

Distributed Ray Tracing

  • Introduced by Cook, Porter, Carpenter in

1984.

  • Uses stochastic sampling to get rid of ray

traced look.

  • Performs anti-aliasing by introduction of

noise (by using “jittering”)

Distributed Ray Tracing

  • “Jitter” sampling

– Use Poisson “noise” to jitter values from

  • riginal “fixed” position

– Using “jittering” in

  • initial ray generation
  • reflection/transmission ray generation
  • show ray generation
  • jitter over time.

Distributed Ray Tracing

  • Poisson jittering

Foley/Van Dam

slide-9
SLIDE 9

Distributed Ray Tracing

  • Initial ray generation

– supersample - instead of 1 ray per pixel, shoot 16 rays per pixel. – Initial ray positions are not evenly spaced, rather distributed stochastically within pixel using “jittering”

Distributed Ray Tracing

Foley/Van Dam

Distributed Ray Tracing

  • Jittered ray generation

– Using a lens/camers model – Simulation of depth of field – First use on non-pinhole camera model in ray tracing

Distributed Ray Tracing

Focal length

Distributed Ray Tracing

  • Jittered ray generation

Watt/Watt

Distributed Ray Tracing

  • Depth of field example

[Cook84]

slide-10
SLIDE 10

Distributed Ray Tracing

  • Jittered Reflection

– Send out multiple rays jittered about the real reflection direction – Contribution of each ray to intensity weighted by a predefined “Importance” function (associated with the object’s reflectance properties)

Distributed Ray Tracing

  • Jittered Reflection

Watt/Watt

Distributed Ray Tracing

  • Jittered shadow rays

– Multiple jittered rays sent out toward light sources – Contribution of each determined by a predefined importance function (associated with the light) – Shadow rays return fraction of light seen rather than yes/no – Results in soft shadows

Distributed ray tracing

  • Soft Shadows

[Cook84]

Distributed Ray Tracing

  • Jittering in time

– Do ray tracing over a duration of time in which

  • bjects may move.

– Uses same rays repeatedly over time interval – Results in motion blur

Distributed Ray Tracing

  • Motion blur

[Cook84]

slide-11
SLIDE 11

Distributed Ray Tracing

  • Summary

– Stochastic sampling (“jitter sampling”) – Apply jittering to:

  • Initial ray selection

– Jittering on image plane + use of camera/lens model

  • Reflection / Transmittance
  • Shadow Rays
  • Over time

Advanced Ray Tracing

  • Summary

– Object-Ray Intersection

  • Space Partitioning

– Sampling problem

  • Cone / Pencil / Beam tracing
  • Stochastic Ray Tracing

– Distributed Ray Tracing

  • Questions?

Next Time

  • Advanced Radiosity

Remember

  • Class Web Site:

– http://www.cs.rit.edu/~jmg/cgII