Wednesday, March 28, 2012

UDK FBX 2012 Animation Pipeline

Recently I have started to work more closely with the AnimTrees inside of UDK. Along with this, I'm also trying my hand at animating characters. Since I've started working more closely with the animation side of things, I've discovered some irregularities in the FBX pipeline. Here are some interesting bits.

1. My first hurdle was to get my skeletal mesh inside of UDK. For someone who hasn't worked much with UDK, this was incredibly frustrating to start with. I found out that the FBX export will not cooperate if the geometry and the bone hierarchy structure are inside another hierarchy. These two apparently need to be placed inside the world space when it comes to exporting.

2. The FBX exporter allows you to bake animations, with only one problem: You can't bake translations. I have yet to find any kind of documentation regarding this problem, or anyone else coming across this problem. It's incredibly picky as to which bones it wants to bake translations. In order to achieve baked translations, you need to go to Edit > Keys > Bake simulation. Make sure you have all the bones selected, and bake the desired animation. Unfortunately this breaks the rig, so you'll have to export, then undo your baked simulation. This then leads to the next issue.

3. Say you just baked your animation starting from key frame 50 and ending in 109. Export it, import the FBX animation into your AnimSet, and preview it. Blank frames. Maya thought it would be cool if you had those extra frames at the beginning, so instead of exporting 59 frames it went ahead and exported 109. So those first 50 frames are garbage. They do nothing. Your character sits still for 50 frames, then plays the animation.

So enough ranting. Here is the pipeline I used to work around all these issues:

The skeletal mesh, in T pose, is kept separate from all the animations. Each individual animation is contained in it's own Maya file. They all start from frame 1 and end where needed. This will keep Maya from exporting the blank frames. Once I am satisfied with my animation, I save and proceeded to bake my animation on to my skeleton. This will make sure I get translation values on my bones. Once exported, I can import my FBX animation into UDK and not have any problems.

Unfortunately this means I have an FBX file per animation, but it saves my sanity, if only a little bit. I still enjoy working with animations and the UDK, and I'm also hoping someone else will find this post helpful, or peak enough curiosity to ask me questions/give me advice.

Wednesday, March 21, 2012

Under NDA

Greetings! I just wanted to do a quick update. I have still been doing work but I can't release it on my personal portfolio. If you'd like to see what I've been working on, head on over to http://trenchgames.com/ to see what I've been up to.

We just revealed a new character, Nym, the Nanite Manipulator! I just finished her rig a few minutes ago so hopefully we'll be showing that off some time soon.