Eng 繁中 日本語 한국어 简中

Physics System

DanceXR has model format-specific physics systems for character models, plus a custom built XPBD (extended particle-based dynamics) system that can be used to simulate cloth, soft body and simplified rigid bodies.

PMX models come with physics component definitions and it should work out of the box. You can customize and fine-tune the physics behavior for PMX models in the PMX physics settings.

For XPS and FBX models, you need to set up physics from scratch using the provided physics tools tailered for common usecases. See below for the list of tools and their recommended use cases.

By default the physics system uses the built-in Unity physics engine based on PhysX. We also have a custom made physics engine based on XPBD (Extended Position-Based Dynamics) which provides better control and stability especially for cloth and hair.

For terms (rigid body, joint, colliders, spring force, damping, projection distance, projection angle), see Concepts & glossary.


Physics Tools

The physics tools are a collection of tools that allow you to quickly set up physics for your models. Each individual tool focuses on a particular use case, minimizing the number of parameters you need to tweak to get a good result. Most of the time you only need to select the right bone to get the desired behavior. There are also presets to help you quickly find good settings and and visualization for understanding the effect of each parameter.

  • Body colliders — capsule colliders along the actor’s body, used so freely-moving parts (hair, cloth, skirt) collide with the body instead of clipping through.
  • Hair physics — spring-bone simulation on a tree of bones rooted at the head. Set the root bones and DanceXR walks the children to build the rig.
  • Skirt physics — chain physics with horizontal connections (mesh-like), suited to skirts and hems.
  • Dangling physics — chain physics without horizontal connections, suited to ribbons, ties, ear chains, animal tails, anything that hangs.
  • Boobs physics — joint-based jiggle on breast bones, with counter-gravity to compensate for the constant downward pull.
  • Soft body physics — connecting bones with a mesh of spring force constraints to simulate volumetric deformation on body parts like butts and thighs.
  • Detach object — release a bone or object so you can remove certain parts by making it drop off. Useful when they don’t have separate materials to hide them with transparency.
  • Auto Reset — automatically reset physics components when velocity reaches a certain threshold, to prevent explosions.

Demo video:


Simulation System

The simulation system is a custom built XPBD (extended particle-based dynamics) system that can be used to simulate cloth, soft body and fluid.

  • Cloth simulation — adding cloth to the model.
  • Mesh to cloth — convert a mesh on the model into a cloth-simulated object.
  • Fluid simulation — simulate simple fluid effect like viscosity with particles.
  • Tentacle simulation — simulating tentacles movement by connecting nodes with constraints and drive force.

Settings

You can control the physics behavior with the following settings.

  • System-level physics settings — global settings that apply to all physics simulations in DanceXR, regardless of model format or rig type.
  • PMX physics settings — PMX-specific settings that override the physics definitions from the model file.
  • Physics Tools:
    • Body colliders — size and position of the colliders along the body.
    • Hair physics — spring force, damping, collider radius, and bone selection for hair physics.
    • Skirt physics — spring force, damping, collider radius, and bone selection for skirt physics.
    • Dangling physics — spring force, damping, collider radius, and bone selection for dangling physics.
    • Boobs physics — spring force, damping, collider radius, bone selection, and counter-gravity for boobs physics.
    • Soft body physics — particle size, constraint compliance, and bone selection for soft body physics.
    • Detach object — bone selection for detach object.
    • Auto Reset — velocity threshold for auto reset.
  • Cloth Simulation settings — mesh creation parameters, simulation parameters, and collider adjustments for cloth simulation. It includes
    • Cloth Mesh 1
    • Cloth Mesh 2
    • Fluid Simulation
    • Mesh To Cloth
  • Tentacle Simulation settings — node count, spring force, damping, and collider radius for tentacle simulation.
  • Ragdoll settings — joint limits, spring force, damping, and collider radius for ragdoll simulation.

Further reading