1 Interactive Point Based Ray Tracing Interactive Point Based Ray Tracing June 21, 2005 June 21, 2005 Interactive Ray Tracing of Point-based Models Ingo Wald SCI Institute, University of Utah [email protected]
Dec 18, 2015
11Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Interactive Ray Tracingof Point-based ModelsInteractive Ray Tracingof Point-based Models
Ingo Wald SCI Institute, University of Utah
22Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
MotivationMotivation
• Why point-based rendering ?– Many advantages, but no details here …
• But: Why point-based ray tracing ?– Actually, two different questions:
• Q1: Why ray tracing for point-based models ?
• Q2: Why use point-based techniques in ray tracing ?
33Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q1: Why Ray Tracing ?Q1: Why Ray Tracing ?
• Reason 1: Logarithmic scalability to large models– Very handy for today‘s huge models
– But: For PBR not that important (multiresolution)…
• Reason 2 : Image quality / shading quality– Ray traced image quality not yet standard in PBG…
• But would benice to have
44Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? • Native point-based data (acquisition)
– Direct ray tracing avoids tesselation• Much simpler
• And for native triangular models ?– Triangular model Point-based model PBRT
• Does this make sense ?
– Highly controversial issue amongst ray tracing researchers• RT is log. in #tris, anyway. Don‘t need multiresolution…
• Many new problems with points as primitives
– Consistency, efficiency, loss of information…
55Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? Interactive ray tracing: Three recent examples
66Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? Interactive ray tracing: Three recent examples
– Example 1: Boeing 777 (350 million triangles, 40 GB data)
77Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? Interactive ray tracing: Three recent examples
– Example 2: Lawrence Livermore isosurface (8 billion voxels)
88Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? Interactive ray tracing: Three recent examples
– Example 3: Forest landscape (1.5 billion triangles)
99Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? Interactive ray tracing: Three recent examples
– Yes, can render all three already today without PB techniques
– But: Doesn‘t make sense (>1G prim. for <1M pixels ?)• Too much data: Tiny camera movetotally different data
– Even though image doesn‘t change at all…
• Sample only every 1000th pixel Severe aliasing
– Aliasing: THE most important problem of RTRT today
Need multiresolution approach also for RT– Probably best via PB approach
• Current results only intermediate step…
• … towards long-term goal of multiresolution (PB)RT
1010Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Problem: Zero ray-point hit probability – Rays infinitely thin
– Points infitnitely thin, too
• Two possible solutions– Use „thick“ rays that have volume (cones, beams, …)
• Reconstruct from all points overlapping ray‘s volume
– „Grow“ points to have a surface • can then be found by „thin“ ray
– Long history of debate on which is better…
1111Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 1: Growing rays– Experience: Tracing beams very costly (much more than rays)
1212Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 1: Growing rays– Many un-answered questions
• Where exactly is the hit point ?
– E.g., where to start the shadow ray from ?
Hitpoint Hitpoint position ?position ?
Position APosition Apoints gathered points gathered
by beamby beam
1313Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 1: Growing rays– Many un-answered questions
• Where exactly is the hit point ?
• How stable is the decision ?
Hitpoint Hitpoint position ?position ?
Position APosition Apoints gathered points gathered
by beamby beam
1414Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 1: Growing rays– Many un-answered questions
• Where exactly is the hit point ?
• How stable is the decision ?
• Is it consistent ?
– E.g., when viewed from different angle (shadow ray)
Hitpoint Hitpoint position ?position ?
Same surface, different Same surface, different viewpoint: viewpoint:
Same hitpoint ?Same hitpoint ?
Is it in shadow ?Is it in shadow ?
surface seen from Asurface seen from APosition APosition APosition B Position B (Light ?)(Light ?)
1515Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 1: Growing rays– Many un-answered questions
• Where exactly is the hit point ?
• How stable is the decision?
• Is it consistent ?
Too many open questions
1616Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 2: Growing points– Define unique surface through points
• Always consistent
– Most trivial solution: Use disks/ellipses/…• Trivial
1717Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 2: Growing points– Define unique surface through points
• Always consistent
– Most trivial solution: Use disks/ellipses/…• Trivial, but shading discontinuities (worse w/ shadows)
1818Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Better: Define smooth surface– Use Adamson/Alexa‘s model
• Each point xi has normal ni and radius ri of influence
• Influence wi falls off with distance to xi
– With wi(xi)=1 and wi(x)=0 for all |x-xi|>ri
• Define weighted average position X(x) and N(x)
• Define „distance“ function F(x) := ((x-X(x)).N(x)
Implicit fct F(x)=0 is smooth surface
– Need:
• Useful ri ‘s (not given)
• Fast ray/surface intersection framework
1919Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Choosing Splat RadiiChoosing Splat Radii
• Step 1: Choosing the splat radii– Too small Holes in the model
– Too large Many regions of influence will overlap (slow)
• Use Wu et al.‘s optimal subsampling technique– Wu [EG04]: Determine ri such as to
• Optimally cover surface
• Achieve minimal overlap
Optimal solution: Use exactly that technique
• Note: Can also use ‚other‘ radii – e.g., user-specified…
– Might just be slower or contain holes
2020Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with– Each point x always influenced by only few xi
AA
BB
CC
DD
2121Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
AA
BB
CC
DD
2222Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
• Build kd-tree over those AA boxes
AA
BB
CC
DD
2323Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
• Build kd-tree over those AA boxes
AA
BB
CC
DD
2424Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
• Build kd-tree over those AA boxes
AA
BB
CC
DD
2525Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
• Build kd-tree over those AA boxes
AA
BB
CC
DD
2626Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
• Build kd-tree over those AA boxes
• Leaves: Store list of splats whose ROI overlaps cell
AA
BB
CC
DDA,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
--
--
(right side (right side incomplete)incomplete)
2727Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 2: Determining the splats to intersect with• Enclose each splat‘s ROI with tight fitting box
• Build kd-tree over those AA boxes
• Leaves: Store list of splats whose ROI overlaps cell
– KD-Tree: Inherit advantages of fast triangular ray tracing• Fast traversal, occlusion culling, good kd-trees (SAH)…
AA
BB
CC
DDA,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
--
--
2828Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Intersecting the SurfaceIntersecting the Surface
• Step 3: Ray/surface intersection in each voxel– Find distance t : F(t)=0
– Equidistant sampling along t
• Have intersection if sgn(F(ti+1)) != sign(F(ti))
• But: Too coarse sampling can miss the surface
– Optimizations: Fast SSE implementation (no details)
• Quite fast, but: Still main cost factorFurther optimize kd-tree to minimize F(x) calls
– Need to take closer look at kd-tree
2929Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 1: Many full cells don‘t contain surf.– Reason: KD-tree was built over ROI‘s
• ROI‘s bound surface, but not closely
3030Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 1: Many full cells don‘t contain surf.– Example from before
AA
BB
CC
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
--
A,B,CA,B,CA,B,CA,B,C
3131Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 1: Many full cells don‘t contain surf.– Actual surface only touches few voxels
AA
BB
CC
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
-- A,B,CA,B,C
A,B,CA,B,CA,B,CA,B,C
3232Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 1: Many full cells don‘t contain surf. – Many non-empty cells that are not necessary
AA
BB
CC
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
-- A,B,CA,B,C
A,B,CA,B,CA,B,CA,B,C
3333Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 1: Many full cells don‘t contain surf. – Many non-empty cells that are not necessary
• Can make quite a difference
AA
BB
CC
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
-- A,B,CA,B,C
A,B,CA,B,CA,B,CA,B,C
3434Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 1: Many full cells don‘t contain surf.
• Fix: Determine min(F()) and max(F()) in each cellCull cells with min > 0 or max < 0
– Currently: Sample F with random xCan produce false culling (holes)
– Better: Interval arithmetic (Not implemented yet)
3535Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 2: Most cells too large– Reason: Only split planes at ROI borders
– Example from earlier-on:
AA
BB
CC
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
--
3636Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 2: Most cells too large– Reason: Only split planes at ROI borders
– Example from earlier-on: Green regions would suffice…
AA
BB
CC
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
--
AA
3737Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 2: Most cells too large– Reason: Only split planes at ROI borders
– Example from earlier-on: Green regions would suffice…
• Fix: Post-shrinking of cells – Cut voxel into slices, cull slices
• Same problem as before: False culling…
• Important: Not only fewer cell intersections…– Also: Cells much thinner: Finer sampling, fewer artifacts
3838Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 3: After shrink/cull, many cells empty– Example from earlier-on: Most cells empty after cull/shrink
A,BA,B
AA
AA A,B,CA,B,C
BB
CC
B,CB,C
----
--
3939Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 3: After shrink/cull, many cells empty– Example from earlier-on: Most cells empty after cull/shrink
CC
A,BA,B
B,CB,C
AA
4040Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
KD-Tree Post-optimizationsKD-Tree Post-optimizations
• Observation 3: After shrink/cull, many cells empty– Example from earlier-on: Most cells empty after cull/shrink
– Optimization: Post-collapse• Undo splits that don‘t make sense any more
CC
A,BA,B
B,CB,C
AA
4141Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
ResultsResults
• Overall Framerate:1Dual-Opteron 2.4GHz, 512x512
Model Size Diffuse Phong w/Shadows
Iphigenia Head 1M 6.8 Not measured
Iphigenia Full 1M 15.9 Not measured
Octopus 465K 8.9 7.5
Dragon 1.3M 7.4 7.1
David 1.5M 11.2 7.9
4242Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
ResultsResults
• Overall Framerate: ~5-15 fps @ 1PC
• Nice scalability to very complex models– „ManyIffis“: 24M points w/ shadows ~2fps@1PC
4343Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
ResultsResults
• Overall Framerate: ~5-15 fps @ 1PC
• Nice scalability to very complex models
• High-quality shading– Global Illumination
4444Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
ResultsResults
• Overall Framerate: ~5-15 fps @ 1PC
• Nice scalability to very complex models
• High-quality shading
• Problems and limitations:– Sometimes small holes (false culling, undersampling, …)
– All is static: Can‘t move points, can‘t change radii
– Assumes continuous surface: • Not applicable to random point cloud (forest leaves…)
4545Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Summary & Future WorkSummary & Future Work
• Summary– Motivated/Argued for Point-based Ray Tracing
– Discussed „thin rays“ vs „thick rays“ issue
– Outlined framework for Interactive PBRT
• Future work– Performance & Stability
• Bounding the surface, interval arithmetic, …
– Multiresolution PBRT• In particular, for massively complex models
4646Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Questions ?Questions ?
4747Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Questions ?Questions ?
4848Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q1: Why Ray Tracing ?Q1: Why Ray Tracing ?
• Impact of Shadows and Reflections: Example
4949Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q2: Why Point-based techniques in Ray Tracing? Q2: Why Point-based techniques in Ray Tracing? • Need multiresolution approach also for RT
– Trivial for „nice“ (manifold) meshes (Progressive meshes,…)
– But: „problematic“ for real-world models (Forest, Boeing, …)• Should be much easier for point-based representation
Eventual goal of (our) PBRT activities– Not ray tracing (nice) point-based models
– Rather: Multiresolution ray tracing using a PB approach• Reduce (in-core) data
• Fight aliasing
– Current activities only first step in that direction…
5050Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Adamson&Alexa‘s modelAdamson&Alexa‘s model
• Observations– Need position and normal for each point assume as given
– Need radius of influence for each point
– For each x, most wi(x) will be zero
• Fast computation: Need to know which...
– Evaluating F(x) will be costly• Need to minimize F(x) calls
• Need to quickly determine where surface can NOT be
• Need to minimize number of points contributing to x
Need to minimize regions of influence (minimize ri !)
5151Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
So: Why Interactive Point-based Ray Tracing ? So: Why Interactive Point-based Ray Tracing ? Advantages of PBG in particular for ray tracers:
• Native point-based data (acquisition)– Avoid tesselation … sure, makes sense.
• And for native triangular models ?– Triangular model Point-based model PBRT
• Does this make sense ?
5252Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
So: Why Interactive Point-based Ray Tracing ? So: Why Interactive Point-based Ray Tracing ? Advantages of PBG in particular for ray tracers: Highly controversial issue amongst ray tracers
– Ray tracing is logarithmic in scene size, anyway• Don‘t need point-based multiresolution capabilities
– Triangles very well suited for fast ray tracing• How to (efficiently) intersect points ?
– Triangles: well-defined surface• How to consistently intersect points ?• In particular for secondary rays
– shadow ray has to see exactly the same surface• Sampling: Loss of information ?
Many new problems, PBG advantages over rast. don‘t apply…Where are the advantages ?
5353Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Q1: Why Ray Tracing Q1: Why Ray Tracing
• Impact of Shadows and Reflections: Example
5454Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Motivation:Why Point-based Rendering ?Motivation:Why Point-based Rendering ?• Point-based models become commonplace
– Acquisition: Almost all models are point clouds• Direct PBR simplifies 3D processing pipeline
– Today: Acquisitiontriangulationrendering
– Direct PBR: Get rid of (non-trivial) triangulation
– Plus: Increasing use in rendering/modelling• Multiresolution, no connectivity/topology, much simpler,…
5555Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
Motivation:Why Point-based Rendering ?Motivation:Why Point-based Rendering ?• Point-based models become commonplace
– Acquisition: Almost all models are point clouds• Direct PBR simplifies 3D processing pipeline
– Today: Acquisitiontriangulationrendering
– Direct PBR: Get rid of (non-trivial) triangulation
– Plus: Increasing use in rendering/modelling• Multiresolution, no connectivity/topology, much simpler,…
• But – Why point-based ray tracing ?– Actually, two different questions:
• Q1: Why ray tracing for point-based models ?
• Q2: Why point-based approach to ray tracing ?
5656Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
OutlineOutline
• Motivation– Why point based ray tracing
• Our approach– Thin rays vs thick rays
– Fast traversal and intersection
• Results
• Summary and Future Work
5757Interactive Point Based Ray TracingInteractive Point Based Ray TracingJune 21, 2005June 21, 2005
How to ray trace PB models ?How to ray trace PB models ?
• Alternative 1: Growing rays– Many un-answered questions
• Where exactly is the hit point ?
• How sensitive is the procedure to exact form of beam ?
– E.g., what if the beam were traced a little bit further ?
Hitpoint Hitpoint position ?position ?
Position APosition Apoints gathered points gathered
by beamby beam
Same surface ?Same surface ?