Thursday, November 17, 2011

Frames Per Beat Calculator

Shahbaaz Shah is awesome.  How awesome?  Well, for one thing, he's working in-house as a contract animator at Reel FX.  For another thing, he just passed along the link to this nifty little tool by Rich Reel that gives you a frame count (and a bunch of other spiffy figures) as you tap out a beat on the keyboard.  If you've got to animate anything that involves rhythm, this could come in pretty handy.

Kudos to Rich for making it, and thanks to Shahbaaz for passing it along!

Monday, November 14, 2011

I Tawt I Taw a Puddy Tat!

Entertainment Weekly has posted a sneak peek at I Tawt I Taw a Puddy Tat, a new CG animated short film featuring Sylvester and Tweety.  The short is one of three new theatrical Looney Tunes shorts that Reel FX has produced for Warner Bros, and one of two that feature revived audio of classic cartoon voice talent, Mel Blanc.  June Foray, another legend in the world of cartoon character voices, was brought in to voice Granny.


I Tawt I Taw a Puddy Tat will play in front of Happy Feet Two this coming weekend, while the other two shorts -- one featuring Daffy and Elmer (again with Mel's stellar vocals), the other bringing back Wile E Coyote and Roadrunner for more mayhem -- will appear in front of other WB features in 2012.

Friday, November 11, 2011

Auto-placing Toolbars

I fiddled around with Maya 2012's toolbar options a bit more today, and learned a few interesting things. The most interesting of all was the discovery of a way to auto-load a custom toolbar when Maya opens, and have it appear in the same position that it was in when you last closed the program. (This is all in Python, by the way; I'm not sure if it would work the exact same way in MEL.)

Saving Toolbar Positions
The first thing I had to figure out was how Maya saved toolbar placement. When I wrote the other day about fixing a co-worker's missing tool settings panel, I mentioned the discovery of Maya's startupMainWindowState settings file. I also found some flags on the windowPrefs command for saving and restoring these settings. Today I learned that when using those flags, the full absolute path to the file should not be passed. Maya only wants the name of the file; it already knows where it lives. So to save, it's as simple as this:


import maya.cmds as mc
mc.windowPref(saveMainWindowState="startupMainWindowState")

Maya also saves the toolbar settings automatically when it closes, and we'll take advantage of this as we move forward.

Restoring the Toolbar
Immediately after you have built your interface and wrapped it up in a toolbar, restoring Maya's window state settings will move the toolbar back into its original position (assuming it had an original position when the settings were last saved).  Here's a quick example:



import maya.cmds as mc
window = mc.window("myWindow")
column = mc.columnLayout(p=window)
button = mc.button(p=column, l="Click me!",
                   c="print('clicked!')")
toolbar = mc.toolbar("myToolbar", content=window, label="Clicker",
                     area="top")
mc.windowPref(restoreMainWindowState="startupMainWindowState")



Naming the toolbar is important, as this is what will allow you to re-position that toolbar automatically between sessions.  If it doesn't have a consistent name, it won't work.

Obviously the last line won't do much the first time that you run it, because there is no saved position for this toolbar.  However, move the toolbar to some other position, then close Maya, which will save the toolbar's position.  Open Maya, run the same code, and the toolbar should re-spawn in the same place where you moved it.

The next step is to make Maya auto-load your toolbar each time that it starts.

Auto-Loading the Toolbar
Maya looks for  -- and executes the contents of -- two files each time that it starts: userSetup.mel and userSetup.py.  If used, these files should be placed in Maya's "scripts" folder.  In this case, we're going to use the Python startup file to kick off our toolbar.

First, we'll need to wrap our code inside a function, and save it in a file.  Copy the following into a new file in your favorite text editor:



import maya.cmds as mc

def main():
    window = mc.window("myWindow")
    column = mc.columnLayout(p=window)
    button = mc.button(p=column, l="Click me!",
                       c="print('clicked!')")
    toolbar = mc.toolbar("myToolbar", content=window,
                         label="Clicker", area="top")
    mc.windowPref(restoreMainWindowState="startupMainWindowState")


Save this file as "myToolbar.py" into Maya's prefs/scripts folder, which is one of the places in the sys.path setting of Maya's embedded Python.

Now start a new text file, and add this to it:

import maya.cmds as mc
import myToolbar
mc.evalDeferred(myToolbar.main)

Save this file as "userSetup.py" into Maya's scripts folder.

The reason we're using "evalDeferred" is because Maya needs to wait to execute the UI code until it has a UI to work with.  If you don't defer the execution, Maya will crash before it even opens.

Close Maya and re-open it.  Your custom toolbar should automatically appear where you last placed it.


Thursday, November 10, 2011

Notes on bird flight

