Ray Tracing II CS5502 Fall 2006 (c) Chun-Fa Chang About Assignment - - PDF document

ray tracing ii
SMART_READER_LITE
LIVE PREVIEW

Ray Tracing II CS5502 Fall 2006 (c) Chun-Fa Chang About Assignment - - PDF document

Ray Tracing II CS5502 Fall 2006 (c) Chun-Fa Chang About Assignment 1 Start from module definitions (C/C++ header files). A good chance to learn C++. Late Penalty All assignments due at 23:5959.99 10% penalty for


slide-1
SLIDE 1

CS5502 Fall 2006 (c) Chun-Fa Chang

Ray Tracing II

CS5502 Fall 2006 (c) Chun-Fa Chang

About Assignment 1

  • Start from module definitions (C/C++

header files).

  • A good chance to learn C++.
  • Late Penalty

– All assignments due at 23:59’59.99” – 10% penalty for each day late

!Just Do It

slide-2
SLIDE 2

CS5502 Fall 2006 (c) Chun-Fa Chang

Advanced Ray Tracing

  • Make it fast.
  • Make it better.

– Anti-aliasing – Distributed Ray Tracing

CS5502 Fall 2006 (c) Chun-Fa Chang

Make It Fast

  • From Pharr’s Chapter 4

– Object subdivision (i.e., bounding volume) – Spatial subdivision (e.g., grid, octree, kd- tree) – Ray coherence.

slide-3
SLIDE 3

CS5502 Fall 2006 (c) Chun-Fa Chang

Anti-Aliasing

  • Super(or Over)-sampling
  • Adaptive vs. Non-adaptive
  • Uniform vs. Jittered
  • Detail coming in a future lecture

CS5502 Fall 2006 (c) Chun-Fa Chang

Distributed Ray Tracing

  • Published by R. L. Cook in 1984.
  • Antialiasing
  • Motion blur
  • Depth of field (camera)
  • Ideas behind other so-called Monte

Carlo methods.

slide-4
SLIDE 4

CS5502 Fall 2006 (c) Chun-Fa Chang

Space Partitions

CS5502 Fall 2006 (c) Chun-Fa Chang

Common Operations in 3D

  • Line/object intersection

– Given a ray or line, which object will it intersect?

  • View frustum culling
  • Collision detection
slide-5
SLIDE 5

CS5502 Fall 2006 (c) Chun-Fa Chang

Sorting/Indexing in 3D

  • Sequential search is too slow for large

models.

  • How about storing them in a 3D array?

– Size will be overwhelming

  • Think “hierarchy”

CS5502 Fall 2006 (c) Chun-Fa Chang

Octree

  • Divide the space in halves in X/Y/Z.

– Always split in the middle. – You may also consider them as splitting in X, then in Y, then in Z.

  • If too many objects are in a partition,

divide them again (recursively).

slide-6
SLIDE 6

CS5502 Fall 2006 (c) Chun-Fa Chang

K-D Tree

  • More flexible than octree:

– Not always splitted in the middle. – Split in X, then in Y, then in Z, or any order.

CS5502 Fall 2006 (c) Chun-Fa Chang

Kd-tree Example

1 1 2 3 2 3 4 5 6 7 4 5 6 7 8 9 10 11 12 13 8 9 10 11 12 13

Figure Source: CS638 slides by Stephen Chenney, University of Wisconsin – Madison,

slide-7
SLIDE 7

CS5502 Fall 2006 (c) Chun-Fa Chang

BSP Trees

  • From the paper by Fuchs et al, “On

visible surface generation by a priori tree structures” SIGGRAPH 80.

  • Binary Space Partition trees

– A sequence of cuts that divide a region of space into two

  • Cutting planes can be of any orientation

CS5502 Fall 2006 (c) Chun-Fa Chang

Drawing Order from BSP Trees

  • BSP tress can be used to order polygons

from back to front, or visa-versa

– Descend tree with viewpoint – Things on the same side of a splitting plane as the viewpoint are always in front of things on the far side

  • Can draw from back to front

– Gives the correct order for rendering transparent

  • bjects with a z-buffer, and by far the best way to

do it

  • Can draw front to back too.
slide-8
SLIDE 8

CS5502 Fall 2006 (c) Chun-Fa Chang

BSP Example

1 4 2 3 7 5 B A

  • ut

8 D

  • ut

6 C

  • ut

1 2 3 4 5 6 7 8

  • ut

A

  • ut

B C D

Figure Source: CS638 slides by Stephen Chenney, University of Wisconsin – Madison, CS5502 Fall 2006 (c) Chun-Fa Chang

OBB Tree

  • OBB stands for Oriented Bounding Box.
  • OBB is a rectangular bounding box at

an arbitrary orientation.

  • Asymptotically faster for close proximity

situations.