XTRA!
    Character Animation & Rigging
    Using Maestro to auto-rig then animate your character for LightWave

BY BRIAN PACE

Greetings! My name is Brian Pace, and I work at Stillwater Pictures located in Santa Maria, Ca. We recently released a plug-in called Maestro for LightWave that improves the workflow of rigging and animating characters. In this article, I'll show you how Maestro works and how it can make animating a fun and easy process.


Maestro: Character Animation and Rigging Plug-in for Lightwave

Rigging Multiple Characters

In order to understand Maestro, it helps to know the reasons for its development. We are working on a movie with several characters in it, and continually upgrading the rig and propagating it to the other characters can be a real time-sink. If we add a feature to Character A, and five expressions need changing, then those five expressions also need changing on Characters B, C, and D. We modify each expression, then test it, and then save properly so that the next revision doesn't cause us to lose changes. Then, if a new Character (like an extra) comes along, we install ALL of the features of the rig into that character. LightWave has quite a few tools to help with this problem, but a great deal of time is lost doing this.

This is the problem that kicked off Maestro's conception. We needed a way of automating the rigging process. For this to work the way we needed, it had to be easy to customize the rig. LScript Commander really inspired us. Not only are the commands simple, but LScript Commander also lets you see how to make those changes as you work on it. It was a great start, but a couple of problems quickly surfaced. The first was that there really aren't any variables when using LScript Commander. This was a huge speed bump in rapidly deploying up-to-date rigs to all the characters.

The second problem that arose was that LScript Commander either didn't have a command we needed, or the command that we needed required too many steps to create. For example, we wanted to apply ItemShape to some of the control Nulls. Unfortunately, you cannot set up ItemShape through LScript Commander. We needed a little assistance from LScript to make that possible. In the end, LScript Commander got us about 90% of the way there, but we still needed a little extra to make it work for us. So, we developed our own LS Macro interpreter and we put in some commands of our own to fill in that extra 10%. Since we had developed our own interpreter, we were also able to solve the problem of applying this rig automatically to a number of characters.

So what does all this mean for Maestro? Maestro comes with a rig that we've been developing for over two years. However, you are not limited to using that rig. If you have ever used LScript Commander before, you're qualified to modify the Maestro rig file or even develop your own! Best of all, the rigging tools are set up so that you can make one script file work with just about any model.


Sample of Maestro's Auto-Rigging script. Notice how similar it is to LScript Commander?

How to use Maestro's Rig With Your Character

We developed Maestro's auto rigger so that a minimum amount of work is required when applying it to an existing character. What that means is that taking your existing models and applying Maestro's rig to them is easy and doesn't require many steps.

  1. Load up your object file and flatten it down to one layer.

  2. Import your flattened character file...

  3. Maestro comes with a file called 'skeleton-biped.lwo' in its Content Folder. (Note: Don't confuse this with LightWave's content folder.) Copy and paste this into the second layer. We configured the rigging file that comes with Maestro around the names of these bones. It also minimizes the need for complex weight maps; which is why there are few hold bones there.

  4. Take Maestro's skeleton and place it in the background of your character.

  5. If you haven't already done so, try posing your character in a similar fashion to the skeleton. (I.e. arms out instead of down.) We recommend this because if the arms are down, there's a risk that the bank angle of the bones will be wrong. However, tools like RotateSkelegons can be quite useful in correcting this problem. This would be a good place to mention that these Skelegons aren't all that special. They do have a specific name, but that is all that triggers the rigging script. This means you can use just about any Skelegon-related tools. You can even assign weight maps if you like.
  6. While the need for weightmaps are limited with this rig, one area you will most likely need to use them on is the eyes. If you create one for each eye ('reye' for the right, and 'leye' for the left) then you should be good to go.

  7. The only weight maps that are absolutely necessary with Maestro's rigs are one for each eye.

  8. Select the Skelegon layer and have the model layer in the background. Move the Skelegons to fit the proportions of the model. The more you know about how Skelegons work, the easier and quicker this task gets. The nice thing is once you're done, there is very little left to do. (Note: The skeleton that comes with Maestro works with Symmetry mode on. In most cases, this is advantageous in making this process go more quickly.)

  9. Simply drag the skelegons into place so that they match the proportions of your character.

  10. Once you've moved the Skelegons, cut and paste the skelegons into your character model. Once you are done, you should have a single-layer object. Now that you're done in Modeler, send it off to Layout.

  11. Before importing into Layout, make sure that the Skelegons are in the same layer as your character.

  12. Once your character is in Layout, launch the Maestro Controller. By default, the rigging window will come up. You can now choose from different rigging options, including the default biped and quadruped rigs, the facial rig, wings, tails, and the component biped option (for rigging individual biped parts, like just the arms, etc.)


