I've been working on for about five days now, trying to techniques on squashing and stretching in Maya. I borrowed a couple of books and DVDs from the library, but they gave very complex methods on rigging techniques - either through various multiply-divide nodes connecting into condition nodes and what not or through expressions which I did not understand.
While I was reading one of the books I borrowed, I came across this simple English statement which made sense to me:
"IF the length of the ik handle is longer than the length of the two joints combined, then scale the joints to match the length. ELSE if the length of the ik handle is shorter than the length of the two bones, then don't scale the joints."
Body Language: Advanced 3D Character Rigging
by Eric Allen & Kelly L. Murdock
So based on that, I read up on some syntax notation on the if else statement formation and wrote out a short script, which worked fine as far as stretchy arm was concerned.
However, squash and stretch required me to preserve the volume of the object as it stretched or squashed. I did not know how to achieve this effect, so I asked Alan on some advise. He demonstrated this concept using a sphere and adding some expressions via a formula to create an accurate squashing and stretching ball.
I spent about half an hour before finally figuring out how to plug-in the formula Alan suggested into my mini script for my hand rig. And it worked:
I was at the top of the world. For the first time, I wrote out a MEL script which I understood. Of course without Alan's help, I wouldn't be able to tackle on the issue of retaining the volume of the object while it stretched. So thanks a million Alan! Really appreciate it! :)
I felt my motivation getting back. So what if I cant draw? I can at least do simple scripting :) Heh.. Anyway, I realised I could use this technique on my characters' legs as well. As for the body where the tummy area would be exaggerated, I plan to use a nurbs sphere with the squash and stretch expression tied in to act as an influence object. Or I could try doing it the bones way too. Depends which one will give me the desired result.
=D



No comments:
Post a Comment