Skip to content

Category: Stream

Season 01 – Episode 18 – Refactoring Components

Refactoring Components

In this episode we do a pretty extensive refactoring (strict) of the leg and leg global components.

I’m not gonna lie, I’m actually quite happy with how it turned out.

Refactoring, in programming, is often done poorly and when people say “I have to refactor this for the future” they often mean “I’ll rewrite it according to my understanding of the problem space and destroy every interface in the process”.

We remained strict about it instead, moved a bunch of functionality across components and suppressed some unnecessary parts of the graph, both across and inside components, with the public interfaces left entirely unscathed.
The fact it was done methodically and entirely by just reasoning about the graph’s topology and our expectations is the part that I believe was successful. Worth a watch, even if I say so myself.

Enjoy,

Season 01 – Episode 17 – Planning a Refactoring, Maya Profiler

Planning a Refactor and Maya Profiler

This is an atypical episode: for the most part we don’t modify anything in the rig.
In a way that’s not atypical in software development; some times you need to stop for a moment, take stock of what you did and why, and refactor some of the work before you can proceed to the next Milestone.

This is what happened in episode 17. I took a long hard (thoroughly commented) look at what I wanted to do next and what I had done insofar to plan my next steps.
It’s not a bad episode di per se’, I have re-done a couple of those in the past and would have re-done this had I thought it was useless, but it’s not an eventful or entertaining one.

There is one exception though contents wise which is a bit more exciting: Towards the very end someone asked a question about the Maya Profiler, a very useful but often overlooked and under explained feature.

If you don’t care for the slower paced episodes I still recommend you watch the video, but definitely pick it up from minute 53 when I start talking about the profiler. If you don’t mind the lack of climactic events and you have been following the stream sequentially then it’s not a bad one to have on your second monitor while drinking a beer.

Because of the peculiar nature of it, and the above note about the profiler, I felt I had to preface it with an intro video, but the intro video simply explains what you’ve read here. I’m embedding it for completeness but if you’re on this page and read it it will be unnecessary.

Enjoy,

Season 01 – Episode 16 – Maya Attributes Primer, FKoverIK set up

Attributes Primer, FKoverIK

We provide a quick primer on Maya attributes and how to form compound attributes, which will be very important for our guide clean up process, and then show how to do an FKoverIK set up which we’ll use to simplify the guide.

A very simple script is used during the stream. As usual it’s provided in this post, and I will eventually add it to the GitHub repository.

All new episode now free of low frequency hum in the audio!
Enjoy,

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from maya.api import OpenMaya as om2
sel = om2.MGlobal.getActiveSelectionList()
mob = sel.getDependNode(0)
 
fn_cAttr = om2.MFnCompoundAttribute()
fn_mAttr = om2.MFnMessageAttribute()
 
c_attr = fn_cAttr.create("toSwap", "toSwap")
fn_cAttr.array = True
 
m_attr1 = fn_mAttr.create("originalConnection", "originalConnection")
m_attr2 = fn_mAttr.create("guidedConnection", "guidedConnection")
 
fn_cAttr.addChild(m_attr1)
fn_cAttr.addChild(m_attr2)
 
fn_dep = om2.MFnDependencyNode(mob)
fn_dep.addAttribute(c_attr)

Season 01 – Episode 15 – Component Encapsulation, Clean up

Rig Component Encapsulation and Clean up

First let me apologise for the audio. Only after the stream I realised how present the low hum is, and there isn’t a lot I can do about it after the fact. I figured out what it is and should be able to suppress it in the future.

As for the contents of the video itself there isn’t a whole lot to say. We perform some much needed house cleaning and start properly encapsulating into containers the various parts of the rig.

Enjoy,

Season 01 – Episode 14 – Adding FK to IK Blending

Blending FK and IK in the leg component

I do mention this early in the stream, but just to re-iterate the point: If you watch videos as they come out you might be surprised to find episode 14 going live and no episode 13 up yet.

First: Don’t panic! You can watch this and it won’t be a problem to keep up if you’re up to 12. What we did in 13 is largely theory, which isn’t required for any other episode as it was pretty philosophical, and on the practical front we only fixed a few connections and names in the rig.
By downloading the scene from the resources page you can easily catch up to it, as well as dissect the fixed asst.

The reason it didn’t go up right away after I finished the stream is that it’s a subject I’m particularly fond of and I feel I need to either edit it, or at least release it with an intro and (possibly) an errata. I should be able to get to it during the coming weekend.

If you read/watch these a few days or more late you will have seen 13 up and all will be well.

Getting to the point though: This stream we added FK to the leg and showed how to trivially blend between FK and IK as well as discussed how we could cut down and compress the graph even further in the near future.
There isn’t really much in the way of required knowledge, but if you haven’t followed, or don’t remember, the theory from the Pilot Season episodes the Matrix Maths one is worth a watch as we do make use of matrix mult again.

Enjoy,