Download Solid Modeling 3D Object Representations • Raw data • Solids

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
3D Object Representations
• Raw data
! Point cloud
! Range image
! Polygon soup
Solid Modeling
• Solids
!
!
!
!
Voxels
BSP tree
CSG
Sweep
• Surfaces
Adam Finkelstein
Princeton University
COS 426, Spring 2005
!
!
!
!
3D Object Representations
• Raw data
! Point cloud
! Range image
! Polygon soup
• High-level structures
! Scene graph
! Skeleton
! Application specific
Solid Modeling
• Solids
!
!
!
!
Mesh
Subdivision
Parametric
Implicit
• Represent solid interiors of objects
Voxels
BSP tree
CSG
Sweep
! Surface may not be described explicitly
• Surfaces
!
!
!
!
Mesh
Subdivision
Parametric
Implicit
• High-level structures
! Scene graph
! Skeleton
! Application specific
SUNY Stoney Brook
Visible Human
(National Library of Medicine)
Motivation 1
Motivation 2
• Some acquisition methods generate solids
! Example: CAT scan
• Some applications require solids
! Example: CAD/CAM
Stanford University
Intergraph Corporation
Motivation 3
Solid Modeling Representations
• Some algorithms require solids
• What makes a good solid representation?
! Example: ray tracing with refraction
!
!
!
!
!
!
!
Accurate
Concise
Affine invariant
Easy acquisition
Guaranteed validity
Efficient boolean operations
Efficient display
Addy Ngan and Zaijin Guan
COS 426, 1998
Princeton University
Solid Modeling Representations
Lorensen
Solid Modeling Representations
• Voxels
• Voxels
• Quadtrees & Octrees
• Quadtrees & Octrees
• Binary space partitions
• Binary space partitions
• Constructive solid geometry
• Constructive solid geometry
Voxels
Voxel Acquisition
• Partition space into uniform grid
• Scanning devices
! Grid cells are called a voxels (like pixels)
• Store properties of solid object with each voxel
!
!
!
!
!
! MRI
! CAT
• Simulation
Occupancy
Color
Density
Temperature
etc.
! FEM
Stanford University
FvDFH Figure 12.20
SUNY Stoney Brook
Voxel Storage
Voxel Boolean Operations
• O(n3) storage for nxnxn grid
• Compare objects voxel by voxel
! 1 billion voxels for 1000x1000x1000
! Trivial
Voxel Display
"
=
#
=
Voxel Display
• Ray casting
• Slicing
! Integrate density along rays through pixels
! Draw 2D image resulting from intersecting voxels
with a plane
Engine Block
Stanford University
Voxel Display
Visible Human
(National Library of Medicine)
Marching Cubes
• Isosurface rendering
! Render surfaces bounding volumetric regions of
constant value (e.g., density)
Isosurface Visualization
Princeton University
Marching Cubes (15 Cases)
Marching Cubes
• Sometimes have to match neighbors
+
–
Voxels
–
+
or
+
–
–
+
Voxels
• Advantages
MRI / CT
Ray
Casting
Simulation
Images
(silhouettes)
Space
Carving
Voxels
Marching
Cubes
Scan conversion
Image
!
!
!
!
Simple, intuitive, unambiguous
Same complexity for all objects
Natural acquisition for some applications
Trivial boolean operations
• Disadvantages
Mesh
!
!
!
!
Approximate
Not affine invariant
Large storage requirements
Expensive display
Polygons
Solid Modeling Representations
• Voxels
• Quadtrees & Octrees
Quadtrees & Octrees
• Refine resolution of voxels hierarchically
! More concise and efficient for non-uniform objects
• Binary space partitions
• Constructive solid geometry
Uniform Voxels
Quadtree
FvDFH Figure 12.21
Quadtree Boolean Operations
A
Quadtree Display
• Extend voxel methods
B
A"B
! Slicing
! Isosurface extraction
! Ray casting
Finding neighbor cell requires
traversal of hierarchy (O(1))
A#B
FvDFH Figure 12.24
Solid Modeling Representations
FvDFH Figure 12.25
Binary Space Partitions (BSPs)
• Voxels
• Recursive partition of space by planes
! Mark leaf cells as inside or outside object
• Quadtrees & Octrees
• Binary space partitions
a
• Constructive solid geometry
a
1
g
a
f
e
5
d
c
b
6
f
d 7 c
e
2
Object
1
b
b
2
c
3
d
4
3
e
4
f
5
Binary Spatial Partition
6
7
Binary Tree
Naylor
BSP Fundamentals
BSP is a Search Structure
Exploit hierarchy of convex regions
Regions decrease in size along any tree path
Regions converge in the limit to the surface
Single geometric operation
Partition a convex region by a hyperplane
Single combinatorial operation
Two child nodes added as leaf nodes
h
Partitioned
region
Homogeneous
region
R
OUT
R-
$
R+
Initial
Tree
R
$
New
tree
R-
R
on
OUT
+
on
OUT
1st level Approximation
R+
Naylor
on
on
IN
on
OUT
out
in
out
in
on
OUT
on
IN
in
on
on
out
OUT
2nd level Approximation
Naylor
BSP Acquisition
BSP Boolean Operations
• Must construct a “good” binary search structure
! Efficiency comes from logarithmic tree depth
! Each node V corresponds to a convex region
containing all geometry in the subtree rooted at V
! No intersection with bounding volume of V means no
intersection with subtree rooted at V
! Do detail work only in regions required
! Boolean operations grow with O( log n) if “good” tree
out
OUT
out
in
in
• Divide and conquer
OUT
IN
in
out
OUT
“Bad”
“Good”
Naylor
BSP Display
Solid Modeling Representations
• Hidden surface removal
! Use painter’s algorithm: draw faces back-to-front
» far-subtree > faces on split > near-subtree
A
o2
o4
B
o1
C
o3
A
Viewer
C
B
o1
2nd
Naylor
o2
1st
Naylor
o3
4th
Viewer
o4
3rd
void Draw_BSP_Tree (BSP_tree *tree, point eye)
{
real result = tree->partition.Classify(eye);
if (result > 0)
{
Draw_BSP_Tree (tree->back, eye);
tree->polygons.Draw_Polygon_List ();
Draw_BSP_Tree (tree->front, eye);
}
else if (result < 0)
{
Draw_BSP_Tree (tree->front, eye);
tree->polygons.Draw_Polygon_List ();
Draw_BSP_Tree (tree->back, eye);
}
else // result is 0
{
// eye point is on the partition plane
Draw_BSP_Tree (tree->front, eye);
Draw_BSP_Tree (tree->back, eye);
}
}
• Voxels
• Quadtrees & Octrees
• Binary space partitions
• Constructive solid geometry
SGI BSP Tree FAQ
Constructive Solid Geometry (CSG)
• Represent solid object as hierarchy of
boolean operations
CSG Acquisition
• Interactive modeling programs
! CAD/CAM
! Union
! Intersection
! Difference
FvDFH Figure 12.27
H&B Figure 9.9
CSG Boolean Operations
CSG Display & Analysis
• Create a new CSG node joining subtrees
• Ray casting
! Union
! Intersection
! Difference
Union
Circle
Box
FvDFH Figure 12.27
BSP
No
No
No
Some
Yes
Yes
No
No
No
No
Some
Yes
Yes
No
Some
No
Yes
No
Yes
Yes
Yes
CSG
Octree
Accurate
Concise
Affine invariant
Easy acquisition
Guaranteed validity
Efficient boolean operations
Efficient display
Taxonomy of 3D Representations
Voxels
Summary
Some
Yes
Yes
Some
No
Yes
No
Discrete
Continuous
Voxels
Combinatorial
Topological
Mesh
Subdivision
Set Membership
BSP Tree
Cell Complex
Functional
Parametric Implicit
Bezier
B-Spline
Algebraic
Naylor
Related documents