Biped and some serious weirdness

So, I finally landed myself a job at a studio after 8.5 years in the simulation industry…

And, wouldn’t you know it, they throw one of the weirdest problems at me.

Nobody was using the right units when I got here. Each member of the art team was using different display and system units, so I’ve been trying to correct all of that by unifying the units across the board and doing some extensive external referencing to prevent any confusion. Problem is that Biped does not like being re-sized at all.

When I correct the biped’s scale, through all available methods… scaling, adjusting the height, merging into a scene with the proper units, saving out the .bip animation and loading on a rig of the correct scale, whatever… the hands and feet don’t match up with the old animation anymore. What’s worse is that the head and an extra bone end up getting offset in their positions.

I’ve scripted together a neat little solution to repair the offsets, and I’ve written something to fix most of the animations after the scale has been adjusted on the biped… but I’m stuck with a character that’s using planted keys on the left hand. No matter what I come up with, the planted keys are getting destroyed. The left arm flips and squirms like a dead octopus that just got salty soy sauce poured all over it.

First off, has anyone ever run into this particular issue, and if so, does anyone know any quick fixes that I’m unaware of? Why the hell would changing the overall size of a skeleton glitch up the animation to begin with? None of the bones are being changed in length relative to one another… 'bout ready to tear my hair out here.

Update: biped.SetTransform does not work as expected with a limb that’s using planted keys. biped.Get/SetTransform is supposed to give you worldspace transforms for those biped objects… but object-space keys don’t work well with using those methods.

Oh god, I’m sorry. Not much help to offer… though I’ve been through this exact scenario with maya. In our case, everything was stored as ascii, so we could modify the character scenes’ data with a bunch of regex patterns, then scale the fcurves in the animation scenes. There were always a few things to take care of by hand though (parent constraints for one-off props).

I wouldn’t have been able to do it without modifying the scene files externally, so if you’re running into problems you have to solve within Max… ugh. :expressionless:

I’ve spent some time pulling my hair out over the issue of scene scaling with a biped. Similarly to you, we had a script that worked pretty well, except for some object space IK keys we had in our scenes that were weirding out. I got around it a pretty clunky fashion by saving out the IK info (.ikspace, .ikJoinedPivot, etc) on every key, saving the anim data/bip out and then resetting this info back on it after the scene was scaled by our script. The elbow orientation still went weird so I also saved/loaded poses on each key, however this is reeeaaaallly slow so not recommended. A better way to fix this apparently would be to save the transforms out of the biped limbs to separate objects and then realign them directly through their transforms.

Yeah… That’s close to what I’ve been doing.

My animator is pretty particular about how some things are handled. Unbeknownst to me, even though on a MaxScript level it’s all or nothing, you can actually set individual bone chains on a biped to euler/quaternion, and he’s mixes the two. Ugh… So the worst part is that I can’t just save out the .bip because I don’t think it cares about euler/quaterion settings. If I don’t keep track of that info as well, I end up changing his animation curves on him, and he’ll be unhappy with me.

I guess the long and the short of this particular conversation is “Ditch biped, go to CAT.”

<snark> People who don’t bother to check the size of their scenes don’t get to bitch if rescuing their work destroys their settings </snark>

Have you tried exporting to something like BVH and reimporting to a correctly scaled biped? That will not preserver settings but it should preserve the poses.

I’ve tried saving out .bips, but not .bvh.

I guess I’ve managed to sort out most of the issues I have other than the fact that adjusting any horizontal_vertical_turning keys destroys the Euler curves (if there are any). Does anyone know of a way to access the curves? If I can just set keys to smooth as I make the adjustments, then this project would be done. I can find nothing in any documentation, and I’ve been looking for hours. Perhaps my Google-Fu is just not up to snuff anymore.

So far, I’ve got most of the animations corrected by saving out positions/rotations of specific bones and reapplying them to the properly scaled version of the same skeleton, and I’ve preserved everything about the animations that my animator wants to have kept… just those damned Eulers on the walk cycles keep getting their tangents set to “flat” and it’s causing awkward pops in the biped’s COM node.