Non-rigid material models#
A constitutive model is the equation that relates how much a material deforms to the stress it develops in response. In Genesis World you do not call these equations directly. You assign a material to an entity, and that choice selects both the solver that advances it and the constitutive model it obeys. This page explains the models behind the material classes in gs.materials: what each one computes, the parameters that shape it, and when to reach for it.
For the complementary question of which solver to use and how to configure a scene around it, see Beyond rigid bodies. For actuated muscles specifically, see Soft robots. For how forces cross material boundaries, see Solvers and coupling.
Elastic models#
An elastic material returns to its rest shape when unloaded: all deformation is stored as recoverable energy. Genesis provides elastic models across three solvers, and the elastic classes are the base that plasticity and muscle models extend.
gs.materials.MPM.Elastic offers two stress models through its model argument:
"corotation"(the default): the fixed-corotated model, whose energy penalizes deviation from the nearest rotation, \(\psi(\mathbf F) = \mu\,\lVert \mathbf F - \mathbf R\rVert_F^2 + \tfrac{\lambda}{2}(J-1)^2\). It handles large rotations cleanly and is a good default for stiff, chalk-like solids."neohooken": a Neo-Hookean model, \(\psi(\mathbf F) = \tfrac{\mu}{2}(\operatorname{tr}(\mathbf F^\top\mathbf F) - 3) - \mu\ln J + \tfrac{\lambda}{2}(\ln J)^2\). It reads \(\mathbf F\) and \(J\) directly and skips the SVD, so it is cheaper per particle. The accepted literal is spelled"neohooken".
gs.materials.FEM.Elastic solves elasticity on a tetrahedral mesh and exposes three models, defaulting to "linear":
soft = scene.add_entity(
material=gs.materials.FEM.Elastic(E=3e5, nu=0.45, model="stable_neohookean"),
morph=gs.morphs.Sphere(radius=0.1),
)
"linear": linear elasticity. Fastest and the only model with a constant (precomputed) Hessian, but valid only for small strains; large rotations produce visible artifacts."stable_neohookean": the rest-stable Neo-Hookean formulation. Its energy stays well-defined for inverted or degenerate elements, which makes it the robust choice for large deformation and contact-rich scenes."linear_corotated": linear elasticity evaluated in a per-element rotated frame, recovering correct behavior under large rotation while keeping a linear stress response to stretch.
gs.materials.PBD.Elastic takes a different route. Position-Based Dynamics does not integrate a stress; it enforces geometric constraints on particle positions. Stiffness is expressed as compliance (inverse stiffness) rather than a modulus, with stretch_compliance, bending_compliance, and volume_compliance controlling edge, bending, and volume constraints. In the XPBD formulation a constraint’s effective compliance is \(\alpha = \text{compliance}/\Delta t^2\), so a compliance of 0.0 is perfectly rigid. Reach for it when speed and stability matter more than physical accuracy.
Elastoplasticity: permanent deformation#
A plastic material keeps part of its deformation after unloading. Genesis models this by splitting \(\mathbf F\) into an elastic part that stores energy and a plastic part that does not. Each step first computes a trial elastic state, then a return mapping projects it back onto a yield surface, moving any excess into the permanent plastic part.
gs.materials.MPM.ElastoPlastic supports two yield criteria through use_von_mises:
von Mises (
use_von_mises=True, the default): yielding is governed by the deviatoric (shape-changing) part of the Hencky strain \(\boldsymbol\varepsilon = \ln\boldsymbol\Sigma\). The material flows once \(\lVert \operatorname{dev}\boldsymbol\varepsilon\rVert\) exceeds \(\tau_Y / (2\mu)\), where the thresholdvon_mises_yield_stressis \(\tau_Y\). This models a metal- or clay-like solid that dents and holds the dent.Singular-value clamping (
use_von_mises=False): the principal stretches are clamped into \([\,1-\texttt{yield\_lower},\ 1+\texttt{yield\_higher}\,]\), capping how far the material may stretch or compress elastically before the rest is made permanent.
gs.materials.MPM.Sand implements a Drucker-Prager model for cohesionless granular media. Its yield surface is a cone in stress space set by friction_angle (degrees): particles resist shear only under confining pressure, so sand piles up to an angle of repose and otherwise flows.
sand = scene.add_entity(
material=gs.materials.MPM.Sand(friction_angle=45.0), # degrees
morph=gs.morphs.Box(size=(0.2, 0.2, 0.2)),
)
gs.materials.MPM.Snow is a specialization of ElastoPlastic that uses singular-value clamping (it does not support von Mises) and additionally hardens as it compacts: the more it is compressed, the stiffer it becomes. This reproduces the way snow packs into a firm, shape-holding solid.
Liquids#
Liquids sustain no shear stress at rest; they resist only changes in volume. Three material classes model them, differing in how strictly incompressibility is enforced.
gs.materials.MPM.Liquid is weakly compressible. Each step it discards the shape of \(\mathbf F\), keeping only its volumetric part \(J^{1/3}\mathbf I\), so no shear stress accumulates and the material flows freely; pressure comes from the volume change alone. Set viscous=True to retain a deviatoric viscous term for a thicker fluid.
gs.materials.SPH.Liquid is a purely particle-based fluid whose pressure follows a Tait equation of state,
where \(k\) is stiffness, \(n\) is exponent, and \(\rho_0\) is the rest density rho. It exposes fluid parameters directly: mu sets viscosity and gamma sets surface tension. Choose SPH when you want a free-surface liquid tuned by physical fluid properties.
gs.materials.PBD.Liquid enforces a per-particle density constraint positionally rather than through pressure, tuned by density_relaxation and viscosity_relaxation. It is the fastest liquid model and the least physically precise.
Muscles: active materials#
A muscle is an elastic material with an extra, controllable stress. On top of the passive elastic response, it adds an active stress along an embedded fiber direction \(\mathbf m\), proportional to a per-step actuation signal. Contracting the fiber pulls the body into a new shape; releasing it lets the elastic part restore the rest configuration.
gs.materials.MPM.Muscle: actuated per particle; extendsMPM.Elasticand defaults to the"neohooken"passive model.gs.materials.FEM.Muscle: actuated per tetrahedral element; extendsFEM.Elasticand defaults to the"linear"passive model.
Both accept n_groups to define independently actuated fiber groups. The end-to-end control loop is covered in Soft robots.
Cloth and thin shells#
Cloth is a two-dimensional material: it stretches and bends but has negligible thickness. Two classes model it.
gs.materials.PBD.Cloth: a constraint-based sheet with separatestretch_complianceandbending_compliance. Itsrhois a surface density in kg/m², and entity mass isrhotimes surface area. This is the fast, interactive option for garments and flags.gs.materials.FEM.Cloth: a thin-shell FEM material for the IPC contact backend, parameterized bythickness(m) and optionalbending_stiffness. Use it when cloth must resolve accurate, penetration-free contact against other bodies.
Choosing a model#
Behavior you want |
Material |
Key parameter or option |
|---|---|---|
Recoverable elastic solid |
|
|
Dents and holds its shape |
|
|
Granular media / sand |
|
|
Compacting snow |
|
|
Flowing liquid |
|
|
Actuated soft body |
|
|
Cloth and shells |
|
compliances; |
References#
Stomakhin, A. et al. “A Material Point Method for Snow Simulation.” SIGGRAPH 2013.
Klár, G. et al. “Drucker-Prager Elastoplasticity for Sand Animation.” SIGGRAPH 2016.
Smith, B., Goldade, T., Kim, T. “Stable Neo-Hookean Flesh Simulation.” ACM TOG 2018.
Macklin, M., Müller, M., Chentanez, N. “XPBD: Position-Based Simulation of Compliant Constrained Dynamics.” MIG 2016.
Bender, J., Koschier, D. “Divergence-Free Smoothed Particle Hydrodynamics.” SCA 2015.