Houdini 20.5 Nodes Geometry nodes

Muscle Constraint Properties Vellum geometry node

Creates and modifies the muscle Vellum constraints for the input solid muscle geometry in preparation for the muscle solver.

On this page
Since 19.0

Overview

This node creates and modifies the attributes that drive multiple layers of muscle Vellum constraints. These constraints are then used by the Muscle Solver Vellum SOP to:

  • Constrain muscles to bones so that they stay on the bones (and do not fall off) and generally follow them rigidly during the bones' animation.

  • Constrain muscles to muscle to keep bundles or groups of muscles together during the simulation.

  • Constrain the muscle ends so that they are very inflexible and closely follow the bones' animation.

  • Impart neighborhood velocity to the muscles.

How-to

To...Do this

Set up muscle properties for your muscles

  1. Create your first Property Assignments multiparm.

  2. In the first multiparm’s tab, leave the Group parameter field empty and then set all the broad general constraint settings that you want to apply to all the muscles for your character.

    This tab will be your constraint settings master page, and most of these settings will most likely use the Absolute versions of the parameters.

  3. Select your Muscle Solver Vellum SOP node, turn on its Display flag, and then flip book your simulation to view the result of your general muscle constraint settings in MPlay.

    Note

    Some of the muscle behaviors you see in your flip book may be the result of the physical properties of your muscles and not their constraints, so you may need to go back to your Muscle Properties SOP nodes to adjust their settings.

  4. Create your second Property Assignments multiparm.

  5. In the second multiparm, type the names of the muscle or group of muscles you want to define the constraint settings for in the Group parameter field using the @muscle_id grouping syntax, and then set all the constraint settings that you want to apply to those muscles.

    This tab will be a specific constraint behaviors page where you will dial in the constraint settings for the muscles you specified, and most of these settings will most likely be a mixture of Absolute and Relative versions of the parameters.

  6. Select your Muscle Solver Vellum SOP node and then flip book your simulation once again to view the result of your specific constraint behavior properties set-up in MPlay.

  7. Repeat steps 4-6 for each additional page of constraint properties you need to create.

State

Muscle Constraint Vellum hotkeys

Hotkey or Interaction

Action

Press A

Adds a new Property Assignments multiparm for the currently selected muscle in the viewport state.

Press B

Turns on muscle to bone candidate selection mode. Click the muscle you want to add as a new muscle to bone candidate. The muscle you select is added to the Muscle to Muscle > Attachment Candidate list for the currently selected Property Assignments multiparm.

Press C

Turns on muscle to muscle candidate selection mode. Click the muscle you want to add as a new muscle to muscle candidate. The muscle you select is added to the Muscle to Muscle > Attachment Candidate list for the currently selected Property Assignments multiparm.

Parameters

Visualize

Determines which main constraint properties are currently being displayed in the node’s viewport state.

Muscle Ends

Displays a heat map of the regions of a muscle that are designated as muscle ends in the viewport state. These areas indicate where the constraints attach the muscle rigidly to the bones.

Muscle to Muscle

Displays lines that indicate the attachment constraints between muscles in the viewport state. These attachments keep groups of muscles that are in close proximity to each other together and they prevent the muscles from flying away from each other during their simulation.

Muscle to Bone

Displays lines and a heat map for the muscle to bone attachments in the viewport state. The lines indicate the vertex connections between the bone facing side of a muscle and its bones. The heat map indicates which areas of a muscle are closer to the bones than others. The brighter the heat map color, the higher the Stiffness value for the muscle to bone constraint.

Collision Radius

Displays the collision radii for a muscle in the viewport state.

Modified

Displays the muscle in a regular manner, without any specific constraints or their effects visualized in the viewport state.

Display Bone Geometry

When on, shows the node’s second input in the viewport state. Bones are only displayed if you provide them as the second input.

Muscle End Radii use World Space Distances

When off, End Regions will be proportional to the computed length of a given muscle. The computed length of a muscle will be stored in the musclelength point attribute. If the musclelength attribute already exists, it will be used instead of being computed. When this parameter is on, End Regions disregards musclelength, and the muscle end mask values are measured in world units. Muscle Ends use the axialramp attribute to determine the extents of individual muscles.

Axial Ramp Correction

When on, the axialramp attribute will tend to be more sensible about which way is up. This will affect the correlation between the Muscle End Radius parameters, and the orientation of the affected muscles. When off, this orientation can appear somewhat arbitrary. The axialramp attribute will only be computed if it doesn’t already exist. Therefore, this toggle will only have an effect when the incoming muscle geometry does not have an axialramp.

