Wednesday, December 19, 2012

Ya cant have any rigging if you don't orient your joints. How can you have any rigging if you don't align your joints!?

YOU, yes you behind the hypershade! Stand still laddie!
Yes Pink Floyd is still just as amazing today as he was 20 years ago sitting in a speaker egg chair experiencing Dark side of the moon for the first time.

Anyway, it's been a while and I am in need of a good blogging. Mmmm feels so good.

Joints need to be overhauled. They need to use quaternian rotations so they don't flip as with euiler rotations. But for the time being we need to just grin and bare it. This is just my recommendation but it works for me.

1 : You can translate, scale or rotate the joint to your hearts content as long as you freeze the transforms before you orient them. As long as your rotations and scale are 0, your cool.

2 : This is the big one! Make absolutely sure that under your transform attributes in the attribute editor are all 0, or zero, or what ever version of nada you believe in. This attribute will screw up your constraints big time because this attribute is added after the constraint. E.g. if your rotate axis X is 90 but your rotate X is 0 and you parent without offset it will rotate X 90 degrees when you parent even if all the rotations are 0.

Non-zero rotate axis attributes usually happen if you go into component mode and rotate the joints transform axis.

So all to all those people who say never rotate a joint, or always rotate never translate, or vice verca, in the end the one thing that will bite you in the ass is the rotate axis.

This is a side note and is completely personal preference but if you must have a clean joint this is what it should look like.

There should be only one axis with translation, all of your rotations should be zero and your scale should be 1 across the board. Rotation axis should be zero. and your joint orient attributes should only have one non zero number. This is a clean joint that when constrained or scaled or translated it does not flip or jump, it will move along the joint not at some strange angle. This is one of the secrets of stretchy or rubber tube limbs.

TLDR: The rotate axis attribute of a joint will fuck your day up and then piss in your cornflakes.

Thursday, November 1, 2012

Battle Royal, three chain vs. single chain.

I love The Big Bang Theory, and to a lesser extent I seem to enjoy most things from Chuck Lorre. Dharma and Greg was good but it fell short and for some reason and I can't find anything but the first season on DVD. I don't watch Two and a Half Men that often but it's that good kind of stupid funny, like Aqua Teen what ever the hell they named them selves this season. Anyway onto the other stuff.


The three joint chain setup for limbs, the FK chain, the IK chain and the chain bound to the mesh. This seems to be the standard setup for most of the rigs I have seen. This setup is the one I was taught in school. Being the one who always has to reinvent things I looked at what made this setup the standard. I will start with the obvious stuff.

This is the three chain setup.
FK and IK chains parent constraint the bind chain and you use an attribute to drive all the weights on the parent constraints. Simple right?

I asked myself if this was the best way to do it and at least in my opinion you do not need all 3 of these chains.

I use one chain for my FK, IK and bound joints. This is the setup I use in Maya simply because Maya has everything built into the IK handle and joints. Mayas joints remember their FK and IK rotations and these can be accessed for scripts and what not. The IK blend attribute on a limbs IK handle acts just like the three chain setup in that it will move the chain from its FK position to its IK position.

This is my setup.
What you are seeing is literally a 3 joint setup all under one joint chain and Maya's IK handle. You have the FK chain, the IK chain and the bound chain. Now since rigs are meant to be as fast as they can this setup is faster then the three chain setup. Reason one is that when you setup an IK FK switch using the three chain setup you are creating 2 of the exact same systems on top of each other so now Maya is not only calculating the three joint chains you created but also the three joint chains it created doubling the amount of joints to calculate. Reason two is that now you only have one set of constraints to worry about as you only constrain the FK controls to the joints. With the three chain setup you are using two constraints per joint, FK joint to bind joint and IK joint to bind joint. Then on top of that there are constraints from the FK controls to the FK joint chain that add to the number of constraints. Maya also has less connections to update since you aren't driving as many attributes when you go from FK to IK.

I will admit that the single chain setup is harder to work with if you need to get under the hood. The three joint setup is much more visible and you can easily get to each component if there is a need to edit the rig. Also this lets you allow someone to paint weights and another to rig at the same time and simply import the bind skeleton with weighted skin and constrain the rig skeleton to the bind skeleton. With the single chain you would need to copy the weights from one setup to another.

This FK IK setup also works for spline setups too.

As for the scripting to moving FK to IK and IK to FK
Code monkey stuff starts here. 

#three chain

float $ikRot[]=`getAttr IKjoint.rotation`;

#one chain

float $ikRot[]=`getAttr joint.ikRotate`;

So There ya go I find the single chain setup simpler to setup and cleaner for Maya to evaluate.

Wednesday, October 31, 2012

