View Full Version : Dynamics question
Hi!
I want to simulate a spaceship tumbling in space. I need to have the pilot slowly getting the ship under control, using the attitude control (vernier) thrusters of the spaceship.
This sounds like a job for the Dynamics module. I have been trying to figure out a way to use that module for this, but I haven't found a working setup yet.
Has anyone here done anything similar, or can point me to some tutorials which would contain a somewhat similar setup?
I also looked into building my own dynamics calculations using COFFEE, but that looks rather difficult as well, with all the Inertia Tensor Matrices that need to be inverted and converted from object space to world space and then multiplied by the angular momentum to get the new angular velocity vector etc.. :eek:
Pate
|
|
brammelo
08-07-2003, 09:48 AM
This sounds like a standard animation job. After all, it's just a spin you want to animate, which means you can easily do it with F-curves.
Cheers,
BaRa
Oh, I guess I forgot to mention that I want the animation to look physically correct, so a simple spin using F-curves is out of the question.
A non-spherical (and especially non-symmetrical) object does not rotate with constant angular velocity, as the the angular velocity is the product of the weight distribution (inertia tensor matrix) of the object and the angular momentum.
Some good descriptions of rigid body dynamics can be found here:
http://www.d6.com/users/checker/dynamics.htm
There is no problem getting the ship to tumble convincingly using the Dynamics module, it is the part where I need to effect forces like the thrusters would cause that is giving me problems. Any help with that?
Pate
imashination
08-07-2003, 01:54 PM
Originally posted by Pate
Oh, I guess I forgot to mention that I want the animation to look physically correct, so a simple spin using F-curves is out of the question.
A non-spherical (and especially non-symmetrical) object does not rotate with constant angular velocity, as the the angular velocity is the product of the weight distribution (inertia tensor matrix) of the object and the angular momentum.
Some good descriptions of rigid body dynamics can be found here:
http://www.d6.com/users/checker/dynamics.htm
There is no problem getting the ship to tumble convincingly using the Dynamics module, it is the part where I need to effect forces like the thrusters would cause that is giving me problems. Any help with that?
Pate
This Reeeeally is a case of standard animation. you're not colliding stuff, you're not using gravity and you don't want soft deforming objects, Dynamics has no possible use here.
If you were to use dynamics, you would also need to know, in real life, how to bring the ship back under control. I'll hazard a guess and say that you don't have any experience in flying fictional space ships.
Just pick a centre of gravity and rotate the thing. No film has ever used any physics engine to actually control a CG space ship, just animate it how you want it to act.
Originally posted by imashination
This Reeeeally is a case of standard animation. you're not colliding stuff, you're not using gravity and you don't want soft deforming objects, Dynamics has no possible use here.
That was what I was afraid of, as I couldn't find a suitable setup.
If you were to use dynamics, you would also need to know, in real life, how to bring the ship back under control. I'll hazard a guess and say that you don't have any experience in flying fictional space ships.
Hehe.. Strangely enough, I do have experience flying fictional space ships (about 10 years ago I programmed a 3D space game) :)! I was hoping using the Dynamics engine would allow me to experiment with controlling the ship...
Just pick a centre of gravity and rotate the thing. No film has ever used any physics engine to actually control a CG space ship, just animate it how you want it to act.
So, if I were to use a physics engine, my animation would be the first?! That actually sounds kind of cool, but I suppose you are right, I guess I need to at least look into animating the ship traditionally first.
Too bad, I was looking forward to playing with the dynamics module..
Pate
anobrin
08-08-2003, 05:16 AM
By all means go ahead and experiement with the dynamics module
but as MASH corrrectly stated without any collisions or gravity or soft bodies
the dynamics module wont assist you at all in this type of animation
it can be easliy accomplished with f-curves
Good luck:beer:
Thanks guys, I'll spend some more time looking at various possibilities and let you know what I come up with.
Pate
brammelo
08-08-2003, 10:06 AM
you could of course try to do it with TP and XPresso: a space ship engine can be simulated by letting it emmit particles, either in all directions or just in one direction. When they collide with the engine (exhaust) geometry, you can calculate the impuls it gives to the geometry. You can do that on a particle basis. Of course, this doesn't give you a center of gravity, but I would say: pick it by hand.
Cheers,
BaRa
Thanks for the idea brammelo!
I haven't done anything with TP yet, and your description went way over my head, but I'll look into that as well.
Thanks!
Pate
Cactus Dan
08-09-2003, 06:12 PM
Howdy Pate,
What about if you used non-rendering collision objects moving in the opposite direction of the engine's thrust and impacting the exaust port at the time of egnition? You know, opposite and equal reaction for every action.
Adios,
Cactus Dan
Sorry to revive this archaic thread, but I just had to let you know that I figured out a way to use the Dynamics module for handling the ship rotation!
It was not all that difficult in the end, after I suddenly thought of the correct approach. That took me several months, though. :)
You can see the test animation on my Snow Fall project pages, the direct link to the test animation is:
http://snowfall.patrickaalto.com/Thrusters.avi
It's a DivX 5.05 animation without sound, about 1.2 megabytes in size.
The scene file is very simple, if there is interest I might put that available for download as well. I'm not sure if anyone else has a need for these kinds of dynamics, though...
Pate
JoelOtron
02-08-2004, 03:33 PM
I'd be interested to see how you did this with the dynamics module, whatever you did worked.
However, this could have been more easily achieved (as mentioned ablove) with 3 nested nulls (H, P and B rotation) and some velocity curves.
I suppose its good that you foillowed it through your way though. I think you always learn a little more taking the long route (if you can afford it), which you can apply to other projects later on.
flingster
02-08-2004, 03:38 PM
nice, would have liked to see thruster plume extend the more power is used to slow the spin etc....dunno if technically correct but would look nice...:thumbsup:
Originally posted by JoelD
I'd be interested to see how you did this with the dynamics module, whatever you did worked.
Okay, I'll put the scene file available for download when I get home from work later today.
Originally posted by JoelD
However, this could have been more easily achieved (as mentioned ablove) with 3 nested nulls (H, P and B rotation) and some velocity curves.
I still think the way I did it was much easier.
With separate H, P and B rotation curves I could have achieved some kind of a rotation, but it would have required a lot of work to take into account the weight distribution of the object and figure out how this affects the rotation.
As you can see from my test animation (towards the end), even when applying only the Pitch thrust, the inertia of the object converts this eventually into Bank rotation (and later back into Pitch rotation and so on). This is caused by the uneven weight distribution.
I believe I would have had a hard time taking this into account using just three rotation curves. As I said earlier in this thread, I was not interested in just getting the ship to turn and rotate, I wanted to have it tumble realistically. :)
Pate
JoelOtron
02-09-2004, 04:54 AM
Cool
Dont go out of your way to upload the file, as I dont own the Dynamics module (used to use it at an old job though--mainly for hard body collisions and stuff). I was more interested in learning how it was achieved.
Thanks
Perhaps you could load the scene file (when I get it uploaded) into the demo version, if you want to see how it works?
Anyways, the principle was that I used Rigid Body Springs attached to suitable points in the ship mesh, and to a polygon object with zero mass at the other end.
The zero-mass polygon objects are children of the ship mesh, so they move with it. Now, when I change the local coordinates of the zero-mass objects, the spring creates a force that turns the ship.
Then I just added some Xpresso stuff to be able to control the H, P and B thrusters with simple User Data sliders, etc.
It really was surprisingly simple in the end, but still the solution eluded me for many months... :blush:
Pate
T3RMiN4T0R
07-15-2005, 05:18 PM
really sorry to bring this thread back from the dead but i was wondering if you could still post the file?
No film has ever used any physics engine to actually control a CG space ship, just animate it how you want it to act.
The team at ILM that designed the pod racers drove them with dynamics. So..technically they were not a "spaceship". Even the tearing of the metal and the scattering of parts was based on dynamics and not hand animated per se. They even built robots based on what they learned and set them loose on each other in matches that were driven by dynamics programming with a few rules.
Seems you would put the vector direction forces attached to objects rigidly attached to the main ship body and they would point their thrust at an opposite and equal angle that the ship was listing to based on the plane of stability.
best
BT
Bob3D
07-20-2005, 10:48 PM
Probably a bit late now, but I'm sticking in my two pence anyway. I agree that using a proper physics model would actually make it more difficult and complicated, and that it would be simpler and easier to treat it purely as an animation problem.
The point that ILM used physics for the pod racers may be valid but (and please correct me if I'm wrong) the impression I got was that physics was used for the crashes, so the pods would gib correctly and the bits would bounce around realistically. The actual movement of an intact pod racer 'flying' will have been purely animated.
The point about a spaceship not being animated using a physics engine is valid when you consider that we don't really know how a spaceship with a crew of 1,000, or some starfighter, would move. So it moves realistically within limits of it being a fantastical structure in the first place. For example, do we really know how an ogre would walk? It's made up!
Having said that, some fairly simple Newtonian mechanics, using impulse (from the RSC thrusters and their durations) and angular momentum, done on paper, might help with the tumbling. You'd also need to know (invent?) the mass distribution (and centre of mass). Give it an even mass distribution and put the c.o.m. in the middle (which it probably would be anyway) or you'll be stuck with hideous integrals, etc.
CGTalk Moderation
07-20-2005, 10:48 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.