PDA

View Full Version : rigidBodies rotates 180dgr upon key to passive from active...


NEO^AMiGA
02-25-2007, 01:50 PM
Is this normal? My rigidBodies (not all but out of 100 it's to many to be acceptable) flips 180 degress on some or all of the three axis. Most often it is like 180dgr but i noticed that somtimes the Y-axis flipps with some other value. On attached picture one of the object who's keys have been baked are displayed alongside with the anim curve for the active/passive attribute. The problem is there before it's baked no it's not a bakery-problem. =)

I'm not so into this whole gimbal-story but from what I can remember of it this problem seems like some sorf of gimbal-related issue?

Screenshot...
http://www.irry.com/neo/bilder/temp/3d/180key.png

Simulated and baked on 64 bit Maya 8.5 in WinXP SP2 (the screenshot is taken at a later stage on a linux box).

Sphere♥
02-28-2007, 01:02 PM
Internal rotation calculations are often performed using unit quaternions (Quaternion math). This allows for fast smooth interpolated rotations using 4D math (no gimbal issues). The math to convert quaternions back into 3D Euler rotations (for Maya keyframes) produces correct Euler equivalents, however without consideration for 3D interpolation. Mostly bad for motion blur, Nima PhysX for Maya suffers from this, but I thought Maya's own engine worked around this. Perhaps this is your issue?

NEO^AMiGA
03-05-2007, 08:31 AM
Hmm... It might be, it might be. The problem is that since i never sets any keys on the rotation (...since it's a dynamic simulation) I can't simply select the rotation curves and change the interpolation. =/

Just sent a file for alias to look at. I'll get back to you guys when i hear from them.

Internal rotation calculations are often performed using unit quaternions (Quaternion math). This allows for fast smooth interpolated rotations using 4D math (no gimbal issues). The math to convert quaternions back into 3D Euler rotations (for Maya keyframes) produces correct Euler equivalents, however without consideration for 3D interpolation. Mostly bad for motion blur, Nima PhysX for Maya suffers from this, but I thought Maya's own engine worked around this. Perhaps this is your issue?

NEO^AMiGA
09-18-2007, 07:09 PM
O darn... Here I am again. same problem different day. I submited this as a bug to Autodesk. I attached scenes and even just scripts so they could reproduce the problem. Unfortnually their support ain't like you guys. To be honest... That dude seemed clueless and I got the impression he never understood the problem. After a while they closed the case, probably out of lazyness. =(

Anyways... Now I'm back with the same problem. But in bigger scale. Noticed that the first post contained a dead link so attached is a screenshot of the problem. This is a baked Nima simulation. WHen the object is supposed to rest it turns 360 degrees causing spikes in the curves. Devestating when outputing vector fields. =( Anyone seen a script around for fixing this? WIll start to make my own now. =( Things like this really makes me hate my job.

cosm0naut
09-18-2007, 07:59 PM
just use the euler filter, this will correct the curves.

it's in the graph editor: curves > euler filter

NEO^AMiGA
09-18-2007, 08:00 PM
Nothing happens when I use it? Thought that would help to. Then I though that maybe that works only on non baked curves or something?

Edit. It works when doing it from mel. Though with some varied results. WIll try it out a bit more. Will probably save me some time. Thanks dude. Funny that alias didn't just say this to me...? =)

just use the euler filter, this will correct the curves.

it's in the graph editor: curves > euler filter

NEO^AMiGA
09-18-2007, 08:18 PM
Mkay... So this will probably be good enough for me. Out of 300 curves I can only see an error on one. That's good news. =) And that spike that's still there might be some leftover since the dynamic simulation. Is there some spike removal command to? =)))

I used this now:



int $i = 1;
while($i < 101){

filterCurve ("polyCoin"+ $i + ".rx") ("polyCoin"+ $i + ".ry") ("polyCoin"+ $i + ".rz");

$i++;
}


Thank you autodesk for not even beeing close to meantion this when I opened the support case. =/

Sphere♥
09-19-2007, 05:14 AM
Damn, I needed that a while ago... thanks it'll come in handy in the future!

NEO^AMiGA
09-19-2007, 05:20 AM
Yeah! This is acctually a lifesaver. The sad thing is that I had tried that command in the graph editor but never got it to work. But now when i use it in my script it works. I even tried it the first time I had the problem. Then I had to fix it all manually. Pretty crazy. =)

And this time I started to code on a script that coul step through the curve and compare two keys, $i and ($i + 1). And if my user set threshold was to big it would copy the key at $i to ($i+1). It would probably have worked but I'm glad I didn't have to put so many hours into that. Hehehe. =)

Have anyone seen the formula that the Euler filter uses? Kinda curious about the math behind it. Looked at wikipedia but didn't find anything that I could connect directly to a Euler filter.

Damn, I needed that a while ago... thanks it'll come in handy in the future!

CGTalk Moderation
09-19-2007, 05:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.