Real-time Acquisition and
Real-time Acquisition and
Rendering of Large 3D
Rendering of Large 3D
Models
Models
Szymon Rusinkiewicz
Computer Graphics Pipeline
Computer Graphics Pipeline
• Human time = expensiveHuman time = expensive • Sensors = cheapSensors = cheap
– Computer graphics increasingly relies onComputer graphics increasingly relies on measurements of the real world
measurements of the real world Rendering Rendering Rendering Rendering Shape Shape Shape Shape Lighting Lighting and and Reflectance Reflectance Lighting Lighting and and Reflectance Reflectance Motion Motion Motion Motion Shape
3D Scanning Applications
3D Scanning Applications
• Computer Computer graphics graphics • Product Product
inspection inspection • Robot Robot
navigation navigation • As-built As-built
floorplans floorplans
• Product designProduct design • ArchaeologyArchaeology
The Digital Michelangelo
The Digital Michelangelo
Project
Project
• Push state of the art in range Push state of the art in range scanning and demonstrate
scanning and demonstrate
applications in art and art history applications in art and art history
Working in Working in the museum
the museum Scanning Scanning geometry
geometry Scanning Scanning
Traditional Range Scanning
Traditional Range Scanning
Pipeline
Pipeline
• High-quality, robust pipeline for High-quality, robust pipeline for
producing 3D models: producing 3D models:
– ScanScan object with laser triangulation object with laser triangulation
scanner: many views from different angles scanner: many views from different angles
– AlignAlign pieces into single coordinate frame: pieces into single coordinate frame: initial manual alignment, refined with ICP initial manual alignment, refined with ICP
– MergeMerge overlapping regions: compute overlapping regions: compute
“average” surface using VRIP [Curless & “average” surface using VRIP [Curless &
Levoy 96] Levoy 96]
3D Scan of David:
3D Scan of David:
Statistics
Statistics
• Over 5 meters tallOver 5 meters tall
• 1/4 mm resolution1/4 mm resolution
• 22 people22 people
• 30 nights of scanning30 nights of scanning
• Efficiency max : min = 8 : 1Efficiency max : min = 8 : 1
– Needed view planningNeeded view planning
• Weight of gantry: 800 kgWeight of gantry: 800 kg
• Putting model together:Putting model together: 1000+ man-hours and 1000+ man-hours and counting
New 3D Scanning Pipeline
New 3D Scanning Pipeline
• Need for a fast, inexpensive,Need for a fast, inexpensive,
easy-to-use 3D scanning system
easy-to-use 3D scanning system
• Wave a (small, rigid) Wave a (small, rigid)
object by hand in front of
object by hand in front of
the scanner
the scanner
• Automatically align data Automatically align data
as
as
it is acquired
it is acquired
• Let user see partial Let user see partial
model as it
model as it
is being built – fill holes
is being built – fill holes
Real-Time Model Acquisition
Real-Time 3D Model
Real-Time 3D Model
Acquisition
Acquisition
• Prototype real-time model Prototype real-time model acquisition system
acquisition system
– 3D scanning of moving objects3D scanning of moving objects
– Fast alignmentFast alignment
Applications of Easy-to-Use
Applications of Easy-to-Use
3D Model Acquisition
3D Model Acquisition
• AdvertisingAdvertising
• More capabilities in PhotoshopMore capabilities in Photoshop • Movie setsMovie sets
3D Scanning Technologies
3D Scanning Technologies
• Contact-based:Contact-based: touch probes touch probes
• Passive:Passive: shape from stereo, motion, shape from stereo, motion, shading
shading
• Active:Active: time-of-flight, defocus, time-of-flight, defocus,
photometric stereo, triangulation photometric stereo, triangulation
• Triangulation systems are Triangulation systems are
inexpensive, robust, and flexible inexpensive, robust, and flexible
– Take advantage of trends in DLP Take advantage of trends in DLP projectors
Laser Triangulation
Laser Triangulation
• Project laser stripe onto objectProject laser stripe onto object
Object
Object
Laser
Laser
Camera Camera Camera
Camera Camera Camera
Camera
Laser Triangulation
Laser Triangulation
• Depth from ray-plane triangulationDepth from ray-plane triangulation
Object
Object
Laser
Laser
(x,y)
Triangulation
Triangulation
• Faster acquisition: project Faster acquisition: project multiple stripes
multiple stripes
• Correspondence problem: which Correspondence problem: which stripe
stripe
Triangulation
Triangulation
Slow, robust Fast, fragile
Multi-stripe Multi-frame
Time-Coded Light Patterns
Time-Coded Light Patterns
• Assign each stripe a unique Assign each stripe a unique
illumination code
illumination code
over time [Posdamer 82]
over time [Posdamer 82]
Space Space Time
Gray-Code Patterns
Gray-Code Patterns
• To minimize effects of quantization error:To minimize effects of quantization error:
each point may be a boundary only once
each point may be a boundary only once
Space Space Time
Structured-Light
Structured-Light
Assumptions
Assumptions
• Structured-light systems make certain Structured-light systems make certain
assumptions about the scene:
assumptions about the scene: • SpatialSpatial continuity assumption: continuity assumption:
– Assume scene is one objectAssume scene is one object
– Project a grid, pattern of dots, etc.Project a grid, pattern of dots, etc. • TemporalTemporal continuity assumption: continuity assumption:
– Assume scene is staticAssume scene is static
Codes for Moving Scenes
Codes for Moving Scenes
• We make a different assumption:We make a different assumption: – Object may moveObject may move
– Velocity low enough to permit Velocity low enough to permit tracking
tracking
Illumination history = (WB),(BW),(WB)
Illumination history = (WB),(BW),(WB) Illumination history = (WB),(BW),(WB) Illumination history = (WB),(BW),(WB)
Code
Code Code Code
Codes for Moving Scenes
Codes for Moving Scenes
• Code stripe Code stripe boundariesboundaries instead of stripes
instead of stripes
• Perform frame-to-framePerform frame-to-frame tracking of corresponding tracking of corresponding
boundaries boundaries
– Propagate illumination Propagate illumination history
history
[Hall-Holt & Rusinkiewicz, ICCV [Hall-Holt & Rusinkiewicz, ICCV 2001]
New Scanning Pipeline
New Scanning Pipeline
Project
Project
Code
Code Project Project Code
Code CaptureCaptureImagesImages Capture Capture Images
Images BoundariesBoundariesFindFind Find Find Boundaries
Boundaries BoundariesBoundariesMatchMatch Match Match Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute Compute
Designing a Code
Designing a Code
• Biggest problem is ghosts – WW or Biggest problem is ghosts – WW or BB “boundaries” that can’t be
BB “boundaries” that can’t be seen directly seen directly Project Project Code Code Project Project Code
Code CaptureCaptureImagesImages Capture
Capture
Images
Images BoundariesBoundariesFindFind Find
Find
Boundaries
Boundaries BoundariesBoundariesMatchMatch Match
Match
Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute
Compute
Range
Designing a Code
Designing a Code
• Design a code to make tracking Design a code to make tracking possible:
possible:
– Do not allow two Do not allow two spatiallyspatially adjacent adjacent ghosts
ghosts
– Do not allow two Do not allow two temporallytemporally adjacent adjacent ghosts
Designing a Code
Designing a Code
• Graph (for 4 frames):Graph (for 4 frames):
– Edges: boundaries (over time)Edges: boundaries (over time) – Nodes: stripes (over time)Nodes: stripes (over time)
0011
0011
1110
1110
1011
1011 01100110
0100
0100 10011001 0001
0001 11001100 0000
0000 11011101
1010
1010 01110111
1000
1000
0101
0101 11111111 00100010
Space Space Time
Designing a Code
Designing a Code
• Graph (for 4 frames):Graph (for 4 frames):
• Path with alternating colors:Path with alternating colors:
55 edges in graph
55 edges in graph
maximal-length traversal has 110 boundaries (111
maximal-length traversal has 110 boundaries (111
stripes)
stripes)
– Edges: boundaries (over time)Edges: boundaries (over time) Boundary visible at even times
Boundary visible at even times
Boundary visible at odd times
Boundary visible at odd times
– Nodes: stripes (over time)Nodes: stripes (over time)
0011
0011
1110
1110
1011
1011 01100110
0100
0100 10011001 0001
0001 11001100 0000
0000 11011101
1010
1010 01110111
1000
1000
0101
Image Capture
Image Capture
• Standard video camera: fields at Standard video camera: fields at 60 Hz
60 Hz
• Genlock camera to projectorGenlock camera to projector
Project Project Code Code Project Project Code
Code CaptureCaptureImagesImages Capture Capture Images
Images BoundariesBoundariesFindFind Find
Find
Boundaries
Boundaries BoundariesBoundariesMatchMatch Match
Match
Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute
Compute
Range
Finding Boundaries
Finding Boundaries
Project Project Code Code Project Project CodeCode CaptureCaptureImagesImages Capture
Capture
Images
Images BoundariesBoundariesFindFind Find Find Boundaries
Boundaries BoundariesBoundariesMatchMatch Match
Match
Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute
Compute
Range
Range
• Standard edge detection problemStandard edge detection problem • Current solution: find minima and Current solution: find minima and
maxima of intensity, boundary is maxima of intensity, boundary is
Matching Stripe Boundaries
Matching Stripe Boundaries
Project Project Code Code Project Project Code
Code CaptureCaptureImagesImages Capture
Capture
Images
Images BoundariesBoundariesFindFind Find
Find
Boundaries
Boundaries BoundariesBoundariesMatchMatch Match Match Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute
Compute
Range
Range
• Even if number of ghosts isEven if number of ghosts is
minimized, matching is not easy minimized, matching is not easy
?
Matching Stripe Boundaries
Matching Stripe Boundaries
• Resolve ambiguity by constraining Resolve ambiguity by constraining maximum stripe velocity
maximum stripe velocity
• Could accommodate higher speeds Could accommodate higher speeds by estimating velocities
by estimating velocities
• Could take advantage of methods Could take advantage of methods in
in
tracking literature (e.g., Kalman tracking literature (e.g., Kalman
Decoding Boundaries
Decoding Boundaries
Project Project Code Code Project Project CodeCode CaptureCaptureImagesImages Capture
Capture
Images
Images BoundariesBoundariesFindFind Find
Find
Boundaries
Boundaries BoundariesBoundariesMatchMatch Match
Match
Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute
Compute
Range
Range
• Propagate illumination historyPropagate illumination history
• Table lookup based on illumination Table lookup based on illumination history and position in four-frame history and position in four-frame
sequence sequence
– Once a stripe has been tracked for at least Once a stripe has been tracked for at least four frames,
four frames,
it contributes useful data on
it contributes useful data on everyevery subsequent frame
Computing 3D Position
Computing 3D Position
• Ray-plane intersectionRay-plane intersection • Requires calibration of:Requires calibration of:
– Camera, projector intrinsicsCamera, projector intrinsics
– Relative position and orientationRelative position and orientation
Project Project Code Code Project Project Code
Code CaptureCaptureImagesImages Capture
Capture
Images
Images BoundariesBoundariesFindFind Find
Find
Boundaries
Boundaries BoundariesBoundariesMatchMatch Match
Match
Boundaries
Boundaries DecodeDecodeDecodeDecode ComputeComputeRangeRange Compute Compute
Results
Results
Video Video frames frames
Stripe Stripe boundaries boundaries
unknow
unknow
n
n
known
known
ghosts
Results
Results
• Single range image of Single range image of movingmoving object
object
Gray codes, no tracking
Gray codes, no tracking Boundary codes and trackingBoundary codes and tracking
Top View
Aligning 3D Data
Aligning 3D Data
• This range scanner can be used This range scanner can be used for any moving objects
for any moving objects
• For For rigid objectsrigid objects, range images , range images can be aligned to each other as can be aligned to each other as
Aligning 3D Data
Aligning 3D Data
• If correct correspondences are If correct correspondences are known,
known,
it is possible to find correct it is possible to find correct
Aligning 3D Data
Aligning 3D Data
• How to find corresponding points?How to find corresponding points? • Previous systems based on user Previous systems based on user
input, input,
feature matching, surface feature matching, surface
Aligning 3D Data
Aligning 3D Data
• Alternative: assume Alternative: assume closestclosest points points correspond to each other, compute correspond to each other, compute
Aligning 3D Data
Aligning 3D Data
• … … and iterate to find alignmentand iterate to find alignment
– Iterated Closest Points (ICP) [Besl & Iterated Closest Points (ICP) [Besl & McKay 92]
McKay 92]
• Converges if starting position Converges if starting position “close enough“
ICP Variants
ICP Variants
• Classic ICP algorithm not real-timeClassic ICP algorithm not real-time
• To improve speed: examine stages of ICP and evaluate proposed variantsTo improve speed: examine stages of ICP and evaluate proposed variants
[Rusinkiewicz & Levoy, 3DIM 2001]
[Rusinkiewicz & Levoy, 3DIM 2001]1.1. SelectingSelecting source points (from one or both meshes) source points (from one or both meshes) 2.
2. MatchingMatching to points in the other mesh to points in the other mesh 3.
3. WeightingWeighting the correspondences the correspondences 4.
4. RejectingRejecting certain (outlier) point pairs certain (outlier) point pairs 5.
5. Assigning an Assigning an error metricerror metric to the current transform to the current transform 6.
ICP Variant –
ICP Variant –
Point-to-Plane Error Metric
Point-to-Plane Error Metric
• Using point-to-plane distance Using point-to-plane distance
instead of point-to-point lets flat instead of point-to-point lets flat
regions slide along each other regions slide along each other
Finding Corresponding
Finding Corresponding
Points
Points
• Finding closest point is most expensive Finding closest point is most expensive
stage of ICP
stage of ICP
– Brute force search – O(n)Brute force search – O(n)
– Spatial data structure (e.g., k-d tree) – Spatial data structure (e.g., k-d tree) – O(log n)
O(log n)
– Voxel grid – O(1), but large constant, slow Voxel grid – O(1), but large constant, slow preprocessing
Finding Corresponding
Finding Corresponding
Points
Points
• For range images, simply project point For range images, simply project point
[Blais 95]
[Blais 95]
– Constant-time, fastConstant-time, fast
– Does not require precomputing a spatial data Does not require precomputing a spatial data structure
High-Speed ICP Algorithm
High-Speed ICP Algorithm
• ICP algorithm with projection-ICP algorithm with
projection-based correspondences, based correspondences,
point-to-plane matching plane matching
can align meshes in a few tens of can align meshes in a few tens of
ms. ms.
Anchor Scans
Anchor Scans
• Alignment of consecutive scans Alignment of consecutive scans leads to accumulation of ICP
leads to accumulation of ICP errors
errors
• Alternative: align all scans to an Alternative: align all scans to an “anchor” scan, only switch anchor “anchor” scan, only switch anchor
when overlap low when overlap low
• Given anchor scans, restart after Given anchor scans, restart after failed ICP becomes easier
Merging and Rendering
Merging and Rendering
• Goal: visualize the model well enoughGoal: visualize the model well enough
to be able to see holes to be able to see holes
• Cannot display all the scanned data – Cannot display all the scanned data –
accumulates linearly with time accumulates linearly with time
• Standard high-quality merging Standard high-quality merging
methods: methods:
Merging and Rendering
Merging and Rendering
• Real-time incremental merging Real-time incremental merging and rendering:
and rendering:
– Quantize samples to a 3D gridQuantize samples to a 3D grid
– Maintain average normal of all pointsMaintain average normal of all points at a grid cell
at a grid cell
– Point (splat) renderingPoint (splat) rendering
– Can be made hierarchical to conserve Can be made hierarchical to conserve memory
Photograph
Real-time Scanning Demo
Postprocessing
Postprocessing
• Goal of real-time display is to let Goal of real-time display is to let user evaluate coverage, fill holes user evaluate coverage, fill holes
– Quality/speed tradeoff Quality/speed tradeoff
• Offline postprocessing for high-Offline postprocessing for high-quality models
Merged Result
Merged Result
Photograph
Photograph Aligned scansAligned scans
Future Work
Future Work
• Technological improvements:Technological improvements:
– Use full resolution of projectorUse full resolution of projector
– Higher-resolution camerasHigher-resolution cameras
– Ideas from design of single-stripe 3D scannersIdeas from design of single-stripe 3D scanners
• Pipeline improvements:Pipeline improvements:
– Better detection of failed alignmentBetter detection of failed alignment
– Better handling of object texture – combine Better handling of object texture – combine with stereo?
with stereo?
– Global registration to eliminate driftGlobal registration to eliminate drift
– More sophisticated mergingMore sophisticated merging
Future Work
Future Work
• Faster scanningFaster scanning
– Better stripe boundary matchingBetter stripe boundary matching
– Multiple cameras, projectorsMultiple cameras, projectors
– High-speed camerasHigh-speed cameras
• Application in different contextsApplication in different contexts
– Small, hand-heldSmall, hand-held
– Cart- or shoulder-mounted for digitizing Cart- or shoulder-mounted for digitizing
rooms
rooms
Rendering of Large Models
Rendering of Large Models
• Range scanners increasingly capable of Range scanners increasingly capable of producing very large models
producing very large models
– DMich models are 100 million to 1 billion samplesDMich models are 100 million to 1 billion samples
• Challenge:Challenge: how to allow viewing in real time how to allow viewing in real time
– Fast startup, progressive loadingFast startup, progressive loading
• Traditional answer:Traditional answer: triangle meshes, triangle meshes, simplification, hardware-accelerated simplification, hardware-accelerated
rendering rendering
– Impractical for such large modelsImpractical for such large models
• Alternative:Alternative: revisit basic data structure revisit basic data structure
QSplat [Rusinkiewicz & Levoy, SIGGRAPH 00]
QSplat
QSplat
• Key observation: a single Key observation: a single
bounding sphere hierarchy can be bounding sphere hierarchy can be
used for used for
– Hierarchical frustum and backface Hierarchical frustum and backface culling
culling
– Level of detail controlLevel of detail control
QSplat Node Structure
QSplat Node Structure
Position
Position
and
and
Radius
Radius
Tree
Tree
Structure
Structure NormalNormal
Width of
Width of
Cone of
Cone of
Normals
Normals
Color
Color
(Optional)
(Optional)
13 bits
13 bits 3 bits3 bits 14 bits14 bits 2 bits2 bits 16 bits16 bits
6 bytes
QSplat Node Structure
QSplat Node Structure
• Position and radius encoded Position and radius encoded
relative to parent node
relative to parent node
– Hierarchical coding vs. delta Hierarchical coding vs. delta coding along a path for vertex
coding along a path for vertex
positions positions Position Position and and Radius Radius Tree Tree Structure
Structure NormalNormal
Width of Width of Cone of Cone of Normals Normals Color Color (Optional) (Optional) 13 bits
13 bits 3 bits3 bits 14 bits14 bits 2 bits2 bits 16 bits16 bits
Center Offset Center Offset
Radius Ratio
QSplat Node Structure
QSplat Node Structure
Position
Position
and
and
Radius
Radius
Tree
Tree
Structure
Structure NormalNormal
Width of
Width of
Cone of
Cone of
Normals
Normals
Color
Color
(Optional)
(Optional)
13 bits
13 bits 3 bits3 bits 14 bits14 bits 2 bits2 bits 16 bits16 bits
Uncompressed
QSplat Node Structure
QSplat Node Structure
Position Position and and Radius Radius Tree Tree Structure
Structure NormalNormal
Width of Width of Cone of Cone of Normals Normals Color Color (Optional) (Optional) 13 bits
13 bits 3 bits3 bits 14 bits14 bits 2 bits2 bits 16 bits16 bits
Delta Coding
Delta Coding
[Deering 96]
QSplat Node Structure
QSplat Node Structure
Position Position and and Radius Radius Tree Tree Structure
Structure NormalNormal
Width of Width of Cone of Cone of Normals Normals Color Color (Optional) (Optional) 13 bits
13 bits 3 bits3 bits 14 bits14 bits 2 bits2 bits 16 bits16 bits
Hierarchical
Hierarchical
Coding
QSplat Rendering Algorithm
QSplat Rendering Algorithm
• Traverse hierarchy recursivelyTraverse hierarchy recursively
if
if (node not visible)(node not visible)
Skip this branch
Skip this branch
else if
else if (leaf node) (leaf node)
Draw a splat
Draw a splat
else if
else if (size on screen < (size on screen < threshold)
threshold)
Draw a splat
Draw a splat
else
else
Traverse children
Traverse children
if
if (node not visible)(node not visible)
Skip this branch
Skip this branch
else if
else if (leaf node) (leaf node)
Draw a splat
Draw a splat
else if
else if (size on screen < (size on screen < threshold)
threshold)
Draw a splat
Draw a splat
else
else
Traverse children
Traverse children
Hierarchical frustum /
Hierarchical frustum /
backface culling
backface culling
Point rendering
Point rendering
Adjusted to maintain
Adjusted to maintain
desired frame rate
desired frame rate
Level of detail
Level of detail
control
Demo – St. Matthew
Demo – St. Matthew
• 3D scan of 2.7 meter 3D scan of 2.7 meter statue at 0.25 mm
statue at 0.25 mm • 102,868,637 points102,868,637 points • File size: 644 MBFile size: 644 MB
• Preprocessing time: Preprocessing time: 1 hour
Future Work
Future Work
• Splats as primitiveSplats as primitive
– Unify rendering of meshes, volumes, point Unify rendering of meshes, volumes, point clouds
clouds
– Compatible with shading after rasterizationCompatible with shading after rasterization
– Hybrid point/polygon systemsHybrid point/polygon systems
• High-level visibility / LOD frameworksHigh-level visibility / LOD frameworks
– Store different kinds of data at each node: Store different kinds of data at each node: alpha, BRDF, scattering function, etc.
alpha, BRDF, scattering function, etc.
– Potentially could be used to unify image-Potentially could be used to unify image-based-rendering (IBR) techniques
Contributions
Contributions
• Real-time 3D model acquisition systemReal-time 3D model acquisition system
– Video-rate 3D scanner for moving objectsVideo-rate 3D scanner for moving objects
– Analysis of ICP variants; real-time algorithmAnalysis of ICP variants; real-time algorithm
– Real-time merging and renderingReal-time merging and rendering
– Allows user to see model and fill holesAllows user to see model and fill holes
• QSplat: interactive rendering of large 3D QSplat: interactive rendering of large 3D
meshes
meshes
– Single data structure used for visibility culling,Single data structure used for visibility culling, level-of-detail control, point rendering,
level-of-detail control, point rendering,
compression
compression
Acknowledgments
Acknowledgments
• Olaf Hall-HoltOlaf Hall-Holt
• Lucas PereiraLucas Pereira
• The Original DMich Gang: Dave Koller, Sean The Original DMich Gang: Dave Koller, Sean
Anderson, James Davis, Kari Pulli, Matt Ginzton, Jon
Anderson, James Davis, Kari Pulli, Matt Ginzton, Jon
Shade
Shade
• DMich, the next generation: Gary King, Steve DMich, the next generation: Gary King, Steve
Marschner
Marschner
• Graphics labGraphics lab
• Advisor: Marc LevoyAdvisor: Marc Levoy
• Committee: Pat Hanrahan, Leo Guibas, Mark Committee: Pat Hanrahan, Leo Guibas, Mark
Horowitz, Bernd Girod
Horowitz, Bernd Girod
• Family, friendsFamily, friends