Select Maestro Controller from the Master Plugins list.

Hit the appropriate rigging button, and let it go. In about 20 seconds, your character is rigged. You'll notice, though, that your rigging panel has changed. Not only did Maestro rig your character, but it also loaded up a control panel intended to make all the various features of the rig become available in a nice intuitive interface.

Controlling your Character

Before I begin this next phase of the tutorial, I would like to explain a little bit of how the control panel concept in Maestro came about. Animating an object in LightWave typically involves three steps:

  1. Select the item to move.
  2. Select the operation to perform (Move, Rotate, Scale, etc...).
  3. Click and drag to perform that operation.

When you have a fully rigged character in a scene, you'll use up a lot of time with this process. The list of items to control in the scene can be very long and difficult to choose from. Left Click to Select helps, but sometimes you select the wrong item and have to orient the view to make your particular item visible. Often the tool you wish to select isn't what is active. Even if it is, you end up having to check just to be sure.

We simplified this process down to one step: 1. Drag on an appropriate hotspot. We created Maestro's Controller mode to act as an intuitive and easily configurable remote control for characters in LightWave. First, a background image representing the character is loaded. Next, hotspots representing various controllable aspects of the character are drawn on top of that image, and then configured for their task. The hotspot knows what to select and what its job is, as opposed to having to establish that on every pose operation. You save significant amount of time, with the added benefit being that the operation of the character is more intuitive.


Clicking and dragging a hotspot moves the corresponding part of the body.

Once you've rigged your character, a new panel is available. Click on the hotspot indicated in the image and drag left and right. Notice your character's head is shaking? Try up and down. Now his head is nodding. Now, use the Right Mouse Button and move left and right again. Now he's tilting his head. So what's happening here? These hotspots are very much like sliders. Their key difference is that they're two-dimensional instead of one, so they're measuring up/down as well as left/right. Right-clicking activates an entirely different pair of channels. In this case, we made the right-click into an alternative mode. If you use the Middle Mouse Button, the channels reset based on a value defined in the hotspot.


Clicking and dragging left/right inside of a hotspot moves one channel,
clicking and dragging up and down moves a seperate channel.

Features of the Rigs

Maestro comes with rigs that are quite advanced, providing a balance between complex automation and easy control over every element of the character.

Legs: The default rig uses the standard three-point foot setup, so you can pivot on the toe, ball, or heel. There is a hotspot in the controller that allows you to both lift the heel and point the knee easily. There is also an option to just have one goal at the ball of the foot instead of the three pivot points. This option doesn't offer as much control, but is easier to use in situations where you don't need all those pivot points.

Hips and spine: This is perhaps the most advanced part of the rig. Hip centering can be keyframed on and off, and can even be set at varying strengths in between. There are controls to move and twist the hips independent of the torso (like the Isner spine concept), and you can bend the torso over the length of the spine as well as isolating the shoulder area. There's also a unique controller that rocks the hips side-to-side, pivoting on each hip joint. This control is great for easily incorporating hip sway into a female walk cycle.

Arms: The default rig uses IK for the arms, but has a parenting scheme that makes them move more like FK. This gives you the ease of IK when moving the goals around, without the popping and snapping problems that usually go with IK arms. Hand pinning basically turns off this parenting effect so the arms work more like standard IK, and like hip centering, can be keyframed on and off and can be set to varying strengths in between. There is also a hotspot that allows you to rotate the wrist and point the elbow, as well as rotate the hand at the wrist. Additionally, there is a hotspot that controls the shoulder, both up and down, and forward and backwards. While this IK arm solution offers the best of both worlds, there is an FK arm component available if you really need it.

Head and neck: There are controls that allow you to translate and rotate the head. Additionally, you can point the eyes independently, as well as rotate the head while keeping the eyes fixed. This last one is great for making really expressive dialogue, without having to worry about keeping your character looking at whomever they are talking to.

Hands: There are really nice global controls for making a fist and spreading the fingers, as well as controllers for each finger, so you can precisely shape the hand. The thumb is IK, so it is easy to position by simply moving its goal.

Creating your own Hotspots

One of Maestro's biggest strengths is that it is very customizable. It allows you to easily create new controls and store them with the scene file. To show you just how easy this is, I'm going to take you through the process of creating three different types of hotspots.

Tool Hotspot

I'm going to start with a basic hotspot. We call it the 'Tool Hotspot' because it behaves very similarly to Layout's Move, Rotate, or Scale tool. We're going to use it to rotate the light in the scene with your character.