A few days back, one of the guys at work posted a link to a really great page on Brendan Body's web site that has a LOT of awesome observations about bird flight and how to animate it. Brendan was a lead animator on Legend of the Guardians: The Owls of Ga'Hoole, and "had a large role in developing the style of the bird flight for the film." You can see his application of these flight principles in his showreel from the film (inserted below). According to Brendan:
I'm responsible for all animation apart from a couple of shots where someone else animated the background characters - where Nyra says "Owlet, that one says you're his brother" and also where Ezylryb says "Soren, you did what was right". All cycles used in the flying shots are my own.
Awesome work, Brendan!

Tuesday, November 08, 2011

New iPhone App: Coach's Eye

Earlier today I received an email about an interesting new iPhone app that was just released by the folks at TechSmith. It's called Coach's Eye, and while it's being primarily marketed as a tool for coaches (of various types), I think it has some definite potential in the realm of animation.

In a nutshell, Coach's Eye is a simple video review tool. You can load a video clip (from one of several possible sources), scrub through it, add annotations (or "telestrations" as the TechSmith folks call them), and even record vocal comments. Once you're done, save the whole thing and share it using the app's sharing tools.

So how could Coach's Eye be useful for animators? Here are just a few thoughts...
  • Record a video critique of a piece of animation sent to you by a friend/colleague/student
  • Create a series of action analysis clips where you break down animated or live-action footage
  • Record reference footage for a shot you're animating, and make notes on specific things that you want to make sure to incorporate into your work
Right now they're offering Coach's Eye at a special introductory price of 99 cents. This deal won't be around forever, so swing on over to the App Store if you want to learn more.

And no, I'm not getting a kickback for plugging it. I just think it's cool, and wanted to pass the word.


Fixing Toolbar Issues in Maya 2012

One of the guys at work came to me with an odd problem: he couldn't get the Tool Settings dialog to appear. Clicking the middle button in the upper-right corner of Maya's main window normally makes this dockable dialog pop into view just to the left of the main viewport. In this case, it just made the viewport edge shift ever-so-slightly from left to right. It didn't create the usual drag bar, so we couldn't force the width using the mouse. Restarting Maya did no good. After digging into the UI elements, I found that the width of the dialog's main formLayout was at 0. However, forcing it to a different value did absolutely nothing.

I was pretty sure that Autodesk had to have created a way of keeping track of all those nifty dockables in Maya 2012, and it took a while to figure out where they put it. While the file where this data is stored is not exactly formatted for human eyeballs, I was able to read a bunch of things like "dockState," "dockControl," "dockWidget," and "toolBar", though, so I was pretty confident that I had the right thing. We closed Maya, renamed the file, opened Maya, and presto! The Tool Settings panel was working again!

If you run into this problem, the file in question is named "startupMainWindowState", and is the lone file stored in Maya's prefs/mainWindowStates folder. As I said above, it's not anything can can be edited manually (at least not easily). However, Autodesk did create a simple way to save and load the settings contained in this file. In the windowPref command, there are a couple flags that do the job: saveMainWindowState and restoreMainWindowState. If you make your own dockable windows or toolbars, those commands should let you save and restore their state so that you don't have to manually re-position them every time you make them. I haven't tested them yet, but I plan on doing so tomorrow, and will update this post with my findings.

Thursday, July 28, 2011

Devils, Angels & Dating - Teaser Trailer

Over a year ago, I made contact with the director of an online collaborative animated film, and was cast as the voice of the two male characters. Later I was asked to record a Wonder Years-esque narration that would be woven throughout the film. The project has been progressing nicely, and a teaser trailer was just released that shows off some of the stellar work that's been done by the team, all of whom are volunteers. Take a minute (literally) and check it out!

Wednesday, July 20, 2011

Interview with Dorian Soto, Part 5

In part 4 Dorian talked about some of his suggestions for new animators, and in this final part Dorian continues in that vein by answering the question, "Would you recommend that someone pursue a career in animation?"

Interview with Dorian Soto, Part 5 (mp3)

Tuesday, July 19, 2011

tweenMachine Tangent Error

I recently began receiving reports of a tangent-related error in tweenMachine:

// Error: Unrecognized tangent type. Use spline, clamped, linear, flat or step. //

With the help of one of the guys at work, I determined that this will occur when you're trying to add a tween key outside the range of an attribute's current keyframes; i.e. if you try to add a tween key to an object on frame 105, but the object's first keyframe isn't until frame 110. Because there's no previous key to reference for the tangent type, the tangent type in the script will remain undefined, and Maya will complain when applying the tangent.

I hope to eventually add an elegant solution for this problem. For now, the workaround is just to make sure that all objects that you're trying to tween have keys both before and after the frame where you want the tween key to appear.

Monday, July 18, 2011

Interview with Dorian Soto, Part 4

In part 3 Dorian talked about some of the differences between his first two jobs, and we begin Part 4 with another common question...

Interview with Dorian Soto, Part 4 (mp3)

Tuesday, July 12, 2011

Interview with Dorian Soto, Part 3

