Archive for the ‘General Interest’ Category

Root Motion Computer for Unity

Wednesday, May 26th, 2010

I recently finished up a new component for Unity as part of a contract job with Mixamo. For those of you who are unaware, Mixamo provides an online motion capture download and retargeting service powered by HumanIK. It lets you use sliders to creatively adjust a piece of motion capture data and then automatically retarget it onto your own hierarchy and download it for use in your game. It’s really slick and pretty affordable, so it’s definitely worth checking out, particularly for any indie developers out there.

At any rate, the component that I created is designed to let animation data, rather than procedural velocity values, drive a character’s motion in space. The component sits on top of Unity’s animation API to let you simply play, crossfade, and blend animations using any of the existing API methods, and the computer takes care of everything else after the fact. The way it works is by tracking the position and rotation of the pelvis in the space of the character’s root node for each active AnimationState and then backward applying this motion to the root node itself and snapping the pelvis back into its position hovering over the root. Since the source code is all available in the project, I won’t belabor the details too much here, but you can certainly ask me if you have any questions. (The one thing perhaps worth mentioning, as an addendum to the video, is that the pelvis forward axis is not strictly necessary for computing output: only for displaying debug information. For computation, the character’s rotation is determined using the pelvis right axis.)

You can download an example project from Mixamo that contains the component as well as a sample character with some animations. Because the tutorial video on the Mixamo website is compressed pretty substantially, I have also uploaded a copy to my Vimeo account in case you would like to watch it in full HD resolution.

New Section for Unity Tutorials

Thursday, April 29th, 2010

Among other things, I’ve been developing some new tutorial videos for a friend (and former instructor) of mine who teaches in LA. He’s been spinning up a program focused on iPhone development using Unity, so I’ve started to put together some introductory Unity videos for him to share with his art students. As such, I’ve added a tutorials section for Unity, which currently features a video on basics. As you can see from visiting the section, I have a few more lined up in the short term, so it will be growing over time. Let me know if there’s anything specific you might like to see in the future.

Coming Soon: Complete Maya-Unity Workflow

Thursday, April 15th, 2010

Over the last few weeks I’ve been working on a set of scripts in my free time to help get additional relevant data from Maya into Unity. In particular, I’ve been interested in getting things for procedural animation (constraints, expressions, etc.) out of Maya and into Unity automatically, since I have traditionally had to re-code them manually. As such, I’ve developed a Python script that is invoked whenever Unity imports a Maya asset, which in turn adds attributes to the intermediate FBX file for Unity to operate on in an AssetPostprocessor script. Rather than babble, however, I decided to make a video to demonstrate how the tools work. (Click through to Vimeo to view in full HD.)


(more…)

GDC Python MasterClass and Unity <-> Maya Workflow for iPhone

Monday, March 15th, 2010

I had meant to post this up before GDC, but I was overloaded with deadlines leading up to the conference, unfortunately. For anyone who was at the conference, you may have seen that I was a guest presenter at the Autodesk booth twice to discuss the Maya <-> Unity workflow for iPhone development. These presentations were streamed live via their website, but I will post a link here later if they make them available somewhere. (EDIT: One of the presentations is now available online. Visit the Area website to catch my presentation.)

Moreover, Ryan and I recorded a Maya Python MasterClass for them, which you can view on the Area website. In it, Ryan covers an example of how to use threading and I cover an API example (the expose transform plug-in I recently released). Check it out and let us know what you think! Please note you will need to go through a free registration process on the Area website to view this video.

AM Tools 1.04

Wednesday, February 24th, 2010

I just released a minor update to AM Tools that I thought was worth mentioning here. The only change is some refactoring in plug-in verification to ensure everything will work fine with versions of Maya older than 2010 on Windows. Previously, I was using the allNodeTypes command to verify the existence of plug-ins containing nodes. While this command generally only needs to be called twice to make it work in old versions of Maya on OSX (and I believe Linux too), Windows users could get a Debug.dll error that would just prevent the script from working. Special thanks to Sean Binder and Chad Dombrova for helping me troubleshoot this!