Copying animation from IK skeleton to FK null skeleton?

Discussions about animating in SOFTIMAGE©
Post Reply
User avatar
minilogoguy18
Posts: 110
Joined: 24 Dec 2012, 19:34

Copying animation from IK skeleton to FK null skeleton?

Post by minilogoguy18 » 27 Dec 2012, 02:54

Hi, I'm taking multiple game character animation files that were exported to dotXSI 3.x and using store action>copy clip method to transfer animation from each separate sequence file to a null skeleton that has no animations to make 1 massive animation bank file so that it can be recompiled to add some of the bones that were removed from the game that exist in the source animation files. Everything was going smoothly at first since all the files seemed to be FK null chains but I came across some that were IK chains and converting the animation over did not work because the roots and effectors were keyed. At first I tried exporting to dotXSI 3 and selecting the option to plot animations and convert to FK using nulls but it kept the roots and effectors. I know deleting the effectors wont affect anything but trying to remove the nulls from the hierarchy messes everything up.

Is there any way to copy that animation over properly? All of the bones of course have matching names.

User avatar
minilogoguy18
Posts: 110
Joined: 24 Dec 2012, 19:34

Re: Copying animation from IK skeleton to FK null skeleton?

Post by minilogoguy18 » 31 Dec 2012, 01:44

No one????

Still desperately trying to figure this one out, it seems only a handful out of 1119 are IK skeletons for some reason.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Copying animation from IK skeleton to FK null skeleton?

Post by Mathaeus » 31 Dec 2012, 02:02

if I understood correctly, all what you need to do is to plot rotations to bones, and set IK/FK slider to full FK.

RichardCulver
Posts: 34
Joined: 07 Jan 2012, 18:21

Re: Copying animation from IK skeleton to FK null skeleton?

Post by RichardCulver » 31 Dec 2012, 04:54

Not sure I fully understand this set up. But to add details to the above solution...

If you select any of the items in the IK chain, then select from Create or Animate/Skeleton "Key All Bone Rotations". This will bake the keys to the bones. Then the animation could be copied to the nulls from the bone rotation channels.

User avatar
minilogoguy18
Posts: 110
Joined: 24 Dec 2012, 19:34

Re: Copying animation from IK skeleton to FK null skeleton?

Post by minilogoguy18 » 31 Dec 2012, 13:45

Thanks I'll try that later after work.

To try to help explain, the 2d/3d chains as you know have roots that are the parent in the chain where as the null skeleton does not have roots and effectors in the hierarchy and the roots are affecting the transforms of the bones they are parent to so when I try to just do the store>action then copy>paste clip it skews everything on the null skeleton because the hierarchy doesn't match. All other names match though.

I need more than just rotation though, translation as well and that seems to be the biggest problem since the local translation of the bone in a chain wont be the same as a null in the same global coordinates.

RichardCulver
Posts: 34
Joined: 07 Jan 2012, 18:21

Re: Copying animation from IK skeleton to FK null skeleton?

Post by RichardCulver » 01 Jan 2013, 05:15

EDIT: This was a wrong solution so I changed it as follows...

I was wrong. You don't want to record bone rotations in this case. Record bone rotations will actually give you arcs where there were none with the effector and actually change the animation to an arc from linear once you switch to FK.

Also plotting I found does not work either.

This is an area that I may not know the most about in Softimage. But here is how I solved it with my knowledge. There may be a better way.

The problem I found was in getting the global trans to local trans. Because when you plot, it does not plot from global to local. If there is a parent driving position you won't get that recorded when you plot.

The only way I could get it to work was to use an expression. With the Global Transformations panel open on the bone (f3 Kinematics/Global Transforms) and the local trans open on the null (f3 Kinematics/Local Transforms) Drag the green box over from the global trans x for example to the local x trans of the null. This will give you animation on the null's local channel via an expression. Do this for all of the channels you need, mindful that they may not be the same from Global to Local on rotation for example so you might have to switch them out.

You can then plot this if needed using Animate/Tools/Plot (pos rot or all trans) for the null and it will remove the expression and leave the plotted frames.

Obviously there may be a more elegant way to do this. (Completely aside from ICE) but this works.

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Copying animation from IK skeleton to FK null skeleton?

Post by Mathaeus » 01 Jan 2013, 12:44

minilogoguy18 wrote:Thanks I'll try that later after work.

To try to help explain, the 2d/3d chains as you know have roots that are the parent in the chain where as the null skeleton does not have roots and effectors in the hierarchy and the roots are affecting the transforms of the bones they are parent to so when I try to just do the store>action then copy>paste clip it skews everything on the null skeleton because the hierarchy doesn't match. All other names match though.

I need more than just rotation though, translation as well and that seems to be the biggest problem since the local translation of the bone in a chain wont be the same as a null in the same global coordinates.
well, applying clips obviously won't work if hierarchy is not the same. I think there is a time for what's called shadow rig. That is, independent skeleton of nulls, having a different hierarchy than original, still with same proportions, constrained to original skeleton. If you want same names, you'll have it in under separate model. Shadow rig carries the envelope operator too. Hierarchy of shadow rig is exactly what you want in your game, let's say, only envelope carriers. Now you can plot constrained transforms on shadow rig, and export them. Local or global transform is what you were set by shadow rig hierarchy.
If your exporter is able to export only selected objects (usually, this means it's not FBX), you can keep the constraining connection all the time, even to save plotted local transform to action.
I've used what I described, since XSI 4 or so. There are small issues with this, you'll need to reset local orientation before each plotting ( to avoid some insane numbers of Euler angles, accumulated during previous plotting)- but I think that's all about issues.

User avatar
minilogoguy18
Posts: 110
Joined: 24 Dec 2012, 19:34

Re: Copying animation from IK skeleton to FK null skeleton?

Post by minilogoguy18 » 01 Jan 2013, 16:40

Yeah the game compiler actually takes dotXSI 3 so that's not an issue.

I'll read more about shadow rigs since I've never used them but I understand what you're saying. Hopefully this works out smoothly. :ympray:

EDIT: It worked! Thanks so much!

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests