Tuesday, 15 June 2021

There Are More Math Nodes Than You Think

Maya has a looooot of utility nodes. I still occasionally find new ones that I wish I'd always known about.
Before we look at some of them, I just wanna point out something important: A lot of nodes in Maya when placed in the node editor appear to not have any inputs, or at least not the ones your looking for. A lot of attributes will only become exposed when you right click on the node and pick 'Show All Attributes'. I don't understand why they couldn't map this to the 4 key.

Oh yes. The 1 key hides everything, 2 shows the attributes that have connections, and 3 shows all attributes... except all the ones it doesn't.
Oh. Well can I expose those too?
Sure can!
I assume with the next key in that very clearly and deliberately established sequence?
nnnnnope : )

Sunday, 13 June 2021

Transformation vs Deformation: The Two Pillars of Rigging

Food for thought:
What is rigging, exactly?

Perhaps it's simply making stuff move. But that could also be a description of the animator's job.
Making stuff able to move then, perhaps?
When I need to explain what I do to my grandparents... well I usually just tell them I'm an animator. I work at an animation studio, mine and the efforts of many others are to make animations, I'm an animator. Fuck it. That'll do.

But it really is about making stuff move.
And in Maya there are two kinds of motion. Transformation and deformation.
Every frame, Maya has to figure out where to draw the hundreds, thousands, potentially millions of points in 3d space that we call vertices. Whenever an object is either transforms or deformed, Maya has to run complex calculations to reevaluate the vertices of that object.

Transforming

Yet again, the technical term doesn't sound very accurate to what it describes.
Oh yeah! Transforming. That's that magic button the artists who worked on the Transformers movies pressed and then they all got to go home and be with their families and were not overworked at all! ...Right?

Wednesday, 9 June 2021

There Are More Attribute Types Than You Think

Maya's Add Attribute dialogue allows you to add new attributes to nodes. Everybody knows.
Everybody knows you can make your custom attributes keyable or non-keyable, hidden or visible, you can set their default values, their minimum and maximum accepted inputs, and you can even change their data type.
Everybody knows!
But does everybody know that there are more data types available than the ones that show up in the dialogue options?


No, of course not, why would they? It's not like Maya tells you!
This is one of the biggest reasons to get scripting ASAP. Because Maya offers more functionality than its UI gives you access to.

Suppose you desire a custom attribute that you know will be used to drive the rotation of something. Say a foot roll attribute to drive - after the values have gone through some math nodes - the rotation of a foot's tarsus and toe joints.

Great idea. But say... if you know it's going into a rotation attribute, and you know that rotation attributes are of the datatype angle, it sure would be nice if your custom foot roll attribute was also of type angle, so no unitConversion nodes become necessary.

This is totally doable! But not through the Add Attribute dialogue Maya's native UI provides you with. The only way to add attributes in data types beyond these initial six is via script.

Tuesday, 8 June 2021

Understanding/Defeating the UnitConversion Node

 We all know this guy, right?

There's no end to the scorn for the unitConversion node in the rigging community. Spawning themselves between your connections, cluttering up your beautiful node network! What gives?!
Well once you understand why they exist, I hope you'll see they're not that big a deal, but even so, there are ways to avoid them depending on your scenario.

Most everything in maya exists in the scene as nodes. Maya's all about nodes. And nodes contain and pass information to eachother via attributes. But that information can exist in a number of different data types.
Data types like Integers (for whole numbers), Floating Points (for numbers with decimal values), Strings (for human-readable words/sentences).
Attributes of two different data types don't play well with eachother. Not without some massaging.
It's kind of like in algebra. 2a and 4b cannot be added together. We don't know how many of b a is, or how many of a b is.
Likewise, if we took the output of a string attribute, whose value is "fish", and tried to plug it into an attribute that is expecting a number value of some kind, Maya would be right throw that string value back in our face and tell us the connection is impossible.

Unique Properties of Joints

Joints are very important, very unique objects in Maya. Through the skin cluster deformer they serve as a foundational component of most deforming rigs. But there are a few ways in which they don't behave exactly like other transformable objects. And once you know about these quirks, you'll find you have a few more options than you thought you did when it comes to using joints.

Let's start with the most integral to understand:

Joint Orientation

Joints kind of have... two sets of rotation attributes. That really is the best way to think about it. Joints have the usual rotate X, Y, and Z, visible in the channel box and in the attribute editor. But then, only visible in the attribute editor, under the 'joint' section is another trio of attributes: joint orient X, Y, and Z.

Thursday, 3 June 2021

The Powah of Local Spaces

Yeah. How ya like this? You wanna know how this works?

 
All that talk of vectors is going to come in handy here.
Maya has a native 3d coordinate space commonly called 'the world'.