Property Assignments

When you first create a Property Assignment multiparm, all its parameters are off by default and each parameter has a default value. You can choose to enable only the parameters you want to use in that multiparm, and you can also choose to keep their default values or modify them. If you ever need to view the default values for the muscle proprieties, just look at the unmodified Absolute values of the parameters. Only parameters that are turned on (with the check boxes next to their parameter names) are applied to their respective muscles.

Absolute and Relative parameters

Each parameter has an Absolute or Relative version of the setting.

When a parameter is Absolute, its value is explicit and it functions as an override. For example, if on multiparm tab 1 Shape Stiffness = 100 and then on multiparm on tab 2 Shape Stiffness = 50, then the shape stiffness property value the muscle solver would use is solidshapestiffness = 50.

When a parameter is Relative, it is a multiplier of the parameter’s default value (if only the Relative versions for a parameter are used across all Property Assignment multiparm tabs) or a multiplier of an Absolute value from a previous tab. For example, if on multiparm tab 1 Shape Stiffness = 100 and then on multiparm tab 2 Relative Shape Stiffness = 2, then the shape stiffness property value the muscle solver would use is solidshapestiffness = 200.

Number of Assignments

  • The number of defined muscle property setting assignments.

  • Adds or removes a Property Assignment multiparm.

Property Assignment multiparm tabs

  • A single multiparm tab can define the muscle property settings for a single muscle or multiple muscles (muscle_ids). See Group.

  • A single muscle can appear on multiple multiparm tabs.

  • Each multiparm tab is processed in sequential order, from lowest numbered tab to highest numbered tab. So if a muscle appears on more than one multiparm tab, then the property setting values on the highest numbered tab takes priority and either multiply (when set to Relative) or override (when set to Absolute) the settings from lower numbered tabs.

1 - Deletes the currently selected multiparm tab.
2 - Inserts a new multiparm tab to the right of the currently selected multiparm tab.
3 - Currently selected mulitparm tab.
4 - Adds or removes multiparm tabs from the end of the list. Increasing the number adds tabs and decreasing the number deletes tabs.
5 - Adds a new multiparm tab to the end of the list.
6 - Removes the multiparm tab from the end of the list.
7 - Deletes all the current multiparm tabs.

Group

Determines which muscle(s) to assign the current Property Assignment multiparm’s settings to. This parameter only accepts single muscles or lists of muscles formatted in the @muscle_id grouping syntax. For example, @muscle_id=L_biceps, @muscle_id=L_biceps,L_triceps, or @muscle_id=L_biceps @muscle_id=L_triceps @muscle_id=L_deltoid. This parameter does not accept regular geometry groups.

You can specify the group selections for your Group parameter in the following ways:

  • In the viewport state, press A, select the muscle(s) you want to add to the group, and then press Enter. A new Property Assignment multiparm is created and the muscle(s) you selected are added to its Group.

  • In the Parameter Editor, click the arrow icon next to the Group parameter, select the muscle(s) you want to add to the group from the viewport state, and then press Enter. The muscle(s) you selected are added to the Group.

  • In the Parameter Editor, manually type the names (muscle_ids) of the muscles you want to add to the group in the Group field.

Tip

If you leave the Group parameter field empty, then its multiparm settings are applied to all your muscles.

Property Label

This parameter allows you to enter a desctiptive string of text to help you name or identify the properties configured on this multiparm tab.

Muscle Ends

This constraint is applied where the muscle insertions exist near the ends of your muscles. You can disable it entirely or apply it in one of two ways:

  • As a target constraint. Muscle ends will attempt to follow pre-animated positions during a simulation.

  • As a nearest bone attachment. Muscles will attach themselves to nearby bones in the t-pose position.

    You can choose which constraint method to use by setting the Muscle Ends parameter on the Muscle Solver Vellum SOP node in your muscles network.

Stiffness

Override

Determines how strong the constraint is when increasing the distance between the muscle ends and their bones relative to the rest distance, and how much the muscle ends are allowed to move away from the bones. Also determines how rigidly the muscle ends follow the bones' animation.

Relative Stiffness

Multiplier

See the Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Damping

Override

Reduces the constraint’s energy from iteration to iteration and determines how much energy is lost trying to maintain the attachment. A high damping value creates a sluggish connection. It does not weaken the attachment however, it just makes the attachment not respond as quickly. For example, it makes the attachment appear more syrupy and the muscle appears to swim towards the bones rather than follow them directly. A low damping value may cause oscillations and jitteriness in your muscle.

Relative Damping

Multiplier

See the Relative Damping parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Distance Threshold

