AS 3 2D Character Rigging Classes

The AS 3 rigging classes are used for skelton rigging and skinning of 2D characters. The rigging class library is organized around the development of highly specific articulated rigs. The current focus is on humaniod bipedal characters. In a 3D animation package or game engine, a bone hierarchy would normally be represented as a tree structure. In this class library, bones and chains are organized in a structure that is easier to deconstruct and understand by OOP programmers. This structure has some performance advantages, particularly when propagating FK in a 2D rig.

The current release is alpha quality, so there are still some methods under development and others that have yet to be tested. The package is suitable for deconstructing algorithms and as a general guide for your own developments in this area.

In addition to this page, check the blog for updates.

 
Singularity Package Contents (character rigging classes)

All rigging classes are in the Singularity package, which must be added to your path when building a new Flex project. The current package organization for the rigging classes is as follows,

Singularity.Rigs
  Arm - 2-link bone chain representing right or left arm in a humanoid biped.

  BaseBone - Base class encapsulating functionality common to Bones and Connectors.

  Biped - Used to create and animate humaniod biped characters.

  Bone - Represents a single bone with support for fast propagation of FK transformations in bone chains. The Bone class is optimized for linking bones together in chains.

  Chain - Manager class for a single chain of bones.

  Clavicle - 1-link connector representing right or left clavicle in a humanoid biped.

  Connector - Optimized container for multiple single-bone chains with a single input and multiple terminators. Chains or additional connectors linked forward at each terminator.

  Foot - 1-link connector representing right or left foot in a humanoid biped.

  Hand - Multi-link connector representing right or left hand in a humanoid biped.

  Head - 1-link connector representing a humanoid biped head.

  IBone - Bone interface - represents all functionality a bone must implement.

  IChain - Chain interface - represents all functionality a bone chain must implement. Chains and Connectors implement IChain and are considered interchangeable when propagating FK.

  Leg - 2-link bone chain representing right or left leg in a humanoid biped.

  Neck - 1-link connector representing the neck of a humanoid biped.

  Pelvis - Multi-link connector representing the pelvis of a humanoid biped.

  SimpleSpine - 1-link connector providing the simplest representation of a humanoid biped spine. Used for very simple (but fast) game characters.

  Template - Templates are used to skin (or draw bones) for segmented characters. Refer to SimpleSkinTest for examples.

 
Flex test programs

Test programs consist of MXML files from which you may create a new project (make sure the Singularity package is in your build path). All MXML files are contained in the Singularity\demos\Rigging folder. Some demos are designed to work with particular ranges of constraints and require modification if a solver is to be used outside specified constraints. Such modification is left as an exercise.

  BipedTest - Create a 2D Biped rig by dragging a rectangle on Stage. Select COM (Center of Mass) and move/rotate entire Biped by moving or rotating the COM.

  CCDSteps1 - Illustrate steps in RFK variant of Cyclic Coordinate Descent.

  ChainTest - Create a bone chain - auto-link a hand chain, then move the chain root or rotate individual bones - observe multi-chain FK propagation.

  IKJointLimit2Link - Simple in-plane limb IK solver with joint limits in the range [0,-pi] and [0,pi] - faster algorithm than others published in Flash resources.

  JointLimitTest - Illustrate joint limits in FK.

  SimpleSkinTest - Illustrate different methods for rendering bones using Templates.

 
Download

The Singularity AS 3 parametric curve library requires the Flash 9 player and a development environment supporting Actionscript 3. All demonstration programs were created with FlexBuilder 2. The AS 3 character rigging classes are copyrighted and licensed for personal, experimental usage. Please contact me to obtain authorization for commercial use. The download includes the entire Singularity package (which includes the parametric curve library).

Download library (.zip) here. Before running any example programs, place the Singularity package in your build path.