50
Simulation of fibrous material Mechanical models and numerical simulation Florence Bertails-Descoubes BiPop - INRIA/LJK Nonsmooth Mechanics Spring School, June 2010

Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

  • Upload
    lytuyen

  • View
    218

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Simulation of fibrous materialMechanical models and numerical simulation

Florence Bertails-DescoubesBiPop - INRIA/LJK

Nonsmooth Mechanics Spring School, June 2010

Page 2: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Research area

Context

• Visually relevant phenomenaLarge scale, deformations, contacts

• Increasing demand in such simulators

Computer graphics, cosmetology, medical area, …

• Pluridisciplinary fieldMechanics, numerical simulation, graphics

Main research direction

Search for compact models :

Realism + robustness + efficiency

Realistic and efficient simulation of macroscopic mechanical systems

© Maya

© D. Pai

Page 3: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Fibrous materials: Motivation

• 1D structures, « strands », are wide spread

– Hair, plants, trees, wires, etc.

• Typical features

– Thickness << length

– Inextensible

– Bending and twisting elasticity

– Large motion/applied forces

© D. Pai© J. Gray © LADHYX

Page 4: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Example: Hair Simulation

Page 5: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

© J. Gray

© L’Oréalzoom X 1000 zoom X 100

Problems

• Complex mechanical system (nonlinear, lots of contacts, friction…)

• Multi-scale dynamics

• No reference mechanical model

Example: Hair Simulation

Page 6: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Motivation

Increasing demand by industrial applications

• Virtual entertainment (features films, special effects, games)

• Virtual prototyping in cosmetology

© L’Oréal

© Final Fantasy (2000) © Shrek (2001) © The Incredible (2005) © Avatar (2009)

Page 7: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

General outline

I. Individual fiber: high-order rod model

II. Assembly of fibers with frictional contact (ongoing work)

Page 8: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Part I: Outline

I. Maximal vs. reduced coordinates models

II. Super-helix model (2006)

III. Linear-time super-helix model (2008)

IV. Conclusions

Page 9: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Part I: Outline

I. Maximal vs. reduced coordinates models

II. Super-helix model (2006)

III. Linear-time super-helix model (2008)

IV. Conclusions

Page 10: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Models for elastic rods: 2 families

1. Maximal coordinates

– # parameters > # dof (ex: 3D points)

– Constraints for the kinematics (inextensibility + bending + twisting)

– Examples:• Mass-spring chain [Rosenblum et al. 1991, Selle et al. 2008]

• Spline dynamics [Lenoir et al. 2004, Thetteen et al. 2008]

• Discrete Cosserat [Spillmann et al. 2007, Bergou et al. 2008]

– Pros & cons:

• ☺☺☺☺ Generally, sparse system to solve

• ☺☺☺☺ Simplifies the handling of interactions

• ���� Constraints difficult to formulate (twist, inextensibility)

• ���� Possible drifts• ���� Redundancy of parameters

x,y,z

Page 11: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

2. Generalized (reduced) coordinates

– # parameters = # dofs (≠ 3D points)

– No extra constraint

– Examples:• Serial chain of rigids [Hadap et al. 2001, Hadap 2006]

• Super-Helices [Bertails et al. 2006]

– Pros & cons:• ☺☺☺☺ Intuitive and minimal parameterization• ☺☺☺☺ Perfect inextensibility → « nervous » motions possible

• ���� Contact “tricks” used in graphics not adaptable• ���� Often, dense system → quadratic complexity

Models for elastic rods: 2 families

Page 12: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Part I: Outline

I. Maximal vs. reduced coordinates models

II. Super-helix model (2006)

III. Linear-time super-helix model (2008)

IV. Conclusions

Page 13: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Hair strand = elastic rod

• very small thickness

• elastic

• inextensible

The elasticity of rods

Page 14: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

• Well-known in mechanics

• Shape given by– centerline

– material frame

• Kirchhoff assumptions– no shearing

– inextensible

Cosserat rod

stiff problem

Page 15: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

• 3 modes of deformation– 1 mode of twist

– 2 modes of bending

• Parameterization of an inextensible rod by– the twist

– the curvatures and

• is the rate of rotation of material frame

Kirchhoff rod

Page 16: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Dynamics of Kirchhoff’s rods

• Kirchhoff’s equations

• Numerical integration is difficult

– stiff problem (inextensibility condition)

– we tried best schemes from mech. eng.

– not suited for hair anim.

