27
$\begingroup$

I'm trying to create a bowling animation and I want the ball to hit the pins. I already added the Rigid Body physics to the objects but can't get the ball to move.

Obviously I could just add keyframes but

  • that seems to interfere with the Rigid Body physics
  • it doesn't look too realistic.

Is there a way to add some kind of motion to the ball?

$\endgroup$
33
$\begingroup$

Using keyframes is the only way I know of to do this currently, but you should be able to get good results by allowing the rigidbody object to be controlled by the animating system, then switching control back to the physics system while maintaining momentum gained from the keyframe animation.

This can be done by animating the Animated option in Physics > Rigid Body.
See the wiki:

The most common trick is to keyframe animate the location or rotation of an Active physics object as well as the Animated checkbox. When the curve on the Animated property switches to disabled, the physics engine takes over using the object's last known location, rotation and velocities.

Also see this post

For example:

  1. Enable Animated on your rigidbody object and inset a keyframe by right clicking on the check box and selecting Insert Keyframe:

    enter image description here

  2. On the same frame, add a location keyframe (or rotation if you want some angular momentum) to the rigid body object

  3. Go to a later frame and insert another location keyframe

  4. On the same frame, disable Animated and insert a keyframe by right clicking on the Animated checkbox and selecting Insert Keyframe again.

The motion from the keyframed animation will be carried over to the motion of the object as it is controlled by the physics system.

Result:

enter image description here

Note that while Animated is enabled the object will still interact with other rigid bodies, however its motion will be controlled by the animation system.

$\endgroup$
  • $\begingroup$ Is there any way to simply set the object's velocity at the first frame? $\endgroup$ – snapfractalpop Jan 26 '15 at 7:52
  • $\begingroup$ @snapfractalpop Not currently. $\endgroup$ – gandalf3 Jan 26 '15 at 7:54
  • 1
    $\begingroup$ Ok. I just tried your method, and I found that I needed to have at least two frames with "animated" checked. I guess that is needed to calculate momentum. $\endgroup$ – snapfractalpop Jan 26 '15 at 8:33
  • $\begingroup$ @snapfractalpop Yes, exactly. The object needs to be moving when the rigid body simulator takes over. $\endgroup$ – gandalf3 Jan 26 '15 at 8:37
  • $\begingroup$ It doesn't appear to be working. Can you give a .blend download so I can analyze what you did for that bowling ball example. $\endgroup$ – TheMinecraftMan757 Mar 26 '15 at 18:42
9
$\begingroup$

I have created an addon to make this process described by gandalf3 easier. It's called Projectile. Download it from GitHub. The download is for 2.8x, for a 2.7x version see this branch

To use it

  1. Select an object
  2. In the sidebar (N panel) there is a panel called Projectile. In the panel is a button titled "Add Object." Click to initialize velocity.
  3. In the Velocity Settings subpanel, set the velocity. By default, the operator will run each time a setting is changed.
  4. Then play the animation! You will see the object start with an initial velocity.
  5. There are many other settings like initial location and rotation, start frame, angular velocity, physics solver quality, auto updating, auto play, trajectory drawing. Experiment with the settings to get a good result.

For more detailed instructions see the readme on GitHub.

$\endgroup$
  • $\begingroup$ This is fantastic! Works as advertised. $\endgroup$ – Xavier Shay Jan 25 '18 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.