Volumetric and Blobby Objects Lecture 8 (Modelling)

Download Report

Transcript Volumetric and Blobby Objects Lecture 8 (Modelling)

Volumetric and Blobby Objects
Lecture 8 (Modelling)
Isometric Data
 Medical Scans (CT, MRI) produce image slices
with a regular grid of sample values (for skin,
bone, muscle, etc).
 The isosurface at a particular isovalue is very
difficult to visualize from separate 2D scans.
 Solution: convert to a 3D surface.
 Isosurface Extraction Methods
1. Voxels: an intermediate volumetric representation.
2. Ray Casting: direct rendering for ray tracing.
3. Marching Cubes: convert to a polygon mesh.
Voxels

Spatial Occupancy Enumeration:



Scan to Voxel Conversion:



If image slices are stacked into pairs then voxels can be created
with image sample values at the corners.
A voxel is given the value 1 (solid) if all sample values are greater
than the iso-value and 0 (transparent) otherwise.
Problems:



solid is decomposed into identical cells arranged in a rectangular
grid.
Elements are generally cubes, called voxels (volume elements).
Aliasing and high storage costs.
Still requires conversion to polygon-mesh for rendering.
Solutions: 3D anti-aliasing and octree data structure.
Voxels: Octree Data Structure
 Octree:
 A compact hierarchical encoding of a voxmap (voxel map).
 The 3D generalization of a quadtree.
 Leaves represent full or empty voxels of different volumes. The
voxel dimensions depend on its depth in the tree.
 Can merge same value voxels into a single larger voxel.
Marching Cubes


1.
2.
Purpose: convert 2D isometric scans into a polygon mesh isosurface
for a particular isovalue i .
Algorithm:
Pair up scans. Create cubes (cells) with sample values at the vertices (4
from the upper scan, 4 from the lower scan).
March over all cubes:
a)
b)


Topology: Place triangles in a cube depending on the isovalues at the cell
vertices.
Geometry: position the vertices of these triangles according to the
isovalues.
For efficiency exploit inter-cell coherence. Cell vertices (hence some
topology and geometry) are shared between cells.
Seminal Paper: Lorensen, W. and Cline, H. “Marching Cubes: A High
Resolution 3D Surface Construction Algorithm”, SIGGRAPH ’87, pp.
163-169.
Marching Cubes: Triangulating a Cell




Binary coding: A vertex with value v
is inside (1) or outside (0) as follows:
1 if v  i
c
0 else
The binary codes for all vertices are
placed in a bit string used as an index
into the triangulation table.
There are 28  256 combinations.
But:
 Complementary cases: inverting the
cell bits does not change triangulation
(reduce to 148 combinations).
 Rotational symmetry: many patterns
can be reached by rotating the cube
(reduce to 14 unique combinations).
Marching Cubes: Positioning Vertices
 Triangulated cells have triangle vertices placed along cell
edges.
 The exact position and normal of these vertices must
depend on the cell values.
 Solution: Triangle vertices are positioned at t along an edge
using linear interpolation:
iw
t
xw
 where w is the value at the cell vertex inside the isosurface, and
is the external vertex value.
 Normals can be similarly interpolated.
 More sophisticated interpolation is possible.
x
Blobby Objects
 Blobby (or Soft) objects are employed in the creation and
animation of smooth shapes.
 Use implicit F ( P )  0 rather then parametric P  S (u , v, w)
surfaces.
 A skeleton is defined by a set of key points, which radiate
energy to the surrounding space.
 The object boundary is an isosurface at a particular energy
level.
 Isosurface extraction (e.g. marching cubes) is used to find this
boundary.
 The position and orientation of keys can be animated.
 Animation control is easier than for parametric surfaces.
 Other blobby parameters are amenable to animation.
Blobby Objects: Parameters
 Blobby objects consist of a number of keys, each
with:
1. A position O of the key in 3D.
2. An optional set of axes A to orient the blob.
3. An implicit field function H (P) , which determines the
shape of the blob. H depends on O and A .
Superellipsoids are popular.
4. Force at the key f  [1,1] . Often set to  1(merges
with other blobs) or  1 (creates imprints on other
blobs).
5. A Decay function F , which defines how intensity tails
off from the key towards the blob boundary.
Blobby Objects: Field Calculation

Given a point
follows:
P , the field contribution from a key is calculated as
r  OP
1.
Find
2.
Calculate the distance R where the field value turns to zero along the
line OP by solving the field function H .
3.
4.
.
If r  R then the key’s contribution is zero. Otherwise, the field value
at P is f  F ( r , R )
(force times decay).
A popular decay function is:
r2
F (r , R)  1  R 2
5.
Repeat and sum the field
value for all keys.
.
Blobby Objects: Examples