# Frame-based Elastic Materials

Video: Example of volumetric data, discretization and animations.

- Introduction
- Installation
- Examples

- simple
- frame-based elastic model
- complex deformable solid

- Code documentation
- Publications
- Intellectual property and rights

## Introduction

This plugin implements frame-based meshless deformable models.
The current implementation uses two levels of scenegraph nodes. On top, the MechanicalState contains the moving frames, which are the independent DOF of the model. On bottom, several nodes are used to contain different types of DOF :

- deformation gradients (i.e. deformed frames which represent the material deformation at sampling points), and ForceFields to counteract the deformations. This is used to compute the internal deformation forces
- 3D points to attach a collision model and a deformable model

A large variety of moving frames (rigid, affine, quadratic), deformation gradients (classical 1st-degree or elastons), and material laws are implemented.
Template class FrameBlendingMapping implements various combinations of inputs (moving frames) and output (deformation gradients or points) DOF.
Complex material distributions can be modeled using class GridMaterial, which is also used to optimize frame and sampling point distributions, and to compute the weight functions of the frames.
More detail is given in the main page of the code documentation.

## Installation

- Uncheck DEFINES += SOFA_HAVE_FRAME in your sofa-local.cfg file and build the project (depending on your platform, you may have to regenerate the Makefile or the Solution)
- For a better viewing, activate and use the QGLViewer.

## Examples

We first present a simple example, then an advanced example of frame-based elastic model, then an advanced example of complex deformable solid.

### Simple example

The current implementation uses two levels of scenegraph nodes, as illustrated in the next figure. In this simple example (file basic_Affine-D332.scn), the moving frames (shown as red, green, blue frames) are in the Beam parent node, while the Physics child node contains deformation gradients (or elastons). A skinning (also called frame blending) mapping , FrameBlendingMapping, updates the child based on the parent. It is the main workhorse of the Frame-based Elastic Models paper. Here it maps only to one sample, shown as a yellow cross. It is an elaston ( DeformationGradient332 template specialization), therefore a single one is sufficient to capture all the deformation modes between the two affine frames.
The material constitutive law is implemented in ForceField components applied to the sampling points, here a GreenLagrangeForceField and a FrameVolumePreservationForceField. The material parameters are actually defined in the top level, in the HookeMaterial3 component.
Other children can be mapped, such as a collision model and a visual model. In this case the children are points, not deformation gradients (Vec3d and ExtVec3f template specializations).

Snapshot of a simulation. The frames are the control nodes, while the yellow cross is the sampling point with an elaston. The wireframe mesh is a visual model.

### Frame-based elastic model

The turtle shown in the following figure is made of two materials, one of them rigid, defined using voxel values in a 3D image file.
We have imposed the frames distribution and let the GridMaterial compute the distribution of sampling points (yellow crosses).
The scene graph is similar with the steak in the next example.

Turtle with rigid hull (in red) and flexible parts (in blue).

Stiffness. | Frames and sampling points. | Simulation: rigid hull, flexible head and legs.

### Complex deformable solid

The complex model shown in the video is modeled using the scene graph shown in Figure Steak graph. The visial model is omitted for simplicity.
The distribution of the frames and sampling points is computed by GridMaterial during the initialization of FrameBlendingMapping<Frame,DeformationGradient>.
At each time step the two forcefields used to counter the deformation query the stress-strain law from GridMaterial, found at initialization.
The geometry file loaded by the collision and visual model must be consistent with the volumetric data loaded by GridMaterial.
The volumetric data is actually two-dimensional, based on the image used to generate the texture.

Steak graph.

## Code documentation

Please type command doxygen Doxyfile in this directory to generate the code documentation, then read the main page doxygen/html/index.html

## Publications

  Frame-based Elastic Models Benjamin Gilles; Guillaume Bousquet; François Faure; Dinesh Pai, ACM Transactions on Graphics, ACM, 2011, 30 (2)

  Sparse Meshless Models of Complex Deformable Solids François Faure; Benjamin Gilles; Guillaume Bousquet; Dinesh K. Pai, ACM Transactions on Graphics, ACM, 2011, Proceedings of SIGGRAPH'2011

## Intellectual property and rights

Authors | Guillaume Bousquet (INRIA-EVASION), Benjamin Gilles (INRIA-EVASION, UBC Vancouver), François Faure (INRIA-EVASION).
Contact | Francois.Faure@inria.fr
License | This plugin is distributed under the same license as the core of SOFA.
Patents |
APP registration |
Sponsors | Canadian Institutes of Health Research, Canada Research Chairs Program, NSERC, Peter Wall Institute for Advanced Studies, MITACS, Human Frontier Science Program, French ANR project “SoHuSim“ and European project “Passport for Liver Surgery” (FP7, ICT-2007.5.3)