![Page 1: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/1.jpg)
Fast and Accurate Soft Shadows using Fast and Accurate Soft Shadows using a Real-Time Beam Tracera Real-Time Beam Tracer
Ravi Ramamoorthi
Columbia Vision and Graphics CenterColumbia University
http://www.cs.columbia.edu/~ravir
Intel, Mar 29, 2007
Joint work with Ryan Overbeck (Columbia), Bill Mark (UT Austin)
![Page 2: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/2.jpg)
Beam Tracing:
Reference Quality (Our Method)
Ray Tracing:
Comparable Time 4 Shadow Rays
Ray Tracing:
Comparable Quality 256 Shadow Rays
3 Seconds 3 Seconds 99 Seconds
Note that secondary effects (soft shadows) are often hard to accelerate in modern fast ray tracers
Result: Beam-Traced Soft ShadowsResult: Beam-Traced Soft Shadows
![Page 3: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/3.jpg)
OutlineOutline
Motivation
Beam Tracing Algorithm Beam-Triangle Intersection Beam-KD-tree Traversal
Analysis – Primary Visibility
Soft Shadows
Future Work
![Page 4: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/4.jpg)
BackgroundBackground
Renaissance of interest in ray tracing [Whitted 80]
Real-time ray tracing has become a reality by exploiting geometric coherence of rays in the scene Ray Packets [Wald et al. 2001] Frustum Proxies [Reshetov et al. 2005 (MLRTA)] SIMD instructions (Intel SSE2) to trace multiple rays
Ray tracing can produce significantly higher quality images than standard rasterization based algorithms Potential for a revolution in interactive graphics pipeline
![Page 5: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/5.jpg)
ChallengesChallenges
Problems with current Real-Time Ray Tracing algorithms How to use packets/frusta well for secondary visibility? More geometric coherence than current ray tracers use Per pixel operations (even simple shading) bottleneck Can’t yet afford to subsample pixels leading to aliasing
Our solution: Real-Time Beam Tracing Trace beams instead of individual rays Old technique [Heckbert Hanrahan 84] but previously
considered too slow, complicated
![Page 6: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/6.jpg)
Beam Tracing Beam Tracing
Start with beam and scene geometry For primary visibility, the beam is the view frustum
![Page 7: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/7.jpg)
Beam TracingBeam Tracing
The beam is intersected against the first geometry primitive
![Page 8: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/8.jpg)
Beam TracingBeam Tracing
The beam is split against the primitive’s boundaries (triangle edges)
![Page 9: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/9.jpg)
Beam TracingBeam Tracing
The beam is split against the primitive’s boundaries (triangle edges)
![Page 10: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/10.jpg)
Beam TracingBeam Tracing
Each sub-beam is intersected against the other primitives and is recursively split
![Page 11: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/11.jpg)
Beam TracingBeam Tracing
Each sub-beam is intersected against the other primitives and is recursively split
![Page 12: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/12.jpg)
Beam TracingBeam Tracing
Each sub-beam is intersected against the other primitives and is recursively split
![Page 13: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/13.jpg)
Beam TracingBeam Tracing
Each sub-beam is intersected against the other primitives and is recursively split
![Page 14: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/14.jpg)
Beam TracingBeam Tracing
Each sub-beam is intersected against the other primitives and is recursively split
![Page 15: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/15.jpg)
Beam TracingBeam Tracing
Each sub-beam is intersected against the other primitives and is recursively split
![Page 16: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/16.jpg)
Beam TracingBeam Tracing
The result is the visible surface of the scene
![Page 17: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/17.jpg)
Beam TracingBeam Tracing
The final hit beams often contain many samples/pixels, for large performance gains
![Page 18: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/18.jpg)
Beam Tracing addresses ChallengesBeam Tracing addresses Challenges
How to efficiently address secondary visibility? Large coherent area samples for hard shadows Only need area coverage on light for soft shadows
More geometric coherence than current ray tracers Automatically adapts to (all) available coherence Only split beam when necessary, at triangle boundaries
Per pixel (even simple shading) bottleneck Returns area samples instead of point samples Independent of resolution, combines with GPU, software
Aliasing: Can’t yet afford to subsample pixels Area elements: can inherently be antialiased on GPU
![Page 19: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/19.jpg)
Beam Tracing: Cons and Contrib.Beam Tracing: Cons and Contrib.
Little work since HH84 (considered slow technique) Beam-Triangle intersection is slow vs ray-triangle No effective acceleration structures, fast traversals Often used in acoustics [Funkhouser 98,99]
Contributions Fast Beam-Triangle Intersections Fast Beam-Kd-tree traversal Includes modern ray tracing accelerations, SSE Application to primary, secondary visibility
![Page 20: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/20.jpg)
Beam Tracing: In ActionBeam Tracing: In Action
![Page 21: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/21.jpg)
OutlineOutline
Motivation
Beam Tracing Algorithm Beam-Triangle Intersection Beam-KD-tree Traversal
Analysis – Primary Visibility
Soft Shadows
Future Work
![Page 22: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/22.jpg)
Beam-Triangle IntersectionBeam-Triangle Intersection
Beam intersects triangle and splits That part that hits, and that part that misses
High-Level Algorithmic Decisions Mirror ray-triangle intersection, diverging only if needed Parallelize through use of SIMD SSE Instructions Operate on (3 or 4) corners of beam as if single ray
Algorithm Overview Triangle projection (into 2D image plane) Handle trivial cases (no splitting) Beam splitting
![Page 23: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/23.jpg)
Beam—Triangle IntersectionBeam—Triangle Intersection
Key to efficient intersection is separating trivial from non-trivial interactions.
Beam Triangle
![Page 24: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/24.jpg)
Beam—Triangle IntersectionBeam—Triangle Intersection
Beam—Triangle Interaction Trivial
Triangle Edge Separator
Non-Trivial
![Page 25: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/25.jpg)
Beam—Triangle IntersectionBeam—Triangle Intersection
Beam—Triangle Interaction Trivial
Triangle Edge Separator Beam Edge Separator
Non-Trivial
![Page 26: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/26.jpg)
Beam—Triangle IntersectionBeam—Triangle Intersection
Beam—Triangle Interaction Trivial
Triangle Edge Separator Beam Edge Separator Beam Inside Triangle
Non-Trivial
![Page 27: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/27.jpg)
Beam—Triangle IntersectionBeam—Triangle Intersection
Beam—Triangle Interaction Trivial
Triangle Edge Separator Beam Edge Separator Beam Inside Triangle
Non-Trivial Everything else
SPLIT the beam
![Page 28: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/28.jpg)
Beam—Triangle IntersectionBeam—Triangle Intersection
Beam—Triangle Interaction Trivial
Triangle Edge Separator Beam Edge Separator Beam Inside Triangle
Non-Trivial Everything else
SPLIT the beam
![Page 29: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/29.jpg)
Beam—Triangle: Split ProcedureBeam—Triangle: Split Procedure
For each edge Split beam into 2 sub-beams
Result is 2 sets of sub-beams Possible Hit beams Miss beams
Miss Beam
Possible Hit Beam
![Page 30: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/30.jpg)
Beam—Triangle: Split ProcedureBeam—Triangle: Split Procedure
For each edge Split each potential hit beam into 2 sets of sub-beams
Result is 2 sets of sub-beams Potential Hit beams Miss beams
![Page 31: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/31.jpg)
Beam—Triangle: Split ProcedureBeam—Triangle: Split Procedure
For each edge Split each potential hit beam into 2 sets of sub-beams
Result is 2 sets of sub-beams Potential Hit beams Miss beams
![Page 32: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/32.jpg)
Beam—Triangle: Split ProcedureBeam—Triangle: Split Procedure
Sometimes an extra split is required to restrict beams to having only 3 or 4 corner rays.
![Page 33: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/33.jpg)
Beam—Triangle: Split ProcedureBeam—Triangle: Split Procedure
Final result is 2 lists of beams Hit Beams (yellow) Miss Beams (red)
![Page 34: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/34.jpg)
Beam-Triangle – Other splitsBeam-Triangle – Other splits
Other split cases handled in same way
In the paper we describe a fast new data parallel algorithm (using SIMD SSE instructions) for performing this beam—triangle clipping.
![Page 35: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/35.jpg)
Beam-Triangle Intersect. – PerformanceBeam-Triangle Intersect. – Performance
15-40 FPS 5-10 FPS~800 Triangles ~2000 Triangles
![Page 36: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/36.jpg)
OutlineOutline
Motivation
Beam Tracing Algorithm Beam-Triangle Intersection Beam-KD-tree Traversal
Analysis – Primary Visibility
Soft Shadows
Future Work
![Page 37: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/37.jpg)
Rays vs. kd-tree -> Rays vs. SlabsRays vs. kd-tree -> Rays vs. Slabs
x
y
1x 2x
1y
2y
Ray – kd-tree traversal based on slabs
![Page 38: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/38.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
The current bounding box is the intersection of slabs
X slab
Y slab
Current Bounding Box
![Page 39: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/39.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
This ray intersects the current bounding box
![Page 40: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/40.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
We calculate the ray’s entry (tmin) and exit (tmax) distance for each slab
minxt
maxxt
![Page 41: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/41.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
We calculate the ray’s entry (tmin) and exit (tmax) distance for each slab
minxt
maxxt
minyt
maxyt
![Page 42: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/42.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
If the ray enters each slab before it exits any other slab, then it hits the bounding box
minxt
maxxt
minyt
maxyt
maxminyx tt maxminxy tt
![Page 43: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/43.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
How do we know that this ray misses the bounding box?
maxxt
minyt
maxyt
![Page 44: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/44.jpg)
Rays vs. SlabsRays vs. Slabs
x
y
1x 2x
1y
2y
Because it exits the x slab before it enters the y slab
maxxt
minyt
maxyt
maxminxy tt
![Page 45: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/45.jpg)
Rays vs. kd-treeRays vs. kd-tree
x
y
1x 2x
1y
2y
For a ray in a kd-tree, it is enough for a ray to keep track of where the ray enters the current bounding box (tmin) and where it exits (tmax)
minmin ttx
maxmax tt y
![Page 46: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/46.jpg)
Beams vs. kd-treeBeams vs. kd-tree
How do we trace a beam through a kd-tree?
![Page 47: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/47.jpg)
Beams vs. kd-treeBeams vs. kd-tree
How do we trace a beam through a kd-tree?
Kd-treeCurrent Bounding Box
![Page 48: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/48.jpg)
Beams vs. kd-treeBeams vs. kd-tree
How do we trace a beam through a kd-tree?
Beam
![Page 49: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/49.jpg)
Beams vs. kd-treeBeams vs. kd-tree
If we just use the tmins and tmaxes from the corner rays, the tmin/tmax points define a near and far plane for the active part of the beam. This works as long as all four corners take the same
path through the tree.
tmins
tmaxes
![Page 50: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/50.jpg)
Beams vs. kd-treeBeams vs. kd-tree
But if the next split plane causes the beam’s rays to take different paths…
Next split plane
![Page 51: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/51.jpg)
Beams vs. kd-treeBeams vs. kd-tree
…the new tmax value lies on a different kd plane from the other tmax values…
New tmax
![Page 52: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/52.jpg)
Beams vs. kd-treeBeams vs. kd-tree
…and the new tmaxes define a new far plane…
![Page 53: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/53.jpg)
Beams vs. kd-treeBeams vs. kd-tree
…which doesn’t fully represent the active portion of the beam.
Under-represented area
![Page 54: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/54.jpg)
Beams vs. kd-treeBeams vs. kd-tree
This causes problems in 3D, when the corner of a split plane passes through a face of the beam. The beam on the right will only traverse the far side of
the split plane when both sides should be visited
![Page 55: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/55.jpg)
Beams vs. kd-treeBeams vs. kd-tree
Another option…
![Page 56: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/56.jpg)
Beams vs. kd-treeBeams vs. kd-tree
Split the beam where the split plane passes through the far plane of the active beam.
Beam split
![Page 57: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/57.jpg)
Beams vs. kd-treeBeams vs. kd-tree
This assures that the tmins/tmaxes of all corner rays lie on the same kd-plane.
This works, but excessive splitting leads to slower render times.
![Page 58: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/58.jpg)
Beams vs. kd-treeBeams vs. kd-tree
Instead we keep multiple tmin/tmax values, one for each dimension.
tmaxx
tmaxy
![Page 59: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/59.jpg)
Beams vs. kd-treeBeams vs. kd-tree
The active part of the beam is the intersection of the beams defined by these planes.
Active part of beam
![Page 60: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/60.jpg)
Beams vs. kd-treeBeams vs. kd-tree
To traverse the tree, we much check the tmins/tmaxes on all dimensions
Example: If all of the beam’s tmax values for the x-slab are less than the distance to the current split plane, only the near side of the plane needs to be traversed.
![Page 61: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/61.jpg)
OutlineOutline
Motivation
Beam Tracing Algorithm Beam-Triangle Intersection Beam-KD-tree Traversal
Analysis – Primary Visibility
Soft Shadows
Future Work
![Page 62: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/62.jpg)
Beam Tracing – Primary VisibilityBeam Tracing – Primary Visibility
Trace primary beams, obtain hit beams (areas)
Hit beams as quads to GPU for rasterization Area elements exactly represent visible surface of
scene (often much more compact than all triangles)
Compact area elements enable GPU per-pixel shaders, 6x antialiasing (ray tracing slows down)
Resolution independent (same time for 1024x1024 or higher as for 512x512)
![Page 63: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/63.jpg)
Comparison SetupComparison Setup Average numbers over multiple views (all methods)
Beams vs Rays (our optimized) vs MLRT (Intel) Our ray tracer optimized, but one at a time (useful for
comparing statistics) MLRT uses one thread, with shading, display no quad
optimization. Diffuse shading, single source at viewer
kd-trees from MLRT (tuned to their performance)
1024x1024 resolution
Beams antialiased (for free). MLRT, rays not.
3.0 GHZ Pentium 4, 1.5GB RAM, ATI 9800 card
![Page 64: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/64.jpg)
Beam Tracing – Primary VisibilityBeam Tracing – Primary Visibility
![Page 65: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/65.jpg)
Simple Scene Erw6 Simple Scene Erw6
Beam Tracer: 169.49 FPS
MLRT: 12.99 FPS
816 Triangles (150 visible tris ; few hit beams)
Beams Rays
Kd steps
per pixel
0.0085 13.86
Intersect.
per pixel
0.0033 6.81
Hits per
Pixel
0.0010 0.95
Frame Rate
169.49 fps
0.99 fps
![Page 66: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/66.jpg)
Complex Scene: Soda Hall Complex Scene: Soda Hall
Beam Tracer: 21.28 FPS
MLRT: 5.56 FPS
Z-buffer (GPU): 13-15 FPS
2M Triangles (1500 visible tris)
Beams Rays
Kd steps
per pixel
0.13 42.36
Intersect.
per pixel
0.064 4.29
Hits per
Pixel
0.0097 0.98
Frame Rate
21.28 fps
0.52 fps
![Page 67: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/67.jpg)
Armadillo (subpixel tris; worst case)Armadillo (subpixel tris; worst case)
Beam Tracer: 1.72 FPS
MLRT: 5.99 FPS
345K Triangles (26000 visible tris)
Beams Rays
Kd steps
per pixel
1.07 46.46
Intersect.
per pixel
0.60 5.47
Hits per
Pixel
0.14 0.99
Frame Rate
1.72 fps
0.44 fps
![Page 68: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/68.jpg)
Number of Hit Beams: Beam SplittingNumber of Hit Beams: Beam Splitting
# Hit Beams ~= 6 x # Visible Triangles
![Page 69: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/69.jpg)
Beam Tracing: Hard ShadowsBeam Tracing: Hard Shadows
Qualitative benefits over ray tracing: Large coherent regions for secondary visibility
![Page 70: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/70.jpg)
Beam Analysis – Primary RaysBeam Analysis – Primary Rays
Qualitative benefits over ray tracing: Large coherent regions for secondary beams High quality anti-aliased primary visibility AND
secondary visibility
Beam Tracer anti-aliased
MLRT (ray tracer) without anti-aliasing
![Page 71: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/71.jpg)
Video 1Video 1
![Page 72: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/72.jpg)
OutlineOutline
Motivation
Beam Tracing Algorithm Beam-Triangle Intersection Beam-KD-tree Traversal
Analysis – Primary Visibility
Soft Shadows
Future Work
![Page 73: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/73.jpg)
Soft ShadowsSoft Shadows
Connect pixel with beam to area light vertices
Only need total area coverage on light source
![Page 74: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/74.jpg)
Suitability for Soft ShadowsSuitability for Soft Shadows
Range where beam tracing is most useful
Typically less than 10 visible tris per pixel
Observe that hit beams 2x number visible triangles (not 6x as in primary visibility)
10x – 40x faster than ray tracing
Can be much faster than soft shadow volumes [Laine et al. 2005, Lehtinen et al. 2006]
![Page 75: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/75.jpg)
Soft Shadows – Plant (512x512)Soft Shadows – Plant (512x512)
Only 5245 triangles, but high shadow complexity
Almost every edge a silhouette edge
Ray Tracing: Comparable Time Beam Tracing: ExactRay Tracing: Comparable Quality (256 shadow rays)
5 seconds / 9 shadow rays 5 seconds 108 seconds
![Page 76: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/76.jpg)
Soft Shadows – Soda (512x512)Soft Shadows – Soda (512x512)
Ray Tracing: Comparable Time Beam Tracing: ExactRay Tracing: Comparable Quality (256 shadow rays)
1.84 seconds / 4 shadow rays 1.78 seconds 79 seconds
![Page 77: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/77.jpg)
Video 2Video 2
![Page 78: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/78.jpg)
SummarySummary
New algorithms for real-time beam tracing
New method for fast soft shadows
Beam tracing has many benefits over ray tracing Can be significantly faster when required sample
density is higher than the required geometric fidelity Area Samples vs. Point Samples Antialiasing, shading Perfect soft shadows and other secondary effects
Beam tracing old technique, assumed slow No longer true, viable method for real-time, shadows
![Page 79: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/79.jpg)
Future WorkFuture Work
Area to area beams for faster soft shadows
Fall back on point samples when geometric fidelity is too high (tris smaller than pixel)
Multiresolution representations (aka Razor)
Explore other visual effects Specular to diffuse interactions (Caustics) Glossy reflections
![Page 80: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/80.jpg)
The FutureThe Future
What is the future rendering algorithm?
Hybrid Beam Tracing/GPU ?
Hybrid Beam Tracing/Ray Tracing?
How does it depend on visual effects needed?
On future architectures?
![Page 81: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/81.jpg)
Research ProjectsResearch Projects
High quality real-time rendering Real-time ray tracing All-frequency interactive relighting Volumetric scattering in mist, fog, rain
Data-driven appearance acquisition, rendering
Complex lighting, materials in computer vision
Mathematical foundations of appearance
![Page 82: Fast and Accurate Soft Shadows using a Real-Time Beam Tracer Ravi Ramamoorthi Columbia Vision and Graphics Center Columbia University ravir](https://reader036.vdocuments.mx/reader036/viewer/2022062516/56649d355503460f94a0d4c2/html5/thumbnails/82.jpg)
The EndThe End