Obi can be used to simulate character appendages and certain body parts. This includes things like braids, breasts, tails, etc. but is not limited to this: you can add physical simulation to any bone hierarchy by adding a ObiBone component to it.
Bone hierarchies endowed with ObiBone become part of an animation-driven physical simulation: they will react to gravity, external forces, character movement/inertia, collisions against other objects, etc. The following animations show a dragon's tail (made of 12 particles, weighting 144 kg in total) driven by both animation and simulation using ObiBone:
The typical use case for ObiBone is to drive character bones. This means two things:
To ensure animation happens before simulation, you can either:
If you're unsure about update order, check Unity's execution order chart. Once both your solver and your updater are in place, you can add a ObiBone component to any bone in your character by using Unity's "Component" menu: Component->Physics->Obi->Obi Bone. This is how its inspector window looks like:
This component will create a particle for every bone down its hierarchy in a recursive fashion -starting from the bone transform it has been added to, which will be referred to as its root bone-, and rig them up using constraints. The bone that's furthest away from the root bone (measuring distances from each bone to the next) is known as the tip bone.
Let's take a look at each parameter:
When enabled, the root particle will copy its position and rotation from the root bone. This is usually what you want for character appendages, so it's enabled by default. If you want the root hierarchy to be able to freely move around instead, disable this option.
When enabled, bones will copy particle positions, which means they will stretch and shear together with particles. Disable it to only transfer particle rotation to the bones.
You can exclude specific bones or entire branches from the ObiBone components.
Material used to resolve collisions. See collisions.
Category used by this bone hierarchy. See collisions.
Categories this bone hierarchy is allowed to collide against. See collisions.
If enabled, this bone hierarchy will be able to collide with itself.
Enables surface-based collisions for this bone hierarchy. See surface collisions. When using surface collisions, the entire bones (instead of just particles) are used for collision detection. Use this if the spacing between bones is very large in your skeleton and you need accurate collision detection.
The following attributes can vary spatially along the bone hierarchy. You can specify both a base value and a distribution curve for each one of them. The final attribute value at each bone in the hierarchy is determined by evaluating the curve at each bone's normalized position -which ranges from 0 at the root bone to 1 at the tip bone- and multiplying the resulting percentage by the base value. See the following diagram:
Mass for each particle in the bone hierarchy. The mass of a particle determines how it reacts when interacting/colliding with other particles. Heavier particles can easily move comparatively lighter objects.
Rotational mass for each particle in the bone hierarchy. The rotational mass of a particle determines its rotational inertia: particles with higher rotational mass are more difficult to rotate and once rotating, will keep rotating on their own for longer. Particles with a small rotational mass rotate easily and their rotation feels more "snappy".
Radius for each particle in the bone hierarchy. This determines the size of each particle.
Stretch compliance for each constraint in the bone hierarchy. See stretch/shear constraints.
Shear compliance in the X axis for each constraint in the bone hierarchy. See stretch/shear constraints.
Shear compliance in the Y axis for each constraint in the bone hierarchy. See stretch/shear constraints.
Torsion compliance for each constraint in the bone hierarchy. See bend/twist constraints.
Bend compliance in the X axis for each constraint in the bone hierarchy. See bend/twist constraints.
Bend compliance in the Y axis for each constraint in the bone hierarchy. See bend/twist constraints.
Plastic yield for each constraint in the bone hierarchy. See bend/twist constraints.
Plastic yield for each constraint in the bone hierarchy. See bend/twist constraints.