I'm working on an animation where a ping bong ball rolls around the edge of a paddle then goes up the handle. I've been trying to create this animation with manual keyframes, but it's been tricky getting the ball not to glitch into the paddle. I was wondering if there is a way to simulate this rolling motion along the edge of the paddle and then bake the simulation. When I created the ball as an active rigid body, and the paddle as a passive one, then the ball simply falls off the paddle. enter image description here

  • $\begingroup$ You mean the ball should rotate on the yellow edge. $\endgroup$ – atek Nov 12 '17 at 7:45
  • $\begingroup$ How about using a path and a Follow Path constraint. You could use the geometry of the paddle as a basis for the path so that it matches. $\endgroup$ – Rich Sedman Nov 12 '17 at 10:23

Use the Shrinkwrap constraint to automatically move your ball down to the surface of the moving paddle.

Note that the Shrinkwrap constrain includes a 'Distance' property and this can be used to control the distance from the paddle. This will be fine if the target mesh is concave and fairly rounded but can cause the ball to intersect with the mesh for convex or sharp edges.

To address this we can create an additional mesh based on the original one but 'expanded' so the surface is at a specific distance from the original surface.

Duplicate the mesh and add a Solidify modifier. Set the Depth to the radius of the ball - but negative so that the solidify is outside ratehr than inside the mesh. This will produce rather 'square' results so to round the edges add a Bebel modifier prior to solidify. Adjust the bevel on the generated mesh closely match the radius of the ball.

NOTE : Using Solidify in this way will result in geometry of the 'expanded' mesh that exactly coincides with the original mesh. This can cause problems with rendering so it's a good idea to move the faces slightly so as to offset them. To achieve this you can simply amend the Solidify 'offset' by a small amount - eg, -0.98 rather than the default of -1.00.

final rounded mesh and Bevel and Solidify modifiers

Optionally add a Subsurf modifier to round any remaining edges.

Finally, use the 'expanded' mesh as the target for the Shrinkwrap constraint on the ball. Parent the 'expanded' mesh to the original so that it moves in unison with it (select the 'expanded' mesh, hold Shift and select the orignal mesh, Ctrl+P, Set Parent to Object).

shrinkwrap constraint

Now place the ball over the paddle and set up the Shrinkwrap constraint using Project mode in the -Z direction, setting the Target to the 'expanded' mesh. Moving the paddle under the ball should result in the ball following the surface of the paddle.

final result

For added realism you can animate the location and/or rotation (if using Local axis space) of the ball in order to change the position on the paddle and move the paddle (in real life the paddle would need to be moved towards the ball to 'force' it uphill). If animating the rotation of the ball to make it appear to roll on the surface then set the Axis Space to World Space so that the rotation of the ball does not affect the location of the shrinkwrap projection.

Blend file included

| improve this answer | |

If you want it to look naturally, physics might still be a good way. If just the ball wouldn't fall off.

Here's the trick. Instead of using the paddle, I am using a paddle shaped mesh that is much wider than the paddle itself. A simple mesh for the simulation, a beautiful one for rendering.

fake paddle

And instead of hoping the ball won't fall off, I am simply using two invisible boxes with zero friction. The ball has nowhere to go.


ping pong juggling

| improve this answer | |

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.