1 Plan for today Computer Graphics as Virtual Photography Small - - PDF document

1
SMART_READER_LITE
LIVE PREVIEW

1 Plan for today Computer Graphics as Virtual Photography Small - - PDF document

Paper Summaries Any takers? Ray Tracing Optimizations Assignments Projects Checkpoint 1 Proposals due tonight All graded Didnt get a grade? See me! Checkpoint 2 Due Thursday(?) Logistics One more


slide-1
SLIDE 1

1

Ray Tracing Optimizations

Paper Summaries

  • Any takers?

Assignments

  • Checkpoint 1

– All graded – Didn’t get a grade? See me!

  • Checkpoint 2

– Due Thursday(?)

Projects

  • Proposals due tonight

Logistics

  • Job related news

– Co-op orientation

  • Friday, Sept 16th 12:00 – 1:30pm 70-1400
  • Friday, Oct 14th 1:00 – 2:30pm Eastman Aud.

– Career Fair

  • Wednesday, Sept 28th
  • 11am – 4pm
  • Gordon Field House

– EA Job offer

One more announcement

  • Electronic Arts (EA) is coming to RIT.

– Looking for a few (actually more than a few) good gaming programmers – EA Company Presentation

  • Tuesday, October 4th
  • 6-7:30pm
  • Golisano auditorium

– Interviews

  • Wednesday, October 5th (Career Center)
slide-2
SLIDE 2

2 Plan for today

  • Small change in plans

– Today:

  • Ray tracing optimization
  • Intro to Material Properties/BRDFs/Illumination

Models

– Thursday:

  • Practical considerations for Illumination Modeling
  • Raytracer – Checkpoint 3

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

Ray Tracing

  • Integrated aspects of light and object

interaction that had formerly been handled by separate algorithms:

– Hidden surface removal – Reflection – Refraction – Shadows – Global specular interaction

Turner Whitted

Ray Tracing - Problems

  • Object - ray intersection
  • Computation time
  • Ray traced images are point sampled

– “Too sharp” (super real) – “wrong image” – Sharp shadows – Sharp Reflection/Refraction

  • Multiple reflections especially are too sharp

– Aliasing

  • Doesn’t handle major light transport functions

– Diffuse interaction – Scattering of light – Caustics

Ray Tracing: Intersection

  • We only talked about ray intersection with spheres

and planes

  • What about?

– Boxes – Cylinders – Cones – Triangles – Spline surfaces – Irregular shapes

Ray Tracing - Object - Ray Intersection

  • For each ray, intersection test needs to be

made for each object

– This could costly if you have many

  • bjects…consider if object has n polygons, n

very large! – Solutions

  • Bounding Volume
  • Spatial Subdivision
slide-3
SLIDE 3

3

Ray Tracing - Bounding Volumes

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

around complex objects

– Suitability depends on object being enclosed!

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

complex bounded object

  • Can be nested

Ray Tracing - Bounding Volumes

[Watt/Watt,235]

Ray Tracing - Bounding Volumes

[Watt/Watt,236]

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 each volume so you only test
  • bjects that are in the volumes where a ray is

traveling.

Ray Tracing - Spatial Subdivision

  • Subdivide your scene volume into hierarchical

regions

– Octrees – BSP Trees

  • 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 - Octrees

  • Recursively subdivide volume into equal

regions.

  • If subregion is empty or contains a single
  • bject, then stop
  • Otherwise, further subdivide.
  • Continue until each subregion is empty or

contains a single object.

slide-4
SLIDE 4

4

Ray Tracing - Octrees

[Foley/Van Dam]

Ray Tracing – Oct(quad)trees

  • Subdivisions represented as a tree

[Watt/Watt,244]

Ray Tracing - Oct(quad)trees

  • Quadtree applet

http://njord.umiacs.umd.edu:1601/users/brabec/qu adtree/points/pointquad.html

Ray Tracing -- Octrees

  • Images from

http://www.flipcode.com/tutorials/tut_octrees.shtml

Ray Tracing -- Octrees Ray Tracing -- Octrees

slide-5
SLIDE 5

5 Ray Tracing -- Octrees

Shows viewing frustum and which “octants” need to be checked.

Ray Tracing - BSP Trees

  • 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,246]

Ray Tracing - BSP Trees

  • BSP Trees – Each non-terminal node represents a single

partitioning plane that divides space in two

[Watt/Watt,247]

Ray Tracing - BSP Trees

  • BSPTree applet

http://symbolcraft.com/graphics/bsp/index.html

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-6
SLIDE 6

6

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 as must store subdivision planes

Parallel Computing

  • What is it?

– Solving a problem by dividing it into tasks to be handled by separate processors

  • Why use it?

– Performance – Goal linear speedup

Parallel Hardware

  • SIMD

– Same instruction executed in lockstep fashion on different data

  • MIMD

– Different instructions executed

  • n different data
  • MIMD-SM
  • MIMD-DM

Parallel vs. Distributed

Parallel Distributed

Issues in Parallel Computing: Communication

  • More processors means more organization

is required (Consider working on a team of 10 people vs. 1000 people)

  • For performance, each processor must have

a lot of work to do in comparison with any need to communicate to another processor.

  • Keep all processors busy (load balancing)

RIT Ray Tracing 1991

975 objects 3 light sources 2048 X 2048 pixels Sun 4/490 – 1991 1.5 hours CPU time

slide-7
SLIDE 7

7 RIT Fractals and Ray Tracing 1991

87,000 objects 5 light sources 1024 X 1024 Sun 4/490 – 1991 18 hours CPU time

Ray Tracing

  • Ray tracing lends itself nicely to parallel

programming because the work can easily be sub-divided

– Per pixel calculation, i.e., not dependent on

  • ther pixels

– Potentially large calculation time

  • How to distribute work?

Image Space Partitioning

Strip = Section of Viewing Plane per Processor

Data Parallel strip division Processor 1 Processor 2 Processor 3 Processor 4 Processor 1 Processor 2 Processor 3 Processor 4 Data Parallel: Each processor does the rows marked with its color

Object Space Partitioning

Voxel = Section of scene data for processor

slide-8
SLIDE 8

8 Object Partitioning

Processor 3 Processor 2 Processor 1

Reinhard’s Parallel Example

Adaptive Partitioning to Load Balance

[Reinhard99 – thesis]

Partitioning for Ray Tracing

  • Object Space Partitioning

– May be necessary if very complex scene! – Less local processor memory needed for scene data – High delay when passing rays between processors means crossing machines

  • Object Partitioning

– Same as object space (just divided differently)

  • Image Space Partitioning

– Each local processor must have complete scene data – Messages are only sent to divide and reassemble, not while doing the work

Partitioning for Parallel Ray Tracing

  • Image space partitioning is the best choice
  • When might we use the others?

– Object Space Partitioning: when there is not enough local processor memory for the scene data – Object Partitioning: same as above when object complexity is similar

[Reinhard99 – thesis] [Reinhard98]

Image space partitioning won’t work here!

Ray Tracing Optimization

  • Summary

– Object-Ray Intersection

  • Bounding Volume
  • Spatial Subdivision

– Parallel Ray Tracing – break