Is it possible to Bake Mocap Data via HumanIK and store it in an Animation Clip?

I’m working on a simple Maya 2013 only pipeline using file references for 1) Rig and Characterization 2) Mesh and Skin Data and 3)Animation files.

The rig data uses Human IK.

I can successfully create animations and clips with this setup using standard keyframe methods, however if I bring mocap data in and retarget the rig I can’t use that motion to create a clip. When I Bake to Control Rig from the HumanIK menu the bake appears to have worked, however when I go to create a clip I get and error “No clip created since character has no keys.”

The Character Definitely has keys, and if I compare files that I’ve successfully generated clips from the same nodes are visible in the graph editor with curves.

Does anyone have experience using a HumanIK rig with the Trax Editor successfully, including a combination of hand keyed and mocap data?

Yes we used Trax for years back at Eurocom, although personally I no longer get anywhere near it, stuck in code land. I have to say I’ve never tried HIK with Trax although I don’t see why it would fail. If I get time I’ll take a look

Mark

After spending more time with it - it appears that the hiccough occurs when baking animation while in character is selected. The Autodesk documentation refers HIK and the Trax editor here:http://download.autodesk.com/global/docs/maya2013/en_us/index.html?url=files/GUID-559933C3-DFBD-4EA9-BC27-1D8E6B634D13.htm,topicNumber=d30e231208

However the links all go to the generic set-up which isn’t currently working for me. It must be something about how I create the character set.

If I have my rig set up, set source to reference animation and then Bake to Control Rig it works as long as I do not have a character set selected. If a character set is selected, the bake fails and the rig goes to a broken version of the stance pose.

If I do NOT have the character set selected the Bake to Control Rig works as expected, but when I go to create the Character Clip I get the “No clip created since character has no keys.”\

I can get a proof of concept if I complete the to control rig before creating the character set. When I create the character set as before the Keys do appear on the Character and I can create a single clip via Trax editor. The problem is All subsequent Bake to Control Rig fails unless I de-select the Character Set.

So I’m stuck in a catch-22 where the bake works as long as I don’t key it to the Character Set, but if I don’t key it to the Character Set I can’t make clips.

EDIT: I’ve go back to the drawing board and created a test HIK rig from scratch and a new Character Set that has allowed me to make 2 clips by Baking without the Character Set selected, then selecting the Character and the keys actually appear. The only difference is that I wasn’t targetting a new layer in the Bake to Control Rig settings.

If any of this points to an obvious error in my thinking I’d love to hear it, as I’ve spent hours doing essentially the same thing rebuilding character sets.

EDIT EDIT: And Thank you for the reply - just hearing it should work gave me the kick to give it another shot from scratch. Just seeing anything work, even in a test makes a big difference.

there was a bug a while ago with characterSets where the keys / curves would get connected directly back to the controllers rather than passing through the characterSet itself but as far as I remember that bug was fixed. Basically when you key a node that’s a member of a chSet the curves are connected via the chSet node, so the set sits between the cirve and the controller. What happened in the bug was that once you’d keyed the controller (and bake does ring a bell) the curves would get connected directly back to the controllers, disconnecting the chSet. Might be worth just doing a quick test to see if that’s what was happening. If so let me know and I’ll trawl back through my bug list and see when that was supposed to have been fixed.

cheers

Mark

I’m not sure how to confirm this - but I am having the issue again in a new file as I rework my referencing structure.

If I bake to control rig I do get curves in the graph


But if I select the character set node there aren’t any keys on the timeline.


My only other idea is that the reference is causing this issue as the Character Set is being referenced in, but the values aren’t listed as referenced data. The character set node itself doesn’t have all the variables I’d want in the channel box.


EDIT:
I doubled checked the pre-bake state of the Character Node and the desired variables are definitely all there. After the bake the character node is sparse (as above).

[ol]
[/ol]
And another update - I just tried this in 2014 with a demo character file and the bake is still removing nodes from the character set. The character set is not broken if you select the character from the timeline as a target before baking, however when the bake completes the keys are in the timeline but there is no animation and the character is in the stance pose.

Maybe this is pointing to a fundamental misunderstanding of the Bake to Control Rig process for HIK enabled Character Sets, but I’ve never had issus with the Trax editor before. I can also generate clips with hand keys to the control rig, it just appears to be the Bake to Control rig that I cannot capture.

The process to reproduce this:
-Create a new scene in maya
-Open HumanIK Window (iIndow>Animaton Editors>Human IK)
-HumanIK Example > Import Blue_dude.ma
-Select Reference Node for Blue Dude and Create Character Set, include hierarchy below selected node & All Keyable (observe Character Node Variables)
-Mocap Example > Import walk1.ma
-Set Blue_Dude Source to Mocap Example
-Make sure Base Animaiton & the Character Set are selecterd
-Bake to Control Rig > Driven Channels (other options greyed out), Bake to Base Animation
-Watch the Bake attempt as the rig follows the Mocap, but post Bake the Rig will be snapped to its default Stance, but the character set keys are as they were on creation

