XSI.FIE.US

FIE Muscle System

Introduction

 

 

This is my attempt at a practical muscle system for character rigging. Its not going to be the most feature-full muscle system on the planet. It may not end up being the fastest either. But it should work and allow for as much "rigging on top" as possible, while keeping the workload of muscle system generation down to a minimum.

I produced a short 2 minute video snippet showing off the muscle system addon for my Demo Reel. This is a web version of it. It is not meant to teach someone how to use the muscle system. Its meant to show it off. However it may be worth watching to get an idea of what the muscle system is like to work with.

 

Install Instructions:

drop the addon into your XSI window like any other add on.

Usage Instructions:

Creating Muscles

you will find a new toolbar called "FIE Muscle System" under Application->Toolbars. Open it and keep it handy.

Create some hierarchical geometry (like a jaw parented to a skull parented to a vertebra parented to a vertebra parented to a vertebra).

Draw a cubic curve by knots. Use face snapping to place the first point on one bone. Use face snapping again to place the second point on another bone. Close out the tool.

Grab the two verticies in the middle of the curve and move them to bow out the muscle as you see fit. Remember, muscles are simple creatures. They pull and relax in one direction. They normally would be straight running were it not for bones, organs and other muscles bowing them out a bit in most circumstances.

Hit the "Crt Musc Frm Crv" button in the "FIE Muscle System" toolbar.

You will enter a pick session looking for a curve. Click on the curve you just created.

It will build a muscle in place on top of the curve.

It will then select one of the tendons (nulls for attaching the end of the muscle) and enter a pick session. Pick the object to which the tendon should be attached. Usually the bone you drew that end of the curve on will do. It will constrain the tendon.

It will then select the other tendon and enter a pick session. Pick the object to which the tendon should be attached. Usually the bone you drew that end of the curve on will do. It will constrain the tendon.

It will hide the tendons and close out the command.

You will be left with a muscle mesh and a belly null visible. The belly null has its position and orientation constrained. However its scale is not constrained. This is the animation belly null. It is used to animate the muscle's belly. If you wish to You may scale it up to scale the belly of the muscle as you wish. Though, please note there is a difference between animation and modeling of the muscle. If you do not respect this difference, then using some deformers (such as the cage deform) with your muscle system may backfire. You may also wish to link the belly's scale with the orientation of a bone to make it flex in a special way over time.

MuscleParameters

There is a parameter set under the mesh called "MuscleParameters". This parameter set will contain convenience controls for the muscle. Descriptions of the parameters follow:

BellyOrientBlend

this controls the influence the tendons' orientation has on the belly's orientation. At 0, the first tendon has full influence. At the default of 0.5, both tendons influence the orientation equally. At 1.0, the second tendon has full influence.

This is useful on the thigh for example, where the belly can be thrown out of whack easily by the tendon attached to the shin, when the knee rotates. Adjusting the balance to favor the tendon on the thigh, heavily, fixes the problem.

FirstTendonScale, SecondTendonScale, and BellyScale

Use these parameters to model the size of the muscle. DO NOT use them to animate the muscle unless you know exactly what you are doing. There are two sets of nulls on the muscle that control its size. One set for modeling and one set for animation. These controls are for modeling.

FirstTendonPull, SecondTendonPull

WARNING: these controls are somewhat messed up. Due to what seems to be a bug in XSI, adjusting these parameters by hand will result in errant behavior. However, animating them will not. They are here so that they can be hooked up to something else. For example: my orientation driven muscle flexing operator connects to these parameters and works quite well. Also, it is my hope that future versions of XSI will fix this apparent bug, in which case adjusting these parameters will work fine. Of course, if someone is able to explain to me why this is happening, and is not an XSI bug, I'd very much like to know. e-mail me.

Use these parameters to pull the muscle belly toward one tendon or another. These are animation parameters. Not modeling parameters. At 0.0, the belly sits in the middle unaffected. At 0.5, the belly is pulled half way to the given tendon. At 1.0 the belly sits on top of the given tendon.

Pops and Flips