Here's Imrod in all his low poly glory.

I have always found it interesting how joint placement and alignment are at odds with natural placement, your taught that you should keep your shoulder, elbow and wrist in line with each other and only bend one axis. Great and all but your actual shoulder socket joint is offset from your elbow so you have to go out slightly to get the elbow where its supposed to be.

And technically your elbow is almost perfectly between your wrist and shoulder, and yet if you take into account style and concept art you will almost never rig a stylized character with perfect human proportions  Yes I know they are stylized and its way more fun to rig a character that's catty wonkus than a perfectly symmetrical model. But I will admit it's so much easier to rig a symmetrical model, not that I am lazy or anything.

I am trying to get into the habit of not fixating on the models topology and just working with how it is when I get the model. I will be honest though sometimes I wish there was a way to snap my fingers and fix all the bad topology and no I am not insulting all you modelers out there, I highly respect what you guys do.

Back to my day.
Is there someone behind you?

HOLY CRAP WHAT THE HELL IS THAT!
...

What I'm working on and how cool I think they are.

So as I am in the unfortunate position were my skills as a TD are being underutilized by the industry, AKA I don't have a job in CG right now, so I am working on anything I can get my hands on. Currently I am working on two rigs.

I would like to again thank Mark Vick a.k.a Ritorian over at CGhub.com for this beauity

This is a farily low poly model with normal maps.

Na na na na na na na na na na BATMAN!

Ya I know shweet hunh.
Im almost finished with a base rig for this guy and I hope to get Marks permission to release this rig free on creative crash.

I'm working on a bataraang

And number 2. I just picked this up from Dmitry Parkin's site.

Some call him Imrod...

Game resolution model with normal and glow maps

I know its like candy from heaven to work with this stuff.

As with Batman I would like to release this rig.

Oh to be able to rig this stuff for a living... I can dream. If my dreams aren't answered I can always beg.

These are both amazing looking models and I hope my rigs at least do them a little justice.


Monday, October 29, 2012

Reinventing the wheel.

Morning TD fans, lets have a look into my thought process and my logic. I know like blood from a stone right.

    Now that I am a person who blogs I might as well go ape shit and post a bunch of stuff in the same day. Lets start with some of my thoughts about the term, reinventing the wheel.

    In my not so humble opinion you cannot reinvent something that is already at its apex you can only make it crappier. The wheel is, at its core functionality, already stripped down to a perfectly working system. Sure you can add rubber but its still a circle, its still a wheel, it still functions the same as every other wheel out there, just with rubber. My point is you can't reinvent the wheel, only upgrade the way it does its core function which is to roll. There we go, that's my logic when it comes to that expression. A useless argument in  the grand scheme of things but its still how I feel. Now on to scripts.

    Scripts are written for many reasons, from the need to automate a repetitive or tedious task to adding functionality that a software suite does not offer. Either way your ass is writing a script because the program just can't do it by itself. Now there are many scripts already written and available from websites like creative crash for you to use. However, you have probably run into this at some point were the script is either broken for some reason or does not work as you expected. Which ever reason this script does not work for you and this is were I say, okay fine I'm just going to re-write my own version of the script. I figure if they can do It so can I. So this brings us back to reinventing the wheel.

    My curse is I will fixate on finding a way to make something better, cleaner, faster and simpler. This is usually involves me figuring out the base effect I wanted and rebuilding from there. I do it with scripts I do it with rig setups. I know your not supposed to do it all the time but I guess the excuse is that I am creating my own style for my art of rigging. Unfortunately its usually a thankless process and I often hear, well why not use this setup its already a standard? Well to be honest a lot of the setups that are standard are out dated or have been in need upgrading to meet the updated software. 

  Either way I think I have spouted enough for this one. My next blog post will probably be me talking about the 30 some odd scripts I have created to speed up my rigging workflows.

   See you next time, same bat time, same bat channel.


Stop talking and just do it.

I am finally following my own advice and starting a blog. But Syn, you ask, why start a blog? Well, that's a good question little Timmy or Susie, so here is the best answer I can give.

I want to share my thoughts and exploits with everyone in hopes that somewhere, someone will find it interesting because personally I live for this shit.

Also for some reason I need to "network". Yes I know I used quotes, screw you grammar Nazis. I can't spell, I don't use grammar well at all, and punctuation can go spork itself. The only reason any of this is correct is thanks to the built in spell check so thank it for making this post not look like a three year old wiped his diaper on the keyboard.

So as for my debut to blogging goes lets wrap this up.

Here be dragons, all things CG specifically rigging, and limited access to that thing in my skull that is supposed to separate me from the apes and good thing it seems to be doing its job for the time being.