In the lower left, there's a button labeled "Edit." This puts Maestro into Edit Mode. From this mode you can create, move, resize, or delete hotspots. Click on 'Tool' to light it up. Pick an open area on the image of the man and drag to create a box. We made this tool with the idea that one might want to draw a bunch of hotspots first before defining their properties. So, if you wanted, you could draw another box right here. However, that is not necessary for this tutorial.


After clicking on 'Tool', click and drag starting from
the upper left to the lower right to draw your hotspot.

On the right, there's a button labeled "Hotspot"; click it to open its properties. Here you'll see all the properties available for this hotspot. The first thing we want to do is pick an item to modify. Since we've decided that should be the light, simply scroll down until you see it. (Or uncheck Meshes and Cameras; that'll leave the light remaining.)

Just to the right of the list of items in the scene it says LMB. This is the Item that the Left Mouse Button will control. Next to it, it says "Get Object." Click on "Get Object." Notice how 'Light' appears in that field? That button grabs the selection from the Item List on the left and sucks it in to the appropriate field. You could do the same for RMB, if you like, and that will yield a different behavior when that button is used.


Maestro makes it easy to select particular items to control.

Select 'Rotate' from Move/Rotate/Scale, since we're going to rotate the light with this tool.


With a Tool hotspot, you can Move, Rotate, or Scale an
item depending on mouse-movement within the hotspot.

We could define more options here, but for the purposes of this tutorial, we'll keep it this simple. Maestro has some pretty good initial defaults to prevent each hotspot from needing a lot of information.

Press [OK] to leave the properties panel, then click on the 'Run' button to put Maestro into Run mode.

Once you're in Run mode, click and drag on the hotspot. See how the light starts turning? See how quick it was to set up that little control? Now when changing the direction of that light, you don't have to select it or change to the Rotate tool. It's already there and ready.


Clicking and dragging inside the hotspot causes the light to rotate.

Channel Hotspot

The Tool Hotspot is great for rotating, moving, or scaling items in a scene just like you normally would with the Move, Rotate, or Scale tool. A Channel hotspot operates directly on a specific channel. It works very much like modifying individual channels from within Graph Editor. There are two very distinct advantages to using this type of hotspot:

With one hotspot, you can control two different items. They don't even have to be the same type of item. Left and right can move a Light, while up and down can rotate a Camera.

You can access other channels of an item such as the intensity of a light, which is exactly what we're going to do next in this tutorial. 3.

  1. Before creating the hotspot, make sure you enable the envelope for the light intensity. To do this, select the light, then click on the properties button. Once there, click on the [E] next to Intensity. (Note: Intensity will NOT show up if the [E] button isn't lit up.)

  2. Envelopes have to be available for Maestro to create hotspots that connect to them.

  3. Go into Edit mode just like with the Tool hotspot, and select Channel. Create the hotspot so that it partially overlaps the Tool hotspot we created earlier. (See image.)

  4. When hotspots overlap like this, they can
    both be executed with one click and drag.

  5. Click on "Hotspot" to enter that hotspot's properties. Make sure to select 'Light' like we did with the Tool hotspot.
  6. See the channel list at the bottom that just appeared? Scroll all the way down and select Intensity.

  7. When you select an Item, all its available channels appear right below it.
    Once you have selected the one you want, click 'Get Channel...' to assign it to that mouse movement.

  8. See the field that says "LMB H:"? Click on "Get Channel ..." next to it. You'll see "Light.Intensity" just appeared. You can enter channels in this field just like you can with expressions in Graph Editor. (No brackets, of course.) So, for example, if you say "Null.Rotation.H," the heading of the Null changes when using that hotspot.
  9. Press Okay and go back into Run mode.
  10. Click on the area that doesn't overlap with the other hotspot and drag left and right. Notice how the light gets dimmer and brighter? That's because with the mouse, we're adding and subtracting from the value of Light.Intensity.
  11. Repeat the previous step, only this time click inside the area that overlaps with the other hotspot. Now you're controlling the rotation of the light and the intensity of the light at the same time!


If you click and drag inside an overlapping area of two hotspots,
they both activate. Notice that the light is rotating and the intensity is getting raised.

Maestro's support of overlapping hotspots is quite innovative. One of the important design choices we made during development was that you could manually override anything automated. Overlapping hotspots provide a unique solution to this particular problem. One of the examples we like to use is eyeball control. You could, for example, create two hotspots, one to each eyeball. If the hotspots overlapped in the middle, then you could click on one hotspot to move just the left eyeball, then click on the right to control just the right eyeball, and clicking in the middle rotates them both. With only one mouse-movement, any of these three things can happen.


Here we have to hotspots that are overlapping in the middle. One controls the left eye, the other
controls the right eye. When clicking and dragging on the overlapping spot, they both turn. This reflects
our philosophy of automating as much as possible while still providing simple forms of manual control.

Command Hotspots

A command hotspot is simply a hotspot that runs a command like you'd find in LScript Commander. This provides direct access to a lot of the features provided in Layout. For this tutorial, we'll set up two command hotspots. The first will turn on Camera Targeting, and the second will turn off Camera Targeting.

  1. Go to your Master Plug-ins panel and load LScript Commander. Keep it open so you can watch what happens as you make these settings.
  2. Select the Camera, press 'm' to get to the Motion Options, and set the Camera to target your character.
  3. Just for fun, go to the Heading Controller and Bank Controller, and set those to Keyframes. Then, set them back to Point at Target. See what happens in LScript Commander? The command "PController 0" comes up when changing the Pitch Controller to Keyframes. PController 1 sets the Pitch Controller to Point at Target. (Note: The point of this exercise is to show you how you can use LScript Commander to find out what you need to know when creating commands. Any time you want to automate a task in Layout, watching what LScript Commander does is often invaluable.)
  4. Create two Command hotspots. The left one will be the one for turning Targeting on, and the other will be for turning it off. With the left hotspot selected, click on "Hotspot" for properties.

  5. When LScript Commander is active, most of what you do in Layout is recorded and
    can be executed like a Macro. Maestro allows you to tie these commands into a hotspot.

  6. This hotspot turns targeting on, which means we want the Heading and Pitch controllers set to 1. First, though, we want to select the Camera. So start by typing in:??SelectByName Camera?? If we just stopped right here, then this hotspot would always select Camera. However, we want to take a few more steps. (Note: Notice the capitalization of the command. It is important that you use the same caps for the command as in LScript Commander. Selectbyname will not work, nor will SelectbyName. SelectByName is the only command that will work because that is how it is defined in LScript Commander.)
  7. For each command you entered, you need a semi-colon to let Maestro know that these are separate commands and not one big long one. Add "HController 1" and "PController 1." The final syntax should look like this:??SelecByNameCamera; HController 1; PController 1; Redraw? (Note: Please pay careful attention to where the semi-colons here are. If they're missing, running this hotspot will cause an error.) ??(Note: Redraw forces Layout to update the screen. We use this because if AutoKey were off, for example, then this example would not appear to work.)

  8. This Command will enable 'Point at Target' on the Camera.

  9. Press [Ok] to exit, then select the right hotspot and click "Hotspot" for properties.?
  10. Copy and paste the previous command into this one, only turn the 1s into 0s. So the final command should be:??SelectByName Camera; HController 0; PController 0; Redraw?

  11. And this Command will disable 'Point at Target' by switching it to 'Keyframes' mode. Lots of functions
    in a scene can be automated through this process. Activation is as simple as clicking on a hotspot.

  12. Press [OK], go into Run mode, and you're ready to go! Click on the "Targeting Off" hotspot and move the Camera around. Now it moves, but doesn't turn. Press the "Targeting On" hotspot and now the camera will continue facing the object. Pretty cool, huh?

So how is this useful? With the rig you're using now, there is a hotspot for changing the subdivision level. Traditionally, to do this, you'd have to select the mesh object, click on the properties button, then alter the settings in the panel. This isn't a huge chore, but if there is a lot going on, it's a slow process. The hotspot goes straight to the point; it only takes one click. You can even use text files for more common scripts. This allows you to use longer scripts and even make them reusable. Actually, this is the foundation for how the rigging system works! The same process used in making these two hotspots is virtually the same procedure used to make your own rigging file.

Conclusion

Maestro is a very powerful tool that makes the job of rigging and animating much smoother and easier, but ultimately, its usefulness goes far beyond the boundaries of character animation. You can use it to automate and control virtually any aspect of LightWave. From creating your own camera or light control panels, to hooking up complex mechanical structures to easy-to-access sliders, Maestro gives you the ability to customize your workflow in ways never before possible.

Maestro is available for $150 US. For more information, or to download a demo version, go to:

http://www.stillwaterpictures.com/maestro

Brian Pace started his career as a 3D artist in 1996 where he worked as a broadcast animator. In 1997, he moved out to Portland, OR where he worked at a software company for 7 years. While there, he created demo content and illustrations for software that created panoramic images. In 2004, he went to work for Stillwater Pictures in Santa Maria, Ca. There, he has put his programming skills to good use working on Maestro, a character animatoin and rigging tool for LightWave.

©DMG Publishing 2005 as bonus content from Issue 5 of HDRI 3D, ISSN 1551-689X