When you're working with constraints and nulls and all that jazz, there are always annoying pops and flips to deal with. Its inherent to the dilemma of euler angles and quaternion angles and Slerps and how to deal with them. Bottom line: no way to get rid of pops and flips completely. You just have to manage them. What I've done in this case is made sure there is one single pop/flip. And I've placed it in the one place it should not be a problem. If you rotate the object to which one of the tendons is attached exactly 180 degrees from its bind orientation, the muscle will flip. But really, what is the muscle supposed to do in that orientation anyway? Turn inside out?

In the extremely unlikely situation someone manages to find a situation in which the 180 degree flip is a problem, try setting the belly orientation blend to full 1.0 or 0.0. In these configurations, there is no pop at all because the belly null slaves completely to the given tendon. Or, for that one crazy muscle, you can use your own custom solution rather than the generic muscle system. Nothing wrong with that.

Flexing Muscles

As stated above, the scale of the belly, and the belly pulls are left free for the rigger to use however they wish. That said, FIE Muscle System does include a solution for flexing muscles if the rigger chooses to use it. Its not necessarily the best solution. Its just a solution.

Orientation Driven Muscle Flexing Operator

The orientation driven muscle flexing operator scales the muscle belly, and pulls it toward a givne tendon, based on the orientation of a chosen target object. Both scaling and pulling can be turned off independantly if desired.

Note: this is not necessarily an accurate simulation of when muscles flex. Real muscle flexes drive the momentum of bones. Bone orientations do not drive the flexing of the muscles.

Also note there is a difference in flexing behavior as a leg swings due to gravity, and as a leg swings due to muscle flexing.

The Orientation Driven Muscle Flexing Operator does not address either of these issues. That said, its still pretty cool and does a pretty good job.

Given: a leg consisting of a thigh bone and a shin bone, with a muscle extending from the top rear of the thigh, to the top rear of the shin.

The user wants the thigh muscle to flex as the knee bends. Therefore, the Orientation Driven Muscle Flexing Operator would be applied to the muscle and driven by the orientation of the shin bone.

Bend the shin up as far as it can physically go within reason (into a mule kick position).

Open the FIE Muscle System Toolbar. Click the "Aply Ori Musc Flx" button.

You will enter a pick session looking for a muscle. Click on the mesh of the muscle.

You will enter a pick session looking for a target object. Click on the shin bone.

The op will be applied and a second set of custom parameters will be added to the muscle mesh. It is called "OrientationFlexorProperties"

  1. targetX,Y,Z - the target orientation of the target object. This is the orientation at which the muscle will be fully flexed. It is automatically set to the target's orientation at the time the op was applied. It can be manually adjusted however.
  2. falloffAttenuation - The distance around the rotation sphere the falloff continues. At 1, the falloff continues all the way around to the opposite pole. At .5 it only continues around half way.
  3. falloffInterpolationPower - The type of interpolation applied to the falloff. 1 is linear. 3 is cubic, nice and smooth, the default.
  4. baseScale - The base scale of the muscle. It will never be smaller than this scale.
  5. orientationScaleFactor - The amount the muscle is scaled up as it approaches the target orientation. If the base scale is 2, the orientation scale factor is .5 and the target object is at the target orientation, the resulting scale of the belly will be 2 + (2*.5), or 3. Set this to 0.0 to disable belly scaling on flex.
  6. pullToFirstTendon, pullToSecondTendon - Enables or disables the operator's effect on the belly pull in each direction. In most cases, you will only turn on one. Leave them both off to disable belly pulling altogether.
  7. pullAmmount - The ammount to pull toward the given tendons. At 0.0, the belly does not pull. At 0.5, its pulled half way to the given tendon. At 1.0, the belly is pulled directly on top of the given tendon.

The best way to set these values is to move the joint around into various extreme and middle positions and tweak them to one's liking. Don't forget the BellyOrientBlend on the muscle paramters can be very important to a good flex even though its not part of the flexor's parameters.


Putting a skin on top:

For now, a comprehensive guide to this is beyond the scope of this addon. There are a few ways to approach this however.

The simplest way is to envelope as usual, using the tendon and belly nulls as deformers along with the bones. This is not necessarily the best way. Its just the simplest. Though the results should be good.

A second, and more complex way to approach this is to use the cage deformer.

