Exporting skeletal animation question

I’m not sure if this is the right forum to post this in, but i’m having an issue exporting a mesh. The mesh has skeletal animation, constraints and some IK. I’m exporting DAE_FBX. The problem is that I seem to get some errors with the export, specifically with the constraints, whether I select them to export or not.

What I’d really like to know is if there is a way for me to export just the bone transforms without getting the IK, constraints or anything else. I’d like the resulting export to be only the mesh, skeleton, and animation. Is there a way to do this, like bake all the resulting information to the skeleton during the export?

Thanks!

That should be possible. What software are you using? Max? Maya?

Thanks for the reply - I am using Maya.

Have you double checked your FBX export settings? You might have constraints set to export.

Well that’s one thing - if i use DAE_FBX i don’t even see an option in the exporter for constraints. I do get this error:

The scene contains constraints. Activate the Export constraints or Bake Animation options before exporting.

I need the animation to be skeletal, so i can’t bake it into the mesh. The exporter also complains about the IK. I think it would make sense to get just the bones and the mesh - without IK or constraints - if that is possible.

Try this (if you’re using FBX 2011 or Maya 2011):

Open up the FBX Export Options Window, then go to Edit > Edit Preset. In the left hand panel, find the option under ANIMATION labeled CONSTRAINTS (in all caps) and right click on it, then on the pop-up menu, select <Constraints>, then Show. This should give you the Constraints Frame in the UI. You may also want to make sure your Bake Animation settings are set as well.

Bake does not mean baking the mesh, it means it is going to bake the animation on to the skeleton.

Its something that you think should be really easy, but in practice Fbx is such a beast it needs a little pre-setup to achieve. What you need to do is to first select the nodes you want to output. FBX has no concept of what it should, or shouldn’t output, so use the export selected option.

If like most rigs you have a master bind skeleton, select it’s root, then run something like:

select ls -type "joint";

to select all child joints, then shift select the GEo you want to output. Right, now you have the nodes you actually want to go through for export. I should point out here that this only works from Maya2010 onwards, there was an FBX bug in older versions of the export selected.

Here’s the key, in the FBX output options (use fbs not fbx_dae) you need to go to the animation block and make sure that these 2 flags are set.

Bake-Animations = ON, InputConnections= OFF

That’s it. You should end up with a nice clean fbx with JUST the data you wanted in it.

hope that helps

Mark

Mark wins for 'taking the time" best answer award:)

Nah, just copied it off my blog! :wink:

When you post a concise answer like you did, you teach more than just the initial poster.

Thanks.

Thanks so much guys! Mark, I’ll try that out as soon as I get a minute here. That seems like the perfect method, since I need the export to be free of constraints and IK.

For some reason though, they(dev) wanted a DAE file, I don’t know why. It does beg the question: should I push back on this? :?: Both Mark and Tom seem to have suggested something that is only available in FBX options, not DAE_FBX. I know the DAE is readable as ascii, while FBX isn’t… Whats the functional difference between these formats that the export options are available in one but not the other?

Dae was designed more as a game engine transfer format. This method may well work with it as the actual FBX_DAE does a transfer to fbx format first, then re-encodes the scene graph into standard (ish) collada schema.

Thanks again for the help guys.

So I finally got around to trying this again today, and I seem to be having an issue with the exported file. When I open the file, there seems to be no animation.

I exported as FBX (when I try to use DAE, “input connections” is greyed out) and checked the “bake animations” and unchecked “input connections”. It does tell me the animations were baked but i can’t see them when i open the FBX in maya. :?:

[QUOTE=GearSpinner;7419]Thanks again for the help guys.

So I finally got around to trying this again today, and I seem to be having an issue with the exported file. When I open the file, there seems to be no animation.[/QUOTE]

Are you using 2011? I was experiencing some similar issues with FBX animation importing/exporting. Autodesk noted a few bugs with the Maya 2011 FBX stuff in how it handles animation. If you are using 2011, i would recommend testing with 2010 first. Otherwise, can you maybe attach a file we could look at?

Well, yes I am using 2011. Switching to 2010 isn’t really an option and unfortunately I can’t really pass out the file, since it’s company property. :wink:

I also checked mark’s blog and ran the command

import maya.cmds as cmds
cmds.select(type=[‘joint’,‘mesh’])

This gave me a syntax error. I also tried adding semicolons to these lines, but i got the same error. i am manually selecting the joint and the shape node for the mesh, which i think is what that command would do.

try selecting transforms:

maya.cmds.select(type=‘transform’)

I was running into an issue where importing a 2011 FBX would generate a hierarchy of animated nulls.

Actually looking at the post I made a error, selection type mesh will give you the shape objects back not the transform above it. Real pain that listRelatives has no clamp for parent transforms.

Even so, the fbx should have come through fine. Are you importing this data back into a fresh scene or trying to merge it into a current scene… I ask because there’s an issue with the latest fbx merge code.

Just updated the blog with new code that will, from a given skeleton root, find all child joints, and then go and find the skinned Geo for you and select the lot. :wink:

I spent hours upon hours looking up how to fix my problem (UDK was not picking up my IK animations), and it turns out it I was just exporting wrong… anyways, thank you for the info! WesHowe got it right, this will definitely help anyone who reads it.