Friday, 29 April 2011

Rigging Anna

RRRRRRIGGING!



Does it look hard?! That’s because IT IS!

As my friend Sean said, it’s the rocket science of CG.

(Sorry, misquote. What he actually said was, “CG is the rocket science of art.” Just thought I’d set the record straight)

Entering the most technical aspect of an already technical art form.

Deep breath.

Here we go.

So what is rigging?

Well my dears, simply put rigging is when you give a 3D model the means to be mobile.

Defining it was easy. Doing it certainly isn’t.

So where to start? Well some of you might have noticed that I’m not in Maya anymore. Instead I have entered the realm of Softimage. This is because our Softimage teacher, Mr. Adam Sale, is also a fantastic rigger.

My plan for making Porcelain is to model and texture in Maya and to rig and animate in Softimage. Using a method call point cashing I can take the animation of a model in Softimage and assign it to an identical model in Maya. 

Needing identical models is going to come into play later, as it will cause me some grief down the road.

What I knew going into rigging was this:
All those “Good luck with the hair and dress” comments were mostly referring to the rigging phase.

So rigging! (or singing)
Toe bone connected to your foot bone
Foot bone connected to your ankle bone
Ankle connected to your leg bone.
Dem bones, dem bones, dem dry bones.
Dem bones, dem bones, dem dry bones.
Dem bones, dem bones, dem dry bones.
Now hear the word of the Lord.

That’s right, if you can sing this song, you too are a rigger. (I’m lying)

The first step of rigging Anna was constructing her skeleton. Remember back in the modeling post when I said that the edge flow or topology of a model would be important later? Well guess what, it’s important NOW!
When building the skeleton, the bones are placed in accordance to edge flow.

Al so I should mention that you don’t exactly just make bones, you make something called a 2D chain.  2D chains start with a root, then you have your bone or bones (you can have as many bones as you want in a chain) and you end with an effector.

NAME EVERYTHING! You end up with a lot of stuff going on in rigging. Proper naming and organizational skills are so important. Otherwise you’ll end up drowning in arbitrarily numbered bones, roots, effectors and nulls.

Once you got all dem bones in place you start creating a hierarchy so the
Shoulder bone will move the Arm bone
Arm bone will move the wrist bone
Wrist bone will move the finger bone

hierarchy


That’s the easy part.
How our body moves, unfortunately, is far too complex to be emulated by just layering in a couple of bones.

So
 Adding squash and stretch to the spine!

Squash


Stretch


Arm twist! Rotate your wrist. Does it pinch up like when you twist a ribbon? No? Well that’s what this is for.


Foot roll!


BOOM!

And I’m done. That’s all the tricks I got.

Enter the amazing Mr. Adam Sale.
(Applause)

Time to deal with the dress and the hair.

Bah! The hair! Do you remember what a pain it was to model? How horrid the UVs were? How the texturing has already taken several days and it’s still not working?

Now it’s time to rig it, the hardest part right?
Wrong?!

Here hair, have a lattice.
The box on her head is a lattice


DONE! (Not really, there was actually a bunch more steps, but in case you haven’t noticed I’m glossing over a lot of information)

Dress time! The hair was easy, the dress shouldn’t be a problem, right? Right?
WRONG!

I don’t know what Adam did, something with curves, nulls and some bones that drive the whole thing.
I couldn’t follow because my brain started leaking out of my ears.



PANIC!
As I said rigging and texturing are happening simultaneously. At this point I’m also struggling with the hypershader over in Maya.
There’s nothing I can do right now without either Kert Saville or Adam Sale holding my hand through the whole processes.
I’m in over my head!
I don’t know what I’m doing!
HELP!!!!
!!!!

Ok.
Ok. I can do this. I’m not dead in the water (yet).

So the skeleton is ready to roll.
Kert said she looks like a Christmas tree

 It’s time to start weight painting.

Up until this point I have been building a skeleton that is based on Anna’s mesh. Based on but not connected to. Weighting is when you envelope the mesh to the deformer group (for simplicity’s sake, the skeleton) and then start assigning what deformer (bone) has influence over what part of the mesh (model).

Let’s talk real life for a second. Look at your hand. Now make a fist. Your skin and your bones move together. Think of your skin as the mesh and you bones as the deformers. Now you understand the goal of weight painting.

like a pretty rainbow


It’s a lot easier said than done. Do you understand the subtlety of how the skin and muscles deform when you move? Watch the bunching of the skin on the palm as you move your thumb to your little finger. Have you ever really thought about this before?

I would definitely suggest getting into CG if you are interested in human anatomy. In my third year at Emily Carr I took an anatomy class. All we did was sit around and draw old bones and memorize a bunch of big words, most of which have leaked out of my head by now. But this year working on Anna has forced me to pay attention to so many details of the human form that I had overlooked or never even considered noticing before. I feel that I understand a lot more about how the body works because I’ve had to construct one. There is so much about our form that we never consider, so much about our movements that we don’t understand yet do constantly. Can you express the correlation between your hips and shoulders when you walk? Do you really know what your face is doing when you smile? Are you aware of the rotational limitations of your arms?