• Super-Helix model

– new deformable model

– animated using Lagrangian mechanics

[Hou&Klapper1998]

Page 17: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Key idea

• Classical nodal schemes– Approximate spatial derivatives

– Ok if the rod is extensible

– Unstable if the rod is inextensible (stiff system)

• If we look at a rod with constant– Its shape is exactly a circular helix ( constant)

– Kinematics terms can be computed analytically

[CORDE, Spillman 2007]

∂κ∂s≈ κi+1−κi

∆s

r(s) = f(s, τ, κ1, κ2)

r = f(s, τ, κ1, κ2, κ1, τ , κ2)

Page 18: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Kinematics of a Super-Helix

• Split rod into N elements

• Take piecewise

• is -smooth at elements boundaries

• Generalized coordinates defined by

Page 19: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Shapes of a single element

A single element (generic helix shape) can be:

• a circle

• a line, twisted or not

• a helix with several spires

Page 20: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Shapes of Super-Helices

Thus a wide range of hair types …

smooth wavy curly fuzzy

Page 21: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Example of kinematics

Typical configurations: tuning for elements

Page 22: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

We have defined the shapes

• Kinematics computed analytically

no error approximation in space

• Let’s turn to the dynamics !

Page 23: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Dynamics

• Use an old cookbook recipe by Lagrange

• Add Kirchhoff sauce

• Resulting equations of motion read

and Kirchhoff’s

Page 24: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Super-Helix simulations

No damping

Page 25: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Super-Helix simulations

Damping by rod’s viscosity

Page 26: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Super-Helix simulations

Damping by fluid’s viscosity

Page 27: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Super-Helix simulations

Various natural curvatures and twist

Page 28: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Qualitative validation

Input

Input

Calibrating friction

• visco-elasticity γ

• air viscous drag νMeasured

Reported

values

Estimating fibers parameters• radius• ellipticity• curliness• density• stiffness

Super-Helix

Page 29: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Spring experiment

Real hair wisp Simulation

Page 30: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Twist experiment

Page 31: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Plectoneme experiment

See movie !

Page 32: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Advantages

• Accurate modeling of bending and twisting effects

• Perfect inextensibility (kinematic constraint)

• Various rest shapes

• High-order elements → rich set of representations

• Intuitive and minimal parameterization

• Some experimental validation

Page 33: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Major drawback

• Quadratic complexity in the number of elements

→ High precision ruins performance

N = 5 elements160 frames/sec

N = 20 elements4 frames/sec

Page 34: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Part I: Outline

I. Maximal vs. reduced coordinates models

II. Super-helix model (2006)

III. Linear-time super-helix model (2008)

IV. Conclusions

Page 35: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Recursive Super-Helices

• Chains of articulated rigid bodies→ Problem has been solved, by [Featherstone1983] (among others)

• Super-Helices→ A new challenge to be solved

Idea: recursive formulation (à la Featherstone)

Advantages:

– Linear complexity

– Straightforward modeling of tree-like structures

Page 36: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Featherstone’s algorithm (1983)

• Serial chain of rigid bodies

– N+1 rigid bodies, N joints

– N parameters (generalized coordinates)

• Featherstone’s Articulated-Body-Algorithm

– Exploits the following affine relationship:

– Formulate the dynamics locally :

where and are recursively computed from the free end (indep. of )

qQ

fQ = IAQ aQ + p

AQ

IAQ pAQ

aQ = HQ qQ + bQ

q1

q2

q3

q4

q5

0

1

2

3

4

5

spatial acceleration of rigid Q

force transmitted onto rigid Q through joint Q

qi

Page 37: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Super-Helices vs Serial chains

Super-Helix ≠ Serial chain of rigid bodies:

• Deformable elements ≠ rigid bodies

• Finite elements model ≠ articulated system

Page 38: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

However…

Significant common features:

• Recursive kinematics

• Affine relationship between 3d acc. and generalized acc.

Page 39: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Recursive kinematics

• Acceleration of element

• Smoothness between elements

• Conditions at clamped end ( )

rQ(u) = rQ(0) + Ar

Q(u) κκκQ + Cr

Q(u) θθθQ(0) + br

Q(u)

θθθQ(u) = θθθQ(0) + AθθθQ(u) κκκQ + b

θθθQ(u)

rQ(0) = rQ−1(�Q−1)

θθθQ(0) = θθθQ−1(�Q−1)

θθθ1(0) = θθθclr1(0) = rcl

Q = 1

Q

Qu

u = 0

u = �Q

Q = 1

Q− 1

Page 40: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Recursive kinematics

• Kinematics is very close to that of serial chains

• What about dynamics ?

Page 41: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Recursive dynamics ?

• Global equation for a Super-Helix

• Local equation on element ?– Local term:

– Global terms: ,

M(t,κκκ) κκκ+K(κκκ−κκκ0) = B(t,κκκ, κκκ)

Q

K(κκκ−κκκ0)

M(t,κκκ) κκκ B(t,κκκ, κκκ)

KQ(κκκQ − κκκ0Q) ∀Q ∈ {1..N}

K(κκκ− κκκ0) = B(t,κκκ, κκκ)−M(t,κκκ) κκκM(t,κκκ) κκκ+K(κκκ−κκκ0) = B(t,κκκ, κκκ)

scalar equations3N

KQ(κκκQ − κκκ0Q) =GQ ∀Q ∈ {1..N}

Problem: depends on all κκκi, i ∈ {1..N}

Page 42: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Key of the method

One can prove that:

• can be expressed locally on element

• Where are recursively computed

from to

• With the BC at free end known

(zero transmitted force)

Q

QQ+ 1

GQ

GQ = AAQ κκκQ + R

AQ rQ(0) + C

AQ θθθQ(0) + b

AQ

AAQ, RAQ, C

AQ, b

AQ

Q+ 1

Q

Q = N

u = 0

Q = 1

N − 1

N − 2

Page 43: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Final recursive algorithm

Two main passes:

1. From the free end to the clamped end• Initialization at the free end, at T+1

• Recursive computation of the

2. From the clamped end to the free end• Initialization at the clamped end, at T+1

• For current element , solve the local equation

• Kinematics of → Initialization of

AAQ, RAQ, C

AQ, b

AQ

KQ(κκκQ − κκκ0Q) = A

AQ κκκQ + R

AQ rQ(0) + C

AQ θθθQ(0) + b

AQ

κκκQ, κκκQ at T+1

Q

Q Q+ 1

Q = 1

Q+ 1

Page 44: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Extension to tree-like structures

Two main passes:

1. From the free ends to the clamped end• Initialization at the free ends, at T+1

• Recursive computation of the

2. From the clamped end to the free ends• Initialization at the clamped end, at T+1

• For current element , solve the local equation

• Kinematics of → Initialization of the descendants of

AAQ, RAQ, C

AQ, b

AQ

KQ(κκκQ − κκκ0Q) = A

AQ κκκQ + R

AQ rQ(0) + C

AQ θθθQ(0) + b

AQ

κκκQ, κκκQ at T+1

Q

Q Q

Q = 1

Page 45: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Results

Page 46: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Performance results

170

170

40

4

1.4

-

-

-

-

-

170

170

120

54

37

170

108

25

17

6

Straight rod (1)

Straight rod (2)

Straight rod (10)

Straight rod (20)

Straight rod (30)

Palm tree (8)

Algae (10)

Complex 3D tree (50)

Super-Helix Man (81)

Weeping willow (242)

FPS compositeFPS recursiveModel (N elements)

Page 47: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Performance results

N = 5 elements

160 frames/sec

160 frames/sec

N = 20 elements

4 frames/sec

54 frames/sec

Composite

Recursive

Page 48: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Stability issue

• Integration « less implicit » compared to composite method

→ dt has to be smaller for a stable simulation

• However:

– small difference

– does not compensate

the gain in linear complexity

# elements

# max dt (ms)

0 5 10 15 20 25 30 35 400

5

10

15

20

25

30

35recursive

composite

Page 49: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Part I: Outline

I. Maximal vs. reduced coordinates models

II. Super-helix model (2006)

III. Linear-time super-helix model (2008)

IV. Conclusions

Page 50: Simulation of fibrous material - Grenoble - · PDF fileSimulation of fibrous material ... • Use an old cookbook recipe by Lagrange • Add Kirchhoff sauce ... Real hair wisp Simulation

Conclusions

Summary• Super-helix: a new high-order model for inextensible elastic rods• Linear-time dynamics of super-helices made possible

→ Complex configurations are efficiently simulated

→ Natural extension to tree-like structures of super-helices

Future work• Inverse statics for initializing parameters from input geometry• Adaptive simulation of rods (similar to [Redon et al. 2005])

• Simulation of contact/friction (to be continued in part II)• …