Houdini 22.0 Nodes Geometry nodes

Muscle Mirror geometry node

Duplicates muscle geometry with symmetry. Muscle attributes are also copied/renamed with symmetry.

On this page
Since 19.0

This node duplicates the muscle geometry for one half of a symmetrical model. When it creates the muscle geometry for the other side of your model, it also creates mirrored proper muscle_ids for those muscles.

Mirror groups

The Group parameter on the Muscle Mirror SOP controls which muscles are mirrored. An incorrect group configuration can duplicate central muscles and break their attachment constraints in the muscle solver.

The node also provides several parameters for controlling the mirror operation. The From/To prefix settings define the naming convention for the mirrored geometry. By default, the node replaces the L_ prefix with R_. Adjust these prefixes to use a different naming convention or mirror from the opposite side.

Understanding constraint mirroring

When mirroring constraints, there are three primary types of detail attributes:

  • musclegluedict for all Muscle glue constraints

  • muscletobonedict for all Muscle to bone constraints (Vellum workflow only)

  • muscletomuscledict for all Muscle to muscle constraints (Vellum workflow only).

The mirroring process duplicates the entries in each of the attributes above for left side muscles and replaces the L_ prefixes in the duplicates with R_. For central muscles, like those with a C_ prefix or no prefix, the node preserves the entries without duplicating them and maintains the correct constraint relationships between mirrored pairs. If the entries for an L_ prefixed muscle reference R_ prefixed muscles, the entries for its R_ prefixed mirror reference the corresponding L_ prefixed muscles.

Troubleshooting

Otis

After creating your mirrored muscles, you can use an Otis Muscle and Tissue Configure SOP node to verify that the constraints were mirrored correctly:

  1. Create an Otis Muscle and Tissue Configure SOP node after your Muscle Mirror SOP.

  2. Enter the Viewer State to display the constraint Visualizers. These can be adjusted in the Visualizations section of the Otis Muscle and Tissue Configure SOP.

  3. If one side shows tangled or incorrect constraint connections, check the Group parameter in your Muscle Mirror SOP. You may need to exclude central muscles that shouldn’t be mirrored.

Note

The Muscle Mirror SOP will give a warning to check your Group parameter if it detects muscles on both sides of the mirror plane.

Vellum

After creating your mirrored muscles, you can use a Muscle Constraint Properties Vellum SOP node to verify that the constraints were mirrored correctly:

  1. Create a Muscle Constraint Properties Vellum SOP node after your Muscle Mirror SOP.

  2. Connect your bone geometry to its second input.

  3. Select the checkbox for Enable All to turn it on. This helps to preview your constraints without making any unwanted changes to them.

  4. Toggle between the Muscle to Muscle and Muscle to Bone tabs to check that the mirror looks correct.

  5. If one side shows tangled or incorrect constraint connections, check the Group parameter in your Muscle Mirror SOP. You may need to exclude central muscles that shouldn’t be mirrored.

Parameters

Group

Specifies the muscle(s) to apply the mirroring parameter. If left blank, all input muscles will be mirrored.

Tip

If you have central muscles, exclude them from the Group. Otherwise, the node duplicates them, which can cause issues during simulation. For example, when mirroring left side muscles, set Group to @muscle_id=L_*.

Naming

From Prefix

Specifies the name prefix that for the muscle_id value. For example, this parameter value would be L_ if your muscles were named are L_gastronemius, or L_oblique.

To Prefix

Specifies the name prefix that will replace the From Prefix in all of the automatically generated muscle geometry. For example, if the parameter value for From Prefix is L_, then your To Prefix parameter value should be R_ for R_gastronemius, or R_oblique.

Attributes to Mirror

Prefixed Attributes

Specifies all string primitive attributes whose values begin with From Prefix and are replaced with To Prefix on the mirrored side. This typically includes muscle_id. If you use additional ID attributes, such as tension_id for tension lines, list them here as well.

Shape Attributes

Specify any target shape positional attributes to mirror here. The only positional attributes that get mirrored automatically are P and tpose.

Note

If you create custom target shape attributes, you must list them in Shape Attributes or they will not mirror correctly. To check that the shape attributes have mirrored correctly, create an Attribute Swap SOP after your Muscle Mirror SOP. Set Source to the name of your shape attribute, and Destination to P.

Mirror Plane

Origin

XYZ position of the mirror plane relative to the origin of the muscles.

Distance

Distance offset of the mirror plane from the Origin.

Direction

Across which plane (X, Y, or Z) to mirror the muscles. Also determines the normal direction of the mirror plane.

Inputs

Input 1

Solid muscle geometry.

Outputs

Output 1

Original and mirrored muscles with corresponding mirrored values for the muscle_id attribute. If present, the musclegluedict, muscletobonedict, and muscletomuscledict constraint detail attributes are also mirrored correctly.

See also

Geometry nodes