| On this page |
Overview ¶
Proper geometry preparation is important for better muscle simulation. This page covers how to prepare your muscle and bone geometry before you simulate them. It ensures you have correct geometry formats, proper naming conventions, and verify the setup to prevent common simulation issues. Most of these steps are not mandatory but they are recommended for better results.
Geometry requirements ¶
Geometry preparation encompasses both the muscle geometry and bone geometry.
When preparing both muscle and bone geometry, there are several key parts:
-
All muscle surfaces must be manifold non-intersecting polygonal geometry.
-
Make sure your input geometry primitive type is
polygon faceand not a packed primitive. If it’s packed, make sure to unpack and, if necessary convert it from Polygon Soup Primitives to Polygons. -
Models should be real-world scale to ensure proper physics simulation
-
Make sure your geometry follows Houdini’s meter-based unit system.
-
To scale from centimeters to meters: use
Transform SOP with uniform scale of
0.01. Remember to use another Transform SOP at scale of100to get back to the original size before you export.
-
Specific to muscle geometry ¶
-
Each muscle component requires a unique
muscle_idattribute value for identification.
Specific to bone Geometry ¶
Bone surfaces serve as the foundation for muscle attachments and driving the motion in the simulation, and require specific preparation:
-
For Otis Simulations the bone surfaces must be triangulated. You can use a
Remesh SOP on your rest bones, and then deform them with your animated bones using a
Surface Deform SOP. If you have bone capture attributes, you can use a
Bone Deform SOP instead.
-
Remove small crevices and holes where possible.
-
You must have a valid
tposeattribute for rest position reference. -
An identifying string attribute such as
bone_idhelps with specifying muscle to bone constraints.
Muscle IDs and T-Pose setup ¶
The T-Pose and muscle IDs form the foundation of Houdini’s muscle simulation system. The T-Pose is the rest position where all constraint relationships and attachment points are established. The muscle_id attribute allows individual control over muscle properties, constraint relationships, and symmetrical behavior. This helps with more precise customization of each muscle’s physical characteristics and interactions. The proper muscle IDs ensure that properties and constraints are correctly assigned to specific muscles rather than applied globally. Both of these setups happen before simulation because the muscle solver relies on the T-Pose to configure constraints by temporarily removing animation and returning to this neutral state.
This setup is important because without proper T-Pose and muscle IDs:
-
Muscles lack stable reference positions for muscle attachments and prevent targeted property assignments.
-
Hard to establish accurate muscle ends.
-
Result in unstable constraints, incorrect muscle behavior, and the inability to control individual muscle properties effectively.
Muscle IDs ¶
The muscle_id attribute identifies distinct muscles. Each muscle and bone piece must have a unique identifier attribute.
You can create it in two ways:
1. From existing names
-
Use
Muscle ID SOP.
-
Turn on Initialize from Input Attribute.
-
Specify the name of your existing attribute in Input Attribute Name.
-
To use your attribute as is, turn off Extract Element from Path Attribute.
-
If you have a path-style attribute such as the hierarchy of the geometry is contained in the attribute value and separated by
/, then ensure Extract Element from Path Attribute is on. You can then specify the Element Pos from End to pick the last chunk (0), the second-to-last (1) and so on.
2. Manually naming using
Muscle ID SOP
-
Enter viewport state and select muscles individually
-
Assign appropriate prefixes follow naming convention:
-
L_prefix for left side muscles -
R_prefix for right side muscles -
C_prefix for central muscles
-
Bone ID attribute ¶
Similar to muscles, bones need identifying attributes. There is currently no predetermined attribute name for bones. The Otis recipes use muscle_id for the bones too, for simplicity. To create an id attribute for the bones:
-
Copy existing names when available using Initialize from Input Attribute on the
Muscle ID SOP.
-
OR use
Muscle ID SOP to create new bone IDs
-
Keep names descriptive and consistent with muscle naming
-
Muscle T-Pose setup ¶
The
Muscle Solidify SOP atutomatically handles T-Pose creation for your muscle geometry. During processing, it generates the T-Pose attribute and stores the model’s position as the rest position. The node then names this rest position attribute as
tpose which ensures that all muscles have proper rest positions for constraint calculation and deformation.
Bones T-Pose setup ¶
Unlike muscles, bones require manual setup of their T-Pose configuration. To do this, create a
Set T-Pose SOP for your bone geometry. This node creates and stores the critical rest position information that the muscle system uses for constraint calculations. The T-Pose attribute should be specified early in your network to ensure all downstream nodes have access to this reference position. Verify that the T-Pose values accurately represent your character’s intended rest position because this affects all muscle attachments and deformations that follows it. You can verify the value of the
tpose attribute by temporarily placing down an
Extract T-Pose SOP Extract T-Pose SOP on your animated bone geometry. This can help ensure the result matches your T-pose.
Pre-Roll configuration ¶
When your setup requires a pre-roll phase, add a
Muscle Preroll SOP to your animated bone surfaces.
This node manages the transition between rest pose and animation through three key parameters:
-
Initialization Framespecifies which frame serves as your target pose, establishing the endpoint for your pre-roll transition. -
Initial Hold parameterdetermines how long the system maintains the t-pose before beginning the transition. This corresponds to a frame number and will be the last frame that the T-pose will be held at. -
Pre-roll Durationcontrols the length of the blend between your t-pose and initial animation pose, allowing for smooth integration of dynamics. This is a number of frames rather than a frame number. -
If you want your output animation after the preroll to match the incoming animation, make sure
Initial Hold + Pre-roll Duration +1 = Initialization Frame.