PDA

View Full Version : Why do rotation values randomly jump positive to negative after baking?



Kevin Kipper
12-27-2013, 06:38 AM
Hi Everyone, I'm trying to retarget a motion capture file to a Nevronmotion rig. Everything looks fine until I bake the animation. If I look at the motion on the hips for example, I find that the values suddenly change from negative to positive in 1 frame. For example, frame 10 might be -172.31 and frame 11 will be 176.44. I've tried moving these frames back to one side (positive or negative) or the other but that doesn't solve the problem (and I don't know why that would be). These values are not in the original mocap data, it's introduced when baking out the motion. If I turn on Fractional Keyframes it's easy to see the object deforming incorrectly and if I render a frame with motion blur the results show the error as well. Attached are some images to help explain. Thanks for any insights on how to fix this.118943118944118945

xchrisx
12-27-2013, 09:27 AM
I believe it has to do with calculating angles. I have run into this many times before when baking out rotations (in Lightwave). Typically it can be fixed fairly easily by selecting the wrong keys and either adding 360 degrees if i remember correctly.

RebelHill
12-27-2013, 11:53 AM
Its how rotations are calculated for euler domains, its pretty common in most all 3d apps. What you'll wanna do is to filter the keys after baking using the euler filter in my anim tools pack here... http://rebelhill.net/html/shares.html

Kevin Kipper
12-28-2013, 09:22 AM
Thanks RebelHill & Xchrisx for both the explanation and the lscripts. I ran them on the offending bones and they cleaned up perfectly.

Ma3rk
12-28-2013, 10:34 AM
Ya, double thanks RH. Didn't occur to me that some of your tools would work outside of RHiggit. Assuming this would work on the AE-LW results as well?

M.

RebelHill
12-28-2013, 11:17 AM
Assuming this would work on the AE-LW results as well?

I guess, havent tried to know. The tools in there are general purpose tools anyhow, so should work for any number of different things.

Ma3rk
12-28-2013, 12:26 PM
... and it really, really works!

118968118969

Now, does it have an interface?

I got a motion options panel a couple times; seems like there was some modifier added, and then nothing other times. Tried again and it just blinks and graphs are mended.

M.

RebelHill
12-29-2013, 06:45 AM
Now, does it have an interface?

Doesnt need one... there are no options to be set.

hdace
12-30-2013, 06:51 AM
The RH tools are fantastic. I use them everyday. Don't know what I'd do without. Also found Motify (Mot-ify) recently which bulk-removes keyframes. Very useful for deleting tons of redundant kf's all at the same time. It's hidden away in Utilities/Additional. Never heard of it before. After converting a mocap job into an ik job using Rhiggit, you don't need all those bone kf's anymore.

Ryan Roye
12-30-2013, 10:08 PM
Something else you should note to save frustration:

When you record motion, DO NOT re-record over existing animation! Either "remove take on selected" on all items or create a new take. If you don't do this, you will notice after recording your figure will tend to snap to positions derived from earlier takes. This happens because recording skips keyframes in order to keep up with what you're doing. Always work on a clean track.

Ma3rk
12-31-2013, 12:05 AM
Doesnt need one... there are no options to be set.

Might be nice to know that something actually happened though w/o having to open the graph editor. Perhaps a Magic Completed message or such. Just a thought.

Ryan Roye
01-01-2014, 10:03 PM
I recommend this plugin (http://www.softgeometry.jp/lightwave/lightwave3d/pitchcorrection2/) for correcting flips like this. The advantage of this one is that it checks the motion curve before applying any operations, saving the worry of destroying motions and making corrections a simpler process; just right click the highest bone in the heiarchy, scan, and you're done... no scrubbing to find errors required.


http://www.youtube.com/watch?v=QXdpkzoB_OQ

hdace
01-02-2014, 12:03 AM
I recommend this plugin (http://www.softgeometry.jp/lightwave/lightwave3d/pitchcorrection2/) for correcting flips like this. The advantage of this one is that it checks the motion curve before applying any operations, saving the worry of destroying motions and making corrections a simpler process; just right click the highest bone in the heiarchy, scan, and you're done... no scrubbing to find errors required.


Looks good but I'm a Mac kinda guy.

RebelHill
01-02-2014, 06:13 AM
That plugin Im afraid is only good for correcting the specific case where the pitch winds backwards... it wont provide a per channel euler filtration to account for all the different possibilities.

Ryan Roye
01-02-2014, 08:14 AM
That plugin Im afraid is only good for correcting the specific case where the pitch winds backwards... it wont provide a per channel euler filtration to account for all the different possibilities.

You should try using the plugin before incorrectly claiming what it doesn't do. But hey, don't take my word for it... download some mocap or do some tests. It is superior in just about every way which is why I recommend it. You don't have to hunt the timeline for errors (hard to fix errors you can't see, like subframe flipping), and it won't destroy your whole animation if you run it across the entire character rig like with RH Euler. Shame it isn't available on macs though.