Title: Advanced Computer Graphics Computer Animation
1Advanced Computer GraphicsComputer Animation
- Implicit Surfaces
- Spring 2002
- Professor Brogan
Many slides from Brian Wyvills online materials
at U. Calgary
2Papers for Tuesday
- Spacetime Constraints, Witkin and Kass
- Siggraph
- Deep-water Animation and Rendering
- Gamasutra.com, Sept 26, 2001
3Implicit Surfaces
- Surfaces defined by points that satisfy
- f(P) 0 Implicit Function
- Example, a circle
- Parametric
- xr cos(a)
- yr sin(a)
- Implicit
- x2 y2 r2 0
4Implicit Surface Modeling
- Useful for modeling natural and smooth/organic
synthetic phenomena - Living forms, liquids, clouds
- Each primitive is represented by a skeletal
element which contributes in defining a scalar
field - Every point in space is assigned a scalar value
equal to shortest distance to a skeletal element
5Implicit Surface Modeling
- Simplest skeletal element is a point
- A (distance) contour of that point defines the
(surface of the) model - Ex two points approach and their contours blend
6Combining Skeletal Primitives
7Blending Skeletal Elements
- Define a simple surface as
- A central point, C
- A radius of influence, R
- A density function, f()
- A threshold value, T
- All points, P, for which dist (P, C) lt R
- Implicit surface f (dist(P, C)) T 0
8Blending Skeletal Elements
- Example metaballs
- f(dist)
- Surface drawn where f(dist) T 0
Surface drawnat this radius
Value of T
9Blending Skeletal Elements
- Example two metaballs
- Surface drawn where
- f(dist1) f(dist2) T 0
Do we drawsurface here?
r1
r2
r2
r1
10Blending Skeletal Elements
http//www.lifl.fr/triquet/implicit/video/blend.m
pg
11Blending Skeletal Elements
- In general, surface defined by multiple surface
elements is
12Blending Lines
- Lines can bulge when their ends meet
- Usually not the desired effect
- Tinkering with density function and line
separation can fix
13Versions of Density Functions
14Modeling a Dinosaur (Wyvill)
15Modeling Blood
http//www.lifl.fr/triquet/implicit/video/blood.m
pg
16Solving Implicit Functions
- Root finding
- Given a function f, we wish to find the set of x
values (1D points) that satisfy f(x)0 - From calculus, the Intermediate Value Theorem
states as x varies from a to b, the continuous
function f takes on every value between f(a)
and f(b)
17Solving Implicit Functions
- If f(a) and f(b) have opposite signs, the root is
said to be bracketed in the interval a, b
18Bracketing the roots
- Uniformly subdividespace
- Evaluate f( ) for eachboundary
- Transition from to defines bracket
19Bisection search
- Iteratively subdivide to find exact zero
202-D Implicit Surfaces
- Surface defined by f(X) 0 X (x, y)
- Uniformly subdivide
- Evaluate f( ) at all points
- Bracket roots
212-D Implicit Surfaces
- Find intersection point along all grid lines with
/- values at endpoints - Edge defined by crossing points
222-D Adaptive Subdivision
- Recursively subdivide cells containing a surface
crossing down to a threshold size - Calculate crossing values and connect dots to
form polygon edge
232-D Continuation Methods
- Overlay fine-grain uniform subdivision
- Find start (seed) point that lies on surface
- Find cell containing seed point
- Grow the set of cells across surface
- Evaluate adjacent cells to find next surface
crossing cells
24Potential Problem 1 Bounding the Domain Space
- May not completely contain the object
- May miss disconnected components
- Will result in clipping
25Potential Problem 2 Discretization Error
- Too large uniform cell size
- May not be able to converge (entirely miss the
surface) - Too large adaptive threshold cell size
- Misses small, completely-containedfeatures
- Coarse resolution model
- Incorrect topology
- ambiguous cells
- connects or breaks components
- Too small cells sizes are inefficient and more
susceptible to numerical error
26Potential Problem 3 Disconnected Components
- Uniform cell subdivision may find them, but
inefficiently - Continuation methods may miss them
- must have a seed pt on each component
- Related to discretization error
27Potential Problem 4 Ambiguous Surface-Crossing
Cells
- Many cell vertex polarity configurations are
ambiguous - Possible to polygonize in different arrangements
- May even result in disjoint polygons
- Solutions
- Detect and recursively subdivide
- Choose a consistent convention (e.g. always join
positive pts)
28Moving on to 3-D
- Conceptually the same
- Discretize space and find crossing points on 12
edges of cube - This can be tricky to connect the crossing points
into a polygon correctly
293-D Finding cell polygon face vertices
- Algorithmic method
- Begin with any edge-surface intersection point
(1) - Proceed to negative corner (white open pts) and
then clockwise about the cube face (w.r.t
outside) until another intersection point is
found (2) - Repeat for each subsequent face (3?4, 4?5, 5?1)
303-D Tetrahedral Decomposition
- Tetrahedra reduce ambiguity and produce correct
meshes, but many more polygons result - Diagonal edges cut across cube faces
- Must make sure adjacent cubes have aligned
tetrahedron edges to preserve topological
correctness
313-D Tetrahedral Decomposition
323-D Implicit Surface Evaluation
- Particle Methods
- Turk, Hoppe, Szeliski, Witkin, Heckbert (cool
paper) - Constrain particles to exist on isosurface
- Allow particles to split and join
- Particle seeks to balance space between neighbors
- A constrained optimization problem
33Collision Detection
- Easy to detect colliding blobbies
- Evaluate sample points from one object in the
implicit equation of another - Deforming the blobbies is more complex
- Define collision boundary, F1(p) F2(p)
- Create addition term, G(p) that is added to
density function, F(p) to prevent passing through
collision boundary - Add terms to G(p) so blobbies preserve volume as
they are retarded by collision boundary
34Spacetime Constraints
- Find min of f(x) y
- Find zeros (roots) of derivative function, f(x)
- Newton Raphson Method does this
- Find min of f(X) Y X and Y vectors
- Same method, but find where Jacobian is equal to
zero
35Spacetime Constraints
- Null space of a function
- The inputs of a function for which the function
evaluates to zero - Finite differences
- Approximate derivatives (inverse of Euler
integration) - Solving for all forces in time simultaneously