Gecko Character Creator Rig

Primary Program: Maya

Production Time: 4 Weeks

Team Size: Solo

Accomplishments and Techniques:

  • Used blend shapes and the Maya shape editor to create a detailed character creator rig including multiple body types, clothing options, and facial controls.

  • Created animator-friendly controls using NURBS handles and offset parent matrix widgets in the Maya attribute editor.

  • Wrote MEL scripts to connect editor controls to character blend shapes and IK/FK limb switches.

  • Used the Maya connections editor to override bone rotation values and ensure smooth character joint rotation.

Project Overview:

This is a game-ready character creator rig that I created in Maya as my final project for a rigging course at the University of Utah. This project acted as a culmination of every skill I developed during the class, including IK/FK switches, custom controls, MEL and Python drivers, blend shapes, weight painting, and the Maya node editor. The rig features a “Build-A-Gecko!” editor interface which allows users to alter various sliders in order to change the character’s body type, clothing accessories, and facial expressions. Every aspect of the rig was developed myself, with the exception of the base lizard model, which was provided by the University.

Weight Painting & Base Rig

Every step in the rigging process has the potential to affect the entire rig moving forward, and it’s essential to begin with a solid foundation. I focused on placing bones along the natural joints of the lizard mesh to ensure smooth deforomation, beginning with the right side of the body before mirroring to the left for perfect symmetry. I also made sure to snap each bone to the grid and freeze its transforms, as well as reset the bone roll. This ensured that I could begin the weight painting process with a clean rig after binding the mesh.

For weight painting, I similarly focused on executing the fundamentals as cleanly as possible. I was careful to never remove values from a vertex group, as you can’t be sure where those values will distribute to. Rather, I used an exclusively addititve process - If values needed to be removed from the sides of the chest, for example, I would paint the edges of the armpits and shoulders to more evenly distribute its weight.

Controls and Auto-Rigging

After weight painting, it was time to create some animator controls. I wanted to expeirment with scripted automation, and felt that the controls were a good chance to try it out. I wrote a simple Python script that would take a selected root bone as an argument and constrain each bone in the chain to a created Nurbs handle as an output. This script can be viewed working on a test joint chain in the below video.

While the auto-control script was a successful experiment, I resorted to manually creating controls for the vast majority of the Lizard rig due to the project complexity. I created a wide variety of custom NURBS controls using the EP curve tool that could comfortably wrap about the lizard body and immediately communicate their assigned bones. After constraining the weighted rig to these controls, I locked and hid all bone attributes and limited the control attributes, making sure that animators could only move the rig in “safe” degrees.

IK/FK Switches

I wanted to maximize the level of animator control available for this rig, and chose to create IK/FK switches for the arms and tail, allowing the user to smoothly transition from arc-based FK animations (best for walk cycles and natural movements), to point-based IK animations (best for specific interactitons). I accomplished this by first creating a base weighted skeleton. This skeleton deforms the character but is never directly controlled nor animated by the user. I then duplicated two copies of this skeleton without skin weights. One copy was kept with staneard FK controls, while I set up the other with IK controls and pole targets for the hands, feet, and tail. Finally, I deleted any non-IK related bones from the IK skeleton, as they would not be neccessary.

After the skeletons were set up, I used the hypergraph hierarchy to add orient constraints for both the IK and FK skeletons on every weighted skeleton bone - essentially, I constrained the bind skeleton’s arms, legs, and tail to follow both the IK and FK skeletons at the same time. By default this will force the bind skeleton to sit halfway between the rotation and position values of the IK and FK skeletons, but I wanted this to be overridden by a scalable value. I was able to do this by adding a custom float attribute to the root control of each limb called FK2IK, with a minimum value of 0 and a maximum value of 10.

I then used the Set Driven Key menu to establish this attribute as the driver, with the value of that limb’s IK and FK constraints as the driven. I then set the IK and FK controls to only appear if a certain value has been reached, ensuring that only one set of controls are visible at a given time. Finally, I just had to connect the value from my FK2IK control slider, and remap it’s value (originally being the slider position) to a value between 1 and 10 so that it would align with the FK2IK attributes. i repeated this process for both arms and the tail, resulting in a highly function rig that can easily transition from FK to IK controls on the fly

Blend Shapes & Shape Editor

While I rigged the character’s jaw to open and close using standard joints, I knew that I would want finer controls for the rest of the face. I decided to use blend shapes to create a variety of blendable expressions, which could then be manipulated with on-screen controls. I started by duplicating the character model and deleting everything below the neckline, before duplicating several more times. I then used the existing head geo to create 9 “altered” head models including blinks, smiles, and frowns for both halves of the face. I then used the shape editor on the “normal” head to create a variety of blendshape targets. I included half-targets as well, allowing me to blend a percentage between two head shapes across multiple targets simultaneously. For example, I could set the character to be half-smiling on the right side of their face and fully blinking on the left side of their face with horns sprouted from the back of their head.

While I was happy with the rig so far, I wasn’t satisifed with the level of customization currently available - I didn’t just want animators to move the character, but to customize their appearance as well. I used blend shapes to create three alternate body types that users could freely blend between, including “muscular”, “skinny”, and “spiky” options. Additionally, I created a full set of armor accessories that the character can wear. All of these options are split into three body segments - the head, chest, and lower body - and can be freely blended together with the facial expressions.

For example, a user could have a spikey and muscular torso without armor, skinny legs with armor, and a standard head. This required that I split the weighted character geo into 3 segments as well, but this was not a problem, as Maya maintains the weight paint data for each piece seperately and allows them to deform as usual.

It’s important to note that blendshapes cannot use additional geometry (including extrusions), and must be created only through the manipulation of geo that is already present on the base model. In order to create the various body options, I used a lattice modifier, which allowed me to smoothly enlarge or shrink already present geo for unique proportions.

Once all the blendshapes were in in place, it was time to wire them up to the on-screen controls. These controls were just simple NURBS shapes that I constrained to sit within narrow boxes and only move on the vertical axis. I wrote a MEL script, featured below, that takes each blendshape from the shape editor and sets its value to the corresponding NURB handle position.

I copied this process for the armor pieces, which had to be separate meshes from the rest of the blendshapes, as they use extruded geometry. Each armor piece has its own skinny, spikey, and muscular blendshapes so that it can deform with the rest of the body. I used the node editor to connect NURB sliders to the armor mesh visibility so that each piece can be easily toggled on or off.

Offset Parent Matrix

One problem when rigging in Maya is that I want my controls to be at clean zero values for rotation and tranlsation. This ensures that a rig can be “zeroed out” back to its neutral pose , and makes the animator’s job much easier. The “freeze transformation” tool can’t be utilized here because it will reset the control’s orientations when zeroing out its values.

Previously, my technique for keeping controls at zero was to parent every control handle to a null parent object. However, this is a messy solution that adds considerable bloat to the hierarchy when working with complex rigs.

For this project, I experimented with a new solution using the offset parent matrix. With this feature, I was able to copy a control’s orienation/position and paste them into an offset matrix in the control’s attribute editor. This allowed me to achieve clean zeroed-out values for my controls without the need of null parents.

Determined to further reduce hierarchy bloat, I used the offset parent matrix in conjunction with the node editor to drive the character’s tail bones directly from the controls, eliminating the need for constraints. I accomplished this by connecting the world matrix value of each control into the offset parent matrix value of its preceding bone, then resetting the bone’s joint orient values.

However, this still produces an unwanted offset, as the world matrix value accounts for its parent values as well. I solved this in the node editor by plugging both the current control and its parent control world matrix values into a multi-matrix node. This allowed me to subtract the parent matrix values before plugging it into the next control. While this this may appear complicated, it proved a great solution for eliminating hierarchy bloat and moving the complex network to a node editor that animators are less likely to accidentally alter. The below image displays a snippet of the parent matrix offset process within the node editor.

Credit to antCGi on Youtube for discovering this technique!

Wrapping Up:

This project was certainly a challenge to complete, with lots of complex pieces that needed to work smoothly with one another. However, I am immensely happy with how the final rig turned out! I was able to both polish my foundational rigging skills such as weight painting and skeleton creation, as well as learn many valuable new techniques, like creating auto-controller MEL scripts, wiring up IK/FK switches with the set driven key menu, and keeping my control values clean with the offset parent matrix.

I’m eager to use the skills developed here to create more complex and efficient rigs for myself and peers when working on future game projects!


The gecko character creator rig can be downloaded here.

Previous
Previous

Raymarching Fog Environment

Next
Next

Painterly Urban Environment