Maya Embedded Language – Feather Rigging Script

autodesk maya 2011 logoEvery so often I come across a technical rigger’s demo reel which includes a scripted wing/feather rig in Autodesk Maya. These are usually very impressive or downright mediocre (mostly the latter). Thus it has always been a goal of mine to create a high-quality feather rig. Such a complicated setup will obviously require a considerable amount of MEL scripting (Maya’s embedded language- or M.E.L.). The code I have written is by no means finished but, the most difficult pieces are done. At the moment the rig works best in two dimensions. There are a few more problems to work out in order to give it the necessary depth- as well as two or three major technical hurdles that are left over. But otherwise it’s coming along nicely. Below are some images of my proof of concept.

The construction process goes like this. First the script takes a bare skeleton of joints and identifies the bones and pinions according to their names.

Next it plots bezier curves between the pinions and generates a line of bones along this curve which will eventually drive its own feather. A separate curve is created between the tips and bases of the pinions for a more organic layout.

Then, the script applies rotation constraints to each of these new bones and sets the influence of the constraint according to the bone’s distance from each pinion. This causes feathers to mimic the rotation of pinions that are close to them more than pinions that are far away.

After this, simple subdivision planes (thus far) are created and attached to each new feather-bone. In future, these planes may contain an alpha mapped texture of a feather. Or perhaps I will replace the planes with actual high-poly feather models.

This  whole process is repeated for each group of feathers on the wing. These groups would be •primaries, •secondaries, and •tertiaries, duplicated across the three layers of the wing- one atop another. That makes nine repetitions of the script altogether.

Click on the thumbnails below for a better view.

This project has been excellent practice for me. Maya’s embedded language bears a striking resemblance to C/C++. It has been one of my main outlets in that area. It has also been my main route for learning how to use Maya. I almost find it easier to search through Maya’s API reference page to find out how to do something, rather than click random buttons in the UI. I am also intrigued by the new Python API for Maya. I’m excited to explore this as I’m much more familiar with Python (my native tongue).

Advertisements
  1. No comments yet.
  1. June 1, 2011 at 10:30 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: