Rigid Body disappears - "-1.#IO"
I'm trying to make a very simple dynamic simulation with two objects. One is a passive rigid body that's
animated to rotate 180 degrees every 2 seconds. The other is an active rigid body that slides down the
edge of the first object, pulled by gravity, until it collides with the bottom of the passive body's
geometry. See screenshots. After 2 seconds (60 frames), the passive rotates 180, carrying the active
body with it, and then stops, at which point the active body slides down to the bottom again, pulled
by gravity. This process repeats several times.
Problem: After 1, 2, sometimes 3 180-degree rotations of the passive body, the active body begins to
misbehave in very strange ways. It doesn't always happen at the same time, either. The translate and
rotate attributes become "-1.#IO". I'm thinking maybe the floating point math is getting out of hand
and Maya is beginning to round the numbers, causing interpenetration? But in my very limited experience
with maya/dynamics, if that were the case it should just interpenetrate and throw a warning, not obliterate
the geometry, right? I have the Step Size and Collision Tolerance set to .001 for the solver. Maybe it's
a frame rate issue? I have it set at 30fps, play every frame.
Here is the project: 2767_simplemachine.zip, and screen shots are below for quick reference.
Any ideas are more than welcome. Thanks!
My first thought is: why use dynamics for this? It's a simple enough motion that you'd probably be further ahead to just keyframe it.
That said, after the sliding piece has 'disappeared,' what happens if you select it and press 'f' to frame it in your view? Does the camera fly off into space chasing it, or does it focus on an empty origin, or what?
I'm honestly not sure of the significance of those crazy transform values. You are probably right about it being a floating-point issue. If you look at the attributes in the Attribute Spread Sheet, do they look any different? It doesn't round the same way that the Channel Box and Attribute Editor do.
If you really need this to be dynamic, you might try using things like Barrier Constraints instead of relying 100% on precise geometry collisions. You might also try expanding the small space between the objects... it might be too close for Maya's tolerances.
I agree with you regarding key-framing vs. dynamics, but this case is somewhat of an exception. This little tidbit is just the basic building block for something that's going to be much larger and complex. This, along with several other dynamic meshes, will eventually drive many other moving parts in a much bigger "machine", and I need all of the movement, collisions and general physics to be as accurate as possible. To key-frame every little piece manually and make it look natural, AND keep up with what each part should be doing or not doing based on the state of other parts... just thinking about it makes my head hurt! :) If I can get the dynamics engine to cooperate, then all I have to do is make the machine, key frame one or two passive bodies to drive everything else, click 'Play' and relax while Maya calculates everything for me.
I just tried your suggestions... If I select the offending mesh in the outliner and try to frame it, it frames the bigger mesh exactly. Tried this in all views. As for the attribute spreadsheet, instead of "-1.#IO", it shows "-1.#IND" for the transforms. Interesting.
I'll experiment with the barrier contraints. Never used them before; I'm still a bit of a n00b. Thanks for your help, Steve!
PS. In my journey to figure this out, I have entertained the possibility that maybe Maya's dynamics engine just wasn't really meant for this type of simulation. As such, I'm wondering if there's something else I can use that's better-suited for more complex prototyping-type work. Whatever it is, it's an absolute must that I be able to easily and reliably import my work from it into maya, ie. make the contraption, simulate all the physics and bake it into an animation, import the goemetries and keyframes into maya, and let maya take it from there. I downloaded Invetor Pro 2011 (under student license). The marketing hype makes it look promising for what I want, but holy cow, maya's complicated enough and I'm finally getting somewhat competent with it - am I really going to have to learn a whole new solution??
Well, I'm sorry I don't have anything better to offer you at the moment.
I will say that your comment "all I have to do is make the machine, key frame one or two passive bodies to drive everything else, click 'Play' and relax while Maya calculates everything for me" makes me a little nervous. My experience with Maya's rigid body system is that as you start to have more and more parts interacting in a system, performance starts to degrade quickly. It's really meant more for chunks of debris flying around, I think, not elaborate Rube-Goldberg style machines.
Sorry, I don't know anything about Inventor Pro, and don't have any reliable suggestions for alternate software. RealFlow is supposed to have a good rigid body solver, as is Houdini. I've also heard good things about Softimage's recent dynamics engine. Not sure about other likely candidates.
If you stick with Maya, I still think you'll get better, more predictable, more easily adjustable results if you use a smart combination of keyframes, driven keys, and the occasional rigid body just for absolute necessities (like loose bouncing objects).
Good luck in either case!