|On this page|
This node sets up and animates the
muscletension point attribute on input solid muscle geometry which drives the flexing action of your muscles during their simulation.
muscletension attribute is used by the muscle solver to apply anisotropic scaling to or squeeze the incoming tetrahedral meshes. This muscle scaling is applied along the muscle fiber direction defined by the
materialW vector point attribute which comes from the Fiber Groom SOP node.
The amount muscles flex or the strength of their contraction during the squeeze is determined by the
fiberstiffness attribute which comes from the Fiber Strength parameter on the Muscles Properties SOP node.
muscletension functions a lot like a multiplier of
fiberstiffness. When a muscle contracts, a volume preservation force also comes into play causing the non-tendonous regions of the muscle to bulge. This volume scale force is generated by the
fibervolumescale attribute which comes from the
With this node, you can perform three main muscle set-up tasks:
Link your muscle geometry (
muscle_idattribute) to the muscle tension lines (
autoflex_idattribute) that drive their automatic flexion timing.
Adjust the activation ratio between muscle tension line length (
lengthattributes) and what is considered a fully flexed state for the muscles (
muscletensionattribute). This sets the threshold for what is considered flexed or not.
muscletensionattribute which is then used by the muscle solver to help determine when muscles try to contract and relax during their shot animation. This animation can be created automatically by the muscle tension lines alone or in combination with keyframes on the Muscle Flex parameters. You can tell the solver when to activate the muscles and when not to activate them by keyframing those parameter values.
Link muscles to muscle tension lines
Adjust the muscle flex activation threshold
Adjust muscle flexion and animate muscle tension
In the Parameter Editor, click Muscle Flex tab > Detect New button to build the node’s parameters. Muscle IDs are detected and you will get one flex control per
In the viewport, the Muscle Flex State is inherently a selection state. Select one or more muscles, and press Enter to make them current. Scrub the timeline to any frame and you can interact with the current muscles by:
In the viewport, the Muscle Flex state is inherently a selection state. Select one or multiple muscles and then press Enter to make them current. Scrub along the timeline to any frame and perform an action on your current selections.
Hotkeys or Interaction
Set the muscle tension (Muscle Flex) for the currently selected muscle(s) to 1.
Set the muscle tension (Muscle Flex) for the currently selected muscle(s) to 0.
Increase or decrease the muscle tension for the currently selected muscle(s).
Set a keyframe on the muscle tension at the current time for the selected muscle(s).
You can select your muscles directly in the viewport state. This is useful when animating your muscles' flex in the viewport state using hotkeys.
You can view the activation of your muscles and their tension levels while playing back their character’s shot animation with the Display > Muscle Tension Visualizer parameter.
Stores the variable muscle flex values over time as point transforms.
The parameters found on this tab are generated automatically by detecting the
muscle_id attribute on the incoming muscle geometry. A float parameter is created for each muscle_id found in the first input to this SOP. The parameter names are labeled identically to the
muscle_id name for easy identification.
Muscles change color to indicate their amount of tension or muscle flex. You would key frame those values. You can tell it when to activate and when not to activate by key framing those values.
When you bring muscles into a simulation, the contraction is driven by a scale value being applied to the tets. And they will scale in the muscle fiber direction. So that scaling force that is being applied is driven by an attribute. Muscle flex animates that attribute so that it can apply that force.
If you use muscle tension lines, you don’t have to keyframe the tension per muscle (via muscle flex) over the entire course of the animation. The lines drive those changes in the
Muscle tension lines automates a lot of it for you and you can tweak the programmatic values by doing some keyframes on the Muscle Flex values afterwards.
If the muscle is controlled by both keyframe values and the muscle tension lines driving it and both are operating on a muscle, the value that wins out is the stronger/higher one. For example, if the tension that is detected here from the line would give you 0.5, but the keyframed muscle flex value is 0.75, the keyframed value would win out. You will always get the max value.
Muscle Flex animation can be controlled in one of two ways:
By direct keyframing of individual muscle flex parameters.
By assigning an AutoFlex Line to a muscle flex parameter.
If you don’t keyframe
muscletension, you will get floppy muscles that got for a ride in a simulation.
This SOP makes attempts to cache the
muscle_id names found on the input geometry in order to preserve any animation and parameter settings. These buttons allow updating and/or resetting of the cache in the event that the incoming geometry is altered after initial wiring has been established.
Add an new muscle_id’s found on the incoming geometry and append them to the parameter list.
Remove any muscle flex parameters listed in this parameter dialog if the corresponding muscle_id does not exist in the incoming muscle geometry.
Delete all muscle flex parameters and rebuild the internal cache list.
Pressing Reset All will destroy any existing channel animation, and any parameter values will be reset to the default value.
The Muscle Flex parameter. (Parameter name will adapt according to your input geometry). Each parameter listed here is derived from the incoming muscle_id with the same name. A value of 0 will cause a muscle to simulate as a relaxed softbody, while a value of 1.0 will maximize the muscle tension and cause it to contract and stiffen.
This toggle is enabled when the AutoFlex Lines input is wired to the third input of this node. When this toggle is enabled, the muscle flex parameter is switched to accept an id value that selects an AutoFlex Line ID.
Muscle Tension Lines
When a muscle tension line is linked to one or more muscles, a change in length is used to drive the
muscletension attribute on the muscles. Keyframing muscle tension can be used at the same time as autotensioning. The maximum of the two is applied to the resulting
In the Muscle Tension Lines tab > Activation Ratio section of the parameters, you can set the autoflex activation threshold for a given line. A change in length that amounts to this ratio will map to a fully tensed muscle. For example, if lineid autoflex2 is given a value of 0.75, and L_Bicep is linked to autoflex2, when autoflex2 reaches 75% of its rest length, the muscle tension for L_Bicep will be 1.0.
As a convenience, this SOP will apply a Point Deform to the incoming muscles using the input animation source (usually, the animated Bone Geometry) purely for contextual viewing of the
muscletension animation. The deformed animation is for reference only, as the Muscle Solver only takes the static T-Pose position into account.
It happens to do a point deform. The animation is temporary. It is only just for reference purposes. If I want to flex muscle X, i need to know where it is and what it is doing when it is about to flex. Otherwise I would be flexing my muscles on something that looks like this (shows musclemirror). Gives the flexing context?
Tension Line Training
Evaluate at Frame
This SOP will detect and cache a primitive attribute named
autoflex_id coming from the third input to this node.
These buttons help manage the cache associated with this attribute as changes may occur on the incoming muscle tension lines.
Add an new alutoflexline_id’s found on the incoming geometry and append them to the parameter list.
Remove any auto flex parameters listed in this parameter dialog if the corresponding autoflexline_id does not exist in the third input geometry.
Delete all autoflex line parameters and rebuild the internal cache list.
The AutoFlex ratio parameter. (Parameter name will adapt according to your input geometry). Each parameter listed here is derived from the incoming autoflexline_id with the same name.
This parameter value indicates the length ratio at which maximum contraction should occur. The ratio is relative to the rest length of the corresponding muscle tension line.
For example, a value of 0.5 will cause a muscle to contract whenever this line approaches a length that is half of its original rest length.
Compute Quasistatic Corrections:
Bone Capture Weights:
KineFX Rig Path:
The parameters in the Deform tab > Point Deform section' of the parameters, you can adjust the point deform parameters. For the purposes of the muscle solver, only the regions on your muscles that are designated as Muscle End regions are significant. These regions act as target constraint regions.
Muscles are deformed in this node by a Point Deform SOP so that muscle firing can be viewed “in context” with proxy animation. The animated output of this node is ignored by the solver otherwise. There is one exception to this notion however. In the Muscle Solver Vellum SOP, Muscle End Constraints have two possible modes of attaching muscles to the animation source. They can either attach to the nearest bone geometry (see the Muscle Constraint Properties SOP > Muscle to Bone tab), or the muscle ends can act more like “Pin To Animation” constraints by treating their animated positions as targets. In the latter case, the proxy animation being output by this node can be used as the animation source.
The maximum search radius for point influence. See Point Deform.
The minimum number of points to find for point influence. See Point Deform.
The maximum number of points to find for point influence. See Point Deform.
Recompute Affects Normals:
Enable Delta Mush
When on, the node tries to preserve the muscles' shape when applying the point deform. For more information, see Delta Mush.
Delta Mush Iterations
Delta Mush iterations.
Specifies where the rest pose that is used for the point deform is derived from.
Use Initialization Frame
Timeshift the animation source to the Initialization Frame and use the geometry frozen at that frame as the rest pose for the capture position.
Use the T-Pose Attribute as the rest pose for the capture position.
Specifies the frame (time) to hold or freeze the animated source geometry at and then use as the rest pose.
This parameter is only available when T-Pose is set to Use Initialization Frame.
The name of the point attribute (from this node’s second input) that specifies the rest pose for the capture position.
This parameter is only available when T-Pose is set to From Attribute.
Muscle Tension Visualizer
When on, a color visualizer is applied to the
muscletension attribute as it is animated by the Muscle Flex parameters. Grey color indicates low muscle tension and red indicates high muscle tension.
When on, the animation source geometry (second input on this node) is visible in the viewport state. This is most often the animated bone geometry.
Sets the RBG color of the Bone Geometry in the viewport state.
Solid muscle geometry.
Animation source geometry (often the animated bone geometry) and preroll.
Muscle tension lines (
Solid muscle geometry with animated