When using the cage deformer on a muscle system it is VERY IMPORTANT that the rigger respect the difference between modeling and animation on the muscles. The muscle's size at the bind pose must be defined by the modeling nulls through the FirstTendonScale, SecondTendonScale, and BellyScale parameters on the custom parameter set on the muscle mesh. Understand, the cage deformer will look at the difference between the modeling state and the animation state of the mesh, in order to apply its deformation. So, if you have animation on your belly null, the skin mesh will pop to adjust to the animation upon applying the cage deformer. This is fine as long as the modeling size of the muscle and the current animated size both make sense relative to each other.

Also, its VERY IMPORTANT that the muscle be created in place in the bind pose. If you repose your muscle system and then try and apply a cage deform in the new pose, you'll find the muscles are weighted in their original modeled position, not in their posed position

A third and even more complex way to appraoch this is to use syflex.

Grab all the muscle meshes and bone meshes. merge them with a tolerance of 0. Hide the originals. Don't freeze the new mesh. It should animate along with the rig even though its a separate object thats not bound to it.

Turn your skin into sycloth. Apply a sypin from the cloth to the new musculature mesh.

To try and simulate a fat layer, play with the stiffness and distance settings on the sypin.

WARNING: in most versions of syflex for XSI, the sypin has a very long initialization time. On my latest model it took 45 minutes to initialize after I used the command. To make matters worse, it does not cache its init data in the scene. So, every time you load the scene, it takes another 45 minutes to reinit. This can be very annoying but syflex can also be rewarding since its similar to a flesh simulation. The simulation steps themselves are often quite fast. The same model had skin sim steps of less than 2 seconds.

Change Log:

Since Version 0.6

  1. Fixed a bug in which the Flexor wasn't applied with the correct target angle. Sorry this one took so long. I fixed it at my school computer labs where I have such a restrictive firewall up that I can't update this site. So it took a while to get it uploaded.

Since Version 0.5

  1. Fixed a bug in which the muscle creation command was changing the subdivision values for the global geometry approximation instead of creating a local copy first. (woops!)
  2. Changed the MuscleParameters custom property set from being created from scratch at muscle creation time, to a installable custom property set with its own spdl.
  3. Added an installable custom property set based on an spdl for the OrientationFlexorParameters.
  4. Changed the generation of custom properties for the orientaion dirven flexor op from adding them to the MuscleParameters, to linking to the new custom property set.
  5. Added constraints for belly pulls.
  6. Added some workaround bugfix code to deal with belly pulls not functioning correctly due to what appears to be an XSI bug. This includes a one time forced manual update during creation. This also includes adding a single keyframe to the animation tendons at frame one during creation.
  7. Added support for belly pulling to the orientation driven muscle flexor op. This includes two new output connections and three new variables.

Since Version 0.4

  1. Fixed a bug in which the flexor was connected to the modeling belly null instead of the animation null. This resulted in flexes not being registered in cage deformation based binding.

Since Version 0.3

  1. Fixed a bug in which the flexor might not be applied accross models.
  2. Fixed a bug in which the cage deformer would never work correctly with muscles.
  3. Separated the muscle's modeling state from the animation state by adding multiple tendons and bellies at different points in the stack., in order to fix the above bug.

Since Version 0.2

  1. Added custom parameter set to muscle mesh to hold controls
  2. Added a control for blending the influence of the tendon's orientation on the muscle belly's orientation. This way, the belly can be set to favor one tendon's orientation over the other's. This is useful on the thigh for example, where the belly can be thrown out of whack easily by the tendon attached to the shin, when the knee rotates. Adjusting the balance to favor the tendon on the thigh, heavily, fixes the problem.
  3. Added a scripted op to control the belly's scale (flexing the muscle) by another object's orientation.
  4. Added a command to apply the orientation driven muscle flexor operator.

Since Version 0.1

  1. Changed belly position bind to respect orientation of tendons.
  2. Changed apply order of belly constraints to orientation first, to avoid late calculation.

Downloads:

Current Version

Version 0.7

Version 0.6

Version 0.5

Version 0.4

Version 0.3

Version 0.2

Version 0.1

©2004 Brad Friedman