In part 2 Dorian talked about some of the work he did on Green Lantern at Sony Imageworks, and we kick off Part 3 with a question that crosses the minds of all new animators as they approach their first job.

Saturday, July 09, 2011

Interview with Dorian Soto, Part 2

In part 1 Dorian talked about his introduction to animation and some of his training, and we begin part 2 talking about his first job...

Jazboo 7: Interview with Dorian Soto, Part 2 (mp3)

Thursday, July 07, 2011

Interview with Dorian Soto, Part 1

It's been a while since I've been in here, and I apologize for the lapse in chatter. Frankly, I haven't had many ideas on what to post here, but knowing how I tend to over-edit these things when I finally get around to putting them together, I think I've largely been avoiding it when the ideas have come because I knew that I just didn't have the time.

However, something has come up lately that just may change all that. I recently started recording little vocal bits via the Audioboo service. A lot of it is just talk with friends, but I also plan on talking about various things related to animation, and will toss those up here from time to time. It's a lot easier to babble for five minutes, add some tags, and publish the recording than it is to sit down with the intention of writing a "simple" blog post (which is what this was supposed to be) and not take a half-hour to actually get the thing done. :)

One of the things that I got the bug to do with my Audioboo recordings is interview some of the folks at Reel FX. The first interview that I recorded was with Dorian Soto, who came on board as a contract animator for a couple months. Here's part 1 of that interview. Part 2 should be released shortly.

For more of my Audioboo posts, stop by my Audioboo profile page, where you can listen to them directly, and also find RSS and iTunes links for tracking them via other tools.

Saturday, March 19, 2011

Change is in the air

Spring is a wonderful time of renewal and rebirth. It's a glorious...

Yeah, fine...get to the point already!

*ahem*

I just finished my last set of Animation Mentor campus crits...not just for this term, but possibly for good. That's the change to which I mysteriously alluded in my Facebook status earlier this week. I will not be returning as a campus mentor in the spring, and it's possible that I will not do any more mentoring with AM in the future.

My five-and-a-half years as a mentor with AM have been quite an experience. I've learned a ton, met a lot of amazing people, and enjoyed the opportunity to share my meager knowledge of animation and the entertainment industry. It's also been a bit of an emotional roller-coaster, particularly during the past three years after I set aside animation in favor of programming and TD work at Reel FX. The decision to step away from mentoring at AM is partly because of that roller-coaster, and partly because of other things happening in my life right now. While I will miss the regular interaction with AM staff and all the aspiring animators in the program, this change really is for the best.

To everyone at Animation Mentor -- staff, students, and graduates -- I express my deepest thanks for an amazing experience. While I won't be on the school site after the end of next week, or walking in costume across the stage at future graduation ceremonies, I hope to stay in touch with as many of you as possible, and wish you all the best in your animation journey.

Friday, March 18, 2011

Maya/Qt posts delayed indefinitely

I probably should have posted this some time ago, but the reality of the situation is that I have no idea when I'll get back to the Maya/Qt materials. I haven't done any further work with Qt at Reel FX since I initially wrote about it. Part of that is because our current projects are all using Maya 2010, but the biggest issue is that the majority of the Maya tools that I develop at Reel FX need to work both in-house and for our ever-morphing collection of remote animators.

While the crew at the studio have set up an efficient Maya/Qt workflow for internal use, setting up a home system to get Maya and Qt talking nicely appears to be a bit of a chore (to put it mildly). It's tricky enough troubleshooting the problems that remote animators sometimes encounter while setting up their systems to work with our pipeline and tools. Putting them through Qt setup process on top of that would be asking a bit too much.

Once we have a project that will use Maya 2011 and I dive back into Qt work, I may bring this back up, but the remote situation is the key factor. Without a way to ensure that our remote artists can *easily* get the same Qt UI results that we do, it's not worth the development effort.

Thursday, January 20, 2011

Maya caching UI images?

I'm curious if anyone else doing Maya UI development has noticed that Maya will cache images used in UI elements, and not refresh them if the image data changes. I haven't done a thorough test to see if it's specific to certain image formats, as I'm only using XPM files, but this problem has been there for ages. If you haven't seen it in action, try this:
  • Make a small image (100 x 100 is good) in your favorite image editing application, and save/export it in XPM format.
  • Script a simple Maya interface that assigns this image to a control, like the iconTextButton. Open your UI and confirm that the image displays correctly.
  • Go back to your image editing app, make some obvious change to the image, and save/export it with the same name as before.
  • In Maya, reload your UI, and you should still see the original image, without the change you just made.
  • Restart Maya and load your UI again. The changed image should appear this time.
I've tried a number of things in an attempt to work around the problem, but it appears that the only way to force Maya to see the change in the image file is to close it and re-open it. Not exactly the most productive option.

If the test above doesn't operate as described for you, I'd love to hear about it. Post the Maya version and OS that you're using. I'm curious if there's a pattern to this problem. I'd also appreciate hearing if you know of any proven work-arounds.