-If you undo/repeat the above - but select Character Set - None

the bake will proceed as expected and animate, but the Character Set will be mostly empty and if you attempt to make a clip you will get an error about no keys present.

-If you repeat the above up to character creation, set manual keys to the Character_Set, you can create a clip via trax editor.

Is there something I’m missing about the various bake settings and character creation being finicky?

I am going to check this out for you as well, I remember this bug but I thought it was fixed in 2014.

I appreciate the extra brains here - I’m new to this system and I don’t know what’s reasonable to expect. The documentation leads me to believe HIK and Trax are compatible, but if its this finicky I’m wary of trusting it in production.

I’d be less concerned about the buginess on a few files but there’s no good work if I need to fake the bake. Since the control rig doesn’t follow at all until the Bake is completed and once the Bake is completed the Character Set doesn’t work, I don’t see a way to script a bake-like behavior.

It’s possible to handle the animations without Trax, but I hate having a tool removed from my Quiver.

Now I remember- Sune and I had a 30 email discussion about this problem a while back and the last we left it was “AUTODESK NEEDS TO FIX THEIR TOOLS”

Here was the result of our back and forth.

the post cleanup script would have to be adjusted to bake the rig correctly

C:\Program Files\Autodesk\Maya2014\scripts\others\hikBakeOperation.mel

hikBakeToControlRigPost

Now if you create your set and then reference it it seems to behave better but you are going to have to explore that script.

hhmm, think I’ll check this one out too Brad, these persistent bugs just never seem to get squashed, like the lost animation on referencing which I get SOO many emails about still. We also started having it randomly again here at work.

Wow thank you so much. I thought I was going crazy! I’ll take a look at that script and see what I can do.

Hi,

Just saw this. Yeah, in 2013 HIK did not play well with Character Sets. My conclusion was that I would have to reference my characters in, without Character Sets being defined. Then set Character Sets up dynamically when I needed to do Trax and then blow them away again, if I wanted to do anything HIK after that. Or fix the HIK scripts myself, though I’m not using Maya ATM. so that’s not likely to happen :slight_smile:

I’ve logged a bug for this ages ago and mentioned it to several Autodesk people. I’m sorry to see they did not get around to fixing it for 2014. Together with the Trax stuff that Mark pushed, it would have made a pretty powerful combo.

Unfortunately HIK in Maya seems a little underdeveloped/slapped on.

An update for any interested - While I haven’t kicked HumanIK completed out of my pipeline, I’m leaning towards relegating it to optional / retargettting only. I just used it succesfully for a set of prototype characters, but a new character I pulled together is having a completely new issue. This new character has some more elaborate attachments that the previous character and for whatever reason after 3 - 4 keyframes the constraints I’ve used break for one of the attachments. I can save, reload reference etc. with not issue - but once I start skinning and throw some test keyframes down for skinning positions one of the rig extensions loses its contstraint connection and proceeds to float. (can see “disconnectAttr” in the referenced file changelist) The other extension using an identical set up are fine, and the previous character set using the same set-up is fine, but this one breaks consistently.

It’s enough to have me abandon using it entirely - but I’m in a phase where we’re throwing together lots of rigs for test characters and wanting to share motion block outs readily. I have no way to predict if a character is going to be kept or heavily iterated on - and since I got the hang of hand keying with Full Body IK I was jazzed that it would be low effort to share those animations. My next course of action is to try the flow for customizing auto-rig templates to HIK characterization as needed and testing the time investment (and more importantly the functionality) and going from there.

These kinds of things on the Maya side have made it frustrating, 2014 did have a fixes but please make sure you submit a bug report to autodesk and sent example files if you can (strip the mesh just send skeletons) so that they can debug it. It is the only way this stuff gets fixed.

I am having a similar problem I think, here is a really long and convoluted series of steps that seems to be working so far:

In my case, I am using Maya 2012 on a Mac
My character is imported from Make Human, and then put in a TPose and Human Ik>characterize

  1. Convert mocap (BVH) to FBX (I used an old copy of MotionBuilder and then FBX converter)
  2. Import FBX (you will see only a skeleton), Human IK>characterize, rename “mocap”
  3. Create a character set for “mocap”, and load into TRAX
  4. Create clips and export to library, I am hoping if I always name my FBX import “mocap” I can reuse my clips
  5. Create the animation you want with clips on the character “mocap”
  6. In character controls, with your character selected>source “mocap”
    If this worked your character is now moving along with the mocap skeleton
  7. Bake the animation to the skeleton
    if this worked your characters skeleton now moves, but you’ve lost access to the control rig
  8. Bake to Control Rig
    Now you should have the base animation and access to the control rig
    When I have tried baking directly to the Control Rig it does not seem to work.

This is as far as I have gotten, and I have only done it once successfully, but maybe it will somehow help…

Joho, that is certainly a valid way to get the data in and while you should be able to bake direct to the control rig, it is often better to first get it on the skeleton first.
Thanks for sharing.