Override

Determines how far to search for what to attach the muscle ends to. Typically the heat mapped areas of the muscle will attach to nearby bones. The constraint will look within this distance of attachment and will try to find bones within that threshold. If it finds bones, then that is what it will attach the muscle ends to. If it does not find any bones within that threshold, it will keep the muscle ends unconnected.

Relative Distance Threshold

Multiplier

See the Distance Threshold parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Compression Stiffness

Override

Determines how strong the constraint is when reducing the distance between the muscle ends and their bones relative to the rest distance, and how much the muscle ends are allowed to move towards the bones. Also determines how rigidly the muscle ends are held to the bones.

Tip

If your bone movements are causing your muscle ends to poke out unnaturally, you can use Compression Stiffness to push the muscle ends closer to the bones so that collisions and forces have more influence on them.

Relative Compression Stiffness

Multiplier

See the Compression Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Rest Length Scale

Override

The rest length of the distance constraints will be the original distance between the muscle ends and their bones. This scale increases or decreases the resting distance during the simulation.

Relative Rest Length Scale

Multiplier

See the Rest Length Scale parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Tangent Stiffness

Override

Prevents the connection orientation of the muscle ends from changing and keeps the relationship of the muscle ends relative to their bones. When a target constraint is used, this prevents the muscle end’s pre-animated connection orientations from changing. When a nearest-bone attachment is used, this prevents the orientation of the connection between the muscle ends and the nearest bones from changing. A high value tries to preserve the initialization connection angle, and a low value does not try to preserve the initialization connection angle. For example, for tendon areas of your muscle, the muscle end to bone connections should have a much higher Tangent Stiffness.

Relative Tangent Stiffness

Multiplier

See the Tangent Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

End Regions

Similar to the radius controls that exist for the muscle’s tendons, but this applies to the muscle end constraints and their heat map visualizations in the viewport state. These Radius parameter values are used by the muscle ends constraint to calculate the distances from the muscle ends. It looks at what it guesses is the axis of a muscle, and it then takes a distance along that axis. This affects how much the muscle ends constraint kicks in for a muscle.

Muscle to Muscle

This constraint creates connections between muscles. These connections hold neighboring muscles together during their simulation so that they do not separate or fly away from each other. The muscle regions that participate in these connections are determined by proximity (in Houdini units), and you can set this threshold with the Distance Threshold parameter. You can also limit these connections to specific neighbor muscles with the Attachments Candidates parameter.

Connections go both ways with the muscle to muscle constraint. So if you want to remove connections from a given muscle and make it independent from everything around it, then you need to make sure that the muscle does not connect to any neighbor muscles, and its neighbor muscles also do not connect to it.

Stiffness

Override

Determines how strong the connections between muscles are, how strong the constraint is when increasing the distance between the muscles relative to their rest distances, and how much the muscles are allowed to move away from each other.

Relative Stiffness

Multiplier

See the Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Damping

Override

Reduces the constraint’s energy from iteration to iteration and determines how much energy is lost trying to maintain the connection. A high damping value creates a sluggish connection. It does not weaken the connection however, it just makes the connection not respond as quickly.

Relative Damping

Multiplier

See the Damping parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Compression Stiffness

Override

Determines how strong the constraint is when reducing the distance between muscles relative to their rest distances, and how much the muscles are allowed to move towards each other. Also determines how rigidly the muscles are held together.

Relative Compression Stiffness

Multiplier

See the Compression Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Rest Length Scale

Override

The rest length of the distance constraints will be the original distance between muscles. This scale increases or decreases the resting distance during the simulation.

Relative Rest Length Scale

Multiplier

See the Rest Length Scale parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Distance Threshold

Override

Determines how far to search for neighboring muscles to connect to. The constraint will look within this specified distance of attachment and will try to find other muscles within that threshold. If it finds nearby muscles, then that is what it will attach the muscle to. If it does not find any other muscles within that threshold, it will keep the muscle unconnected.

Relative Distance Threshold

Multiplier

See the Distance Threshold parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Slide Rate

Override

Determines how easily a muscle can slide across nearby muscles. Muscle to muscle connections can drift along the surfaces of the nearby muscle. The same muscle points will always be connected, but nearest location on the nearby muscle can change when sliding occurs. This constraint property controls how fast a muscle can move away from their initial (rest) muscle attachment location.

Relative Slide Rate

Multiplier

See the Slide Rate parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Attachment Candidates

Restricts which muscles a muscle can connect to a list of specified muscles. This field accepts entire muscles listed given as @muscle_ids, ranges of primitive numbers, or individual primitive numbers as a space separated list. For example, if your character’s leg muscles are connecting to its abdominal muscles because they are close to them, then you can specify a list of Attachment Candidates to remove these undesirable connections.

Tip

When in the viewport state for this node, you can press the C hotkey and then the to select the muscles you want as muscle to muscle attachment candidates. Press Enter to confirm your selections.

Muscle to Bone

This constraint attaches muscles to nearby bones (or whatever geometry is coming in on the node’s Input 2). These attachments hold muscles to bone during their simulation, and make the the muscles follow the bones during their skeleton animation. The muscle and bone regions that participate in the muscle to bone attachments are determined by proximity (in Houdini units). This allows you to prune connections based on the distance between muscles and bones. You can set this distance threshold with the Distance Threshold parameter. You can also limit the muscle to bone attachments to specific bones with the Attachments Candidates parameter.

In the node’s viewport state, you can view a heat map of the areas of your muscles that are constrained to your character’s bones. The heat map visualizer in the viewport indicates where and how strong the muscle to bone constraint is applied. The brighter the heat map color, the greater the strength (and the higher the Stiffness value) of the muscle to bone constraint in those areas. The muscle to bone constraint will multiply the strength of its attachments based on the heat map.

Stiffness

Override

Determines how strong the constraint is when increasing the distance between a muscle and its bones relative to their rest distance, and how much the muscle is allowed to move away from its bones. Also determines how rigidly the muscle follows their bones' animation.

Relative Stiffness

Multiplier

See the Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Damping

Override

Reduces the constraint’s energy from iteration to iteration and determines how much energy is lost trying to maintain the attachment. A high damping value creates a sluggish connection. It does not weaken the attachment however, it just makes the attachment not respond as quickly. For example, it makes the attachment appear more syrupy and the muscle appear to swim towards the bones rather than follow them directly. A low damping value may cause oscillations and jitteriness in your muscle.

Relative Damping

Multiplier

See the Damping parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Mask Falloff

Override

Applies a nonlinear fall-off to how the painted mask is applied to a muscle and determines how gradual the heat map fall-off appears on its muscle visualizations in the viewport. The brighter the heat map color, the more influence the constraint has on the muscle. The darker the heat map color, the more influence the constraint has on the muscle.

Relative Mask Falloff

Multiplier: See the Mask Falloff parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Distance Threshold

Override

Specifies the distance range from a muscle at which connections with bones can be formed or not, and determines if there should be more constraint connections or fewer of them. The lower the value, the closer the muscle has to be to its bones to form a connection. How strong these connections are depends on the Mask Falloff heat map values.

Relative Distance Threshold

Multiplier

See the Distance Threshold parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Compression Stiffness

Override

Specifies how close the bones are allowed to get to a muscle and determines how much the constraint is allowed to shrink. During the course of a muscle simulation, the bones naturally get closer to their muscle. When Compression Stiffness is strong, the less the bones are allowed to approach their muscle and the more rigid the connections (indicated by the lines) are between them to maintain their distance from each other. When Compression Stiffness is weak, the closer the bones are allowed to get to their muscle. This parameter helps to maintain a specific distance between a muscle and its bones.

Relative Compression Stiffness

Multiplier

See the Compression Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Rest Length Scale

Override

The rest length of the distance constraints will be the original distance between the muscle and their bones. This scale increases or decreases the resting distance during the simulation.

Relative Rest Length Scale

Multiplier

See the Rest Length Scale parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Slide Rate

Override

Determines how easily a muscle can slide across its bone surfaces. Muscle to bone connections can drift along the surfaces of the bones. The same muscle points will always be connected, but the points on the bones can change when sliding occurs. This constraint property controls how fast a muscle can move away from their initial (rest) bone connection points.

Relative Slide Rate

Multiplier

See the Slide Rate parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Tangent Stiffness

Override

Prevents the initialization connection orientations between a muscle and its bones from changing and keeps the relationship of the muscle relative to its bones. A high value tries to preserve the initialization connection angle, and a low value does not try to preserve the initialization connection angle. For example, for tendon areas of your muscles, the muscle to bone connections should have a much higher Tangent Stiffness.

Relative Tangent Stiffness

Multiplier

See the Tangent Stiffness parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Velocity Stiffness Factor

Override

This multiplier will stiffen the Muscle to Bone constraint using the velocity of the attached bones. The magnitude of the velocity computed at the attched bone locations will be multiplied by this factor and then added to the Muscle to Bone Stiffness.

Relative Velocity Stiffness

Multiplier

See the Velocity Stiffness Factor parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Attachment Candidates

Override

Restricts which bones a muscle is allowed to connect with. This field accepts any valid primitive group or adhoc group string. For example, if your character’s bicep muscle is unintentionally connecting to its rib bones, then you can specify a list of Attachment Candidates to limit connections to the arm and shoulder bones.

When using Attachment Candidates, if the optional primitive attribute muscletoboneattachid exists on both the source muscle and target bone, and if the integer value of muscletoboneattachid matches, then the muscle to bone attachment will be restricted to the matching primitives. If the muscletoboneattachid attribute exists as a point attribute, it will be promoted to a primitive attribute just in time as constraints are generated. This will allow a tool like Attribute Paint SOP to be used to paint matching indices. The muscletoboneattachid attribute must be an integer value. If the attribute exists and no match is found, constraints will not be generated.

Tip

When in the viewport state for this node, you can press the B hotkey and then use the to select the bones you want as muscle to bone attachment candidates. -click once to select individual primitives, and -double click to select an entire bone (range of connected primitives). Press Enter to confirm your selections.

Limitation

You cannot mirror muscle to bone attachment candidates that are defined as primitive numbers. Use named primitive groups with prefixing instead (like L_spinebone) or alternatively create your connections, do your mirroring, add any connections that you need, and then add another Muscle Constraint Properties Vellum SOP after the mirror to define the mirrored geometry’s constraint parameter values.

Collisions

These parameters change the collision radius for the points on a muscle’s tetrahedral mesh.

Notes

  • Please try to keep your collision radii as small as possible to avoid costly collision detection/rectification on the muscle solver.

  • There is another constraint type that is used but is not part of this node’s UI: the muscle glue constraint. This constraint exists on the Muscle Paint SOP node located downstream in your Muscles & Tissue network.

Collision Scale

Override

Although not a constraint, this parameter sets the boundary distance from each muscle point at which collision detection occurs for a muscle tetrahedral mesh. You can view a muscle’s collision boundaries in the viewport state for this node with the Visualize > Collision Radius setting.

When computing collisions, this node uses its underlying Vellum constraint’s Edge Length Scale to determine whether or not an external collider is within the Collision Scale boundary for colliding. For example, a value of 1 creates a collision boundary (like a force field) around a muscle point equal to the radius of the edges around it.

Relative Collision Scale

Multiplier

See the Collision Scale parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Velocity Blend

This constraint controls how much of the neighborhood velocity can be imparted to your muscles.

Note

The Muscle Solver Vellum SOP node located downstream in your Muscles & Tissue network has additional parameters for applying velocity blending.

Velocity Blend

Override

Specifies the amount of velocity a muscle inherits from its bones. Over the course of a muscle simulation, a character’s animated bones have a certain given velocity as they move. And since the muscle to bone attachment constraint connects muscles to bones, a certain amount of the bones' velocity is imparted to those muscles and they can be moved around by it. The higher the Velocity Blend, the more the constraint will try to keep the muscles with the bones during their animation. This is useful for keeping muscles connected to the bones of a fast moving character.

For example, if a muscle is constrained to a fast moving bone and Velocity Blend is turned on, then not only is there a spring-like connection between the muscle and bone that the constraint will try to maintain, but the muscle will also inherit the bone’s momentum and be influenced by that force.

Relative Velocity Blend

Multiplier

See the Velocity Blend parameter description.

This parameter is only available when the Absolute/Relative selector is set to Relative.

Bone Geometry

These parameters define the bone t-pose (rest transforms) and initialization frame for your character’s skeleton. This determines the particular bone orientations that are used when computing the constraints for this node.

Note

If you are not using the Input 2 on this node, then you can just use the tpose attribute value from upstream in your Muscles & Tissue network.

T-Pose

Specifies from where to get the bone t-pose.

Use Initialization Frame

Get the bone t-pose from its first frame transforms.

From Attribute

Get the bone t-pose from the attribute defined by the T-Pose Attribute parameter.

Initialization Frame

Specifies the number of the animation frame from which to get the bone t-pose.

T-Pose Attribute

Specifies the name of the attribute from which to get the bone t-pose.

Bone ID Attribute

Determines which bone(s) to assign the current Bone Geometry multiparm’s settings to. Similar to muscle_id to select muscles.

  • In the viewport state, press B, select the bone(s) you want to add, and then press Enter.

Inputs

Input 1

Solid muscle (tetrahedral) meshes with properties.

Input 2

Bone geometry or other input geometry.

Outputs

Output 1

Solid muscle (tetrahedral) meshes with properties and muscle Vellum constraints.

See also

Geometry nodes