Human hair modeling and dynamics in computer graphics

advertisement
Human hair modeling and
dynamics in computer graphics
Masters defense
Thomas Dalsgaard
Agenda
Part 1: Project summary




Motivation and choice of focus
The model
Discrete time integration
Collision handling
Part 2: Results
 Tests
 Visual
Part 3: Discussion
Part 1
Project summary
Motivation and choice of focus
- Human hair animation with high degree of realism
- Four stages:
 Modeling
 Motion
 Interaction
 Rendering
- Approximately 100.000 strands of hair on a human head
 Interacting in a one to one relationship
 Variety of strand and hair properties
- Ideal case: GUT
Motivation and choice of focus
- Articles today:
 Simplifying models
 Wisp
 Guiding strands
 Pre calculation through physics based simulations
 Repopulate hair strands at the rendering stage
 Wisp: Fill wisp volumes
 Guiding strands: Interpolate between the guiding
strands
- Guiding strands: Continuous hair → Flat hair
- Wisp: Both continuous and disordered hair
Motivation and choice of focus
- Focus: A wisp based model
- Wisp interior: Hair strands and air
 Compression
 Scalp 15cm. diameter – Braid 3 cm. diameter
 Plante et al.
Motivation and choice of focus
- Plante et al.
 Interactions depends on orientation
 Ability to compress depend on internal wisp
properties
Motivation and choice of focus
- Choice of wisp model
 Simple skeleton / core like Plante et al.
 No torsional effects → No styling
 Dampened harmonic oscillators for all force
responses
 Surface envelope
 Masses move in 2D plane like Plante et al.
 Higher degree of motional freedom
 Spline constituting surface with masses as control
points
 Initial circular surface
 Surface deformation not dependent on internal
wisp properties
The model
The model
- Dampened harmonic oscillator 1D
F = -k(p - do) – ρv
- Skeleton masses
 Initial distance 1/N’th of the wisp length
 Distance and angular dependent forces and gravity
The model
- Surface masses
 Situated in 2D plane defined by the skeleton mass
positions
 Skeleton mass and CM of corresponding surface
masses are always aligned because they represent the
same mass
 Initial equidistant circular positioning
 Forces
 Nearest neighbor used for shape stability
 Opposite used for expansion control
 Twist control between consecutive 2D planes
The model
- Surface envelope
 Cardinal spline segments at 2D node surface
 3’rd degree polynomial in t, with t in [0,1]
 Boundary conditions
The model
- Surface envelope
 Cardinal spline continued
 Tension parameter ξ
 Linear interpolation between 2D node surfaces
 Map θ → ( (k, tk), (l, tl) )
Discrete time integration
- Equations of motion in the continuous time domain
- Simple transformation into discrete time domain of
forward Euler
- Runge-Kutta-Nyström initiated Adams-Bashforth and
Adams-Moulton method
 Larger time steps → Decreased processing time
Collision handling
- Abrupt nature of discrete time integration →
 Penetration
 Missed collision (Reduce to penetration)
- Goals:
 Surface envelope define the “physical wisp”
 Displace surface masses when penetrating →
Compression
 Use convexity of surface envelope
 Maintain convexity of surface envelope
Collision handling
- Bounding volumes
- Binary hierarchy of sphere-sweep lines to envelop the
wisps
- Leaves envelopes one wisp segment each
 Radius
 End points (share line of node masses)
- Binary hierarchy by merger of two successive
- Intersection test between two sphere sweep lines
 Closest points on line SA and SB
Collision handling
- Deepest penetration
 Ming C. Lin: Analytic solution for closed convex
parametric surfaces when normal vectors are parallel
 Wisp segments not closed surfaces
 Scalar objective function of 4D space spanned by
two surfaces A and B
 Construct f with deepest penetration at global
minimum
 A and B both convex → Possible to have global
minimum the only minimum
Collision handling
- I find a workable solution to be
with
,
is the normalized
and γ the length dependence
 Con: Does not agree with penetration found from
definition of deepest penetration
 Solutions are more suitable for penetration based
deformations
 Pro: Only have one minimum if surfaces are convex
→ works every time
Collision handling
- Search the 4D space of xT = (uA, θA, uB, θB) for
minimum
- f is differentiable for any choice of x, so f decreases
fastest along the negative gradient
- The solution can be found by a gradient descent with
search direction h
- A performance increase can allegedly be achieved with
a BFGS modified h
Collision handling
- Classification when minimum of f found
 Penetration or separation

l  PA PB  0
- If I use
 Troublesome separations are classified as
penetrations
-
Collision handling

Instead using the requirement that Puˆ ,ˆ  is inside
segment B and P uˆ ,ˆ  is inside segment A
A
B
B
 Throw away good penetrations
A
Collision handling
- Penetration vectors PA PB
 Distributed between segments
 → distributed between segment ends
 → projected onto the 2D plane of the surface masses
- Applying deformation
 Remaining penetration → deformation and rotation
Collision handling
- Sequential handling of several penetrations at one 2D
node surface
Part 2
Results
Tests
- Hard to keep the 2D node surfaces convex with more
than 4 control masses, hence 4 is used
- The penetration vector is validated to minimize f by a
simple search function; < 1% deviate and no PA PB
deviate more than 5o or a factor 2 in length
- The scale balancing reduces average number of gradient
descent iterations from 295 to 105
- Using BFGS improved search direction further
decreases the number to 81
Tests
- BFGS and gradient descent does not always agree; 3.7%
shows a deviation by more than 1% in one of the 4
variables → Some error in BFGS
 Perhaps none closed surfaces in combination with
BFGS holding memory
- One collision detection with very deformed wisp
segments takes on average 26.5ms. → One collision
detection phase with 200 wisps will approximately take
400 seconds
- Range of the deformation appliance a and b are found to
best maintain convexity at value a = b = π/2
Tests
- Only forward Euler has been employed; time step size
of 1μs but takes less than 1% of total computation
- Boundary volumes hierarchy works well
 Tighter fit of leaf volumes to the single wisp
segments will at most give a factor two in speed up
- Talk about momentum transfer and not being able to
handle collisions at 1ms. instead of 0.1 ms.
 Perhaps caused by penetration and separation
criterion instead
Visual results
- Deformed shape dependence of internal mass positions
Visual results
- A single wisp on a sphere-sweep volume
Part 3
Discussion
Download