Working in CG has forced me to really study anatomy through emulating it. I may not remember the names of the muscle groups in the hand, but I sure understand them a lot better.

After the weight painting is finished the body portion of the rig is done.

Moving on to the face.
 I would say I’m maybe fifty percent done at this point.

There is a couple of different ways to rig faces. I chose face shapes.
How face shapes work is you model several different types of eye brow, eye and mouth expressions.
These are examples of shapes: brow up, eyes closed, squint, smile, puckered lip. There are several more.

example of puckered lip face shape


example of eyes closed

Again, sounds lot easier than it is. Remember in the modeling post where I discussed the difficulties of getting the mouth corner right? Well now I have to deal with that about 10 more times.

The smile is by far the hardest of the mouth shapes to do.  Earlier in this post I asked if you understood what the face does when it smiles. I certainly didn’t.  The knee jerk reaction is to turn mouth corner upwards.
Like the yellow smiley face. 

It’s a lie.

The smiley face is a lie.

What a smile actually does is engage some muscles which pull the mouth back causing the lips to tighten over the teeth.  
It’s weird.

The sad tale of Anna’s eye brows.

-At this point in the game I had decided to paint on Anna’s eye brows through texturing.
-The design of the brows is very long because I wanted to emulate the look of Victorian porcelain dolls.

example of the long brow look 
-To cut down on render time, I tried to be poly count conscience when modeling Anna’s head.
-Because I am more comfortable rigging in Softimage, I decided to use point cashing to transfer animation onto an identical mesh in Maya.   

These four facts, though good ideas on their own, somehow coagulated into one of the most difficult problems I have encountered so far.

When I started modeling the brow face shapes, I quickly discovered that I could not make Anna’s long eye brows expressive enough because of the limited geometry in her forehead.

To get the brows to emulate the desired emotion, Anna’s head would become so warped that she looked like someone beat her in the head with a shovel.

Not very good expression


Look at the weird lumps in her forehead  


Usually an easy fix.
Simply add more edge loops.
Except
That would change the mesh, and the mesh needs to be identical to the one in Maya.

BIG PROBLEM!
 Big, big problem!
ANNA’S FACE IS THE MOST IMPORTANT PART OF THIS MOVIE!
SHE NEEDS TO SHOW EMOTION, DAMMIT!

FFFFFFFUUUUUUUUUUCCCCCCCCCC-


k.
ok.
I’ll just model the eye brows separately. (I also made eyelashes because it had to get done sometime)

Now the consequences.

A little more information on face shapes:
Once you make all the face shapes, you create a weight map for the left and right side of the face.
 You take every face shape and make two more copies of it.
Then you take the copies and assign them to a weight map.
 Take Eyes Closed for an example. Eyes Closed is the original face shape. Make two copies, assign to weight maps. Now you have Eyes Closed, Eye Closed Right, and Eye Close Left. The eyes now have the ability to shut separately from one another.  

eyesclosed face shape


eyeclosed face shape with left weight map


eyesclosed face shape with right weight map


It’s a very neat process because you can get a lot of expressions from a limited amount of shapes.

However, with the new brows and eye lashes…

For every face shape involving the eyes and the eye brows, I now need to make matching shapes for the separate brow and eye lash meshes.
Then they all need weight maps and copies for the left and right side.
So
What was once a single shape
Now has the potential to become nine.

That’s not all.
Because the eyebrows and eye lashes need to follow the face mesh,
I have to hook them all together so the face shape drives the other two meshes’ shapes.

Fun.

Fifty thousand steps later and

the face shapes are ready to be connected to the face control panel through an ice tree. (For those of you that have no idea what this sentence means, WELCOME TO MY LIFE FOR THE LAST EIGHT MONTHS)
(I’m feeling spiteful and am no longer explaining things for a while)

But!
I’m near the end, I can taste it!
After this it’s done!

After a horrid picking session with the ice tree (still not telling you) that takes another hundred years
And 
Let try these face controllers out (Very nervous right now)

….

NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNEEFFFFFFFFFFFFFFFFF
EEERRRRRRRR
NNNNOOOOOOOOOOOO!!!!!!!

(Sob)

I need Mr. Sale’s expertise.  Less than half of it is working and I have no idea why.

He’s sick

Shit.

THE END









Did I scare you?
No, it doesn’t end like that.
I’m just going to write about the end of rigging now.  “The End” three lines ago is just the title for this next section.

Thank goodness for smart people like my friend Lillian Wong.
Because of her help I was able to get the majority of the face sliders working.
Except for one.

Adam Sale returned today and fixed the slider.
And I tied up a bunch of loose ends
Yippy! Dare I say I’m done?
 Better double check.
Looking good!
Oh
Wait.

Another slide has stopped working.

Sigh.



1 comment:

  1. Looking great Robyn. Finally seeing Anna take on some expression makes my lips tighten across my teeth!

    ReplyDelete