How to Drop Models into a Container in Blender


In this article you'll learn how to use Blender's Rigid Body physics to fill a container with onions.

Pikkukuva

Preparing the Objects

First, make sure to separate your objects by switching to Edit mode, pressing P and selecting By Loose Parts.

Separating Objects by Loose Parts

Switch back to Object mode and set the pivot points to the center of the objects by going to Object > Set Origin > Origin to Geometry.

Setting Individual Pivot Points to Center


Adding Rigid Body Physics

Select the container and open the Physics tab. Add the Rigid Body and change its type to Passive and Shape to Mesh.

Changing Rigid Body Settings

Now, select one of the objects and add the Rigid Body to it. You can try different shapes to see which one gives you the best results but for now let’s go with Sphere.

Choosing Rigid Body Shape

To copy the Rigid Body and its settings to the rest of the objects, hold down SHIFT and select them, and lastly select the object that already has the Rigid Body. Go to Object > Rigid Body > Copy from Active.

Copying Rigid Body Settings to Other Objects


Baking the Simulation

Open the Timeline window and play the simulation. Stop the animation when you’re happy with the results.

Playing the Rigid Body Simulation

Make sure to have all the objects selected and go to Object > Rigid Body > Bake to Keyframes. Click OK.

Baking the Keyframes of the Rigid Body Simulation

Join the selected objects with CTRL + J. To remove the animation, expand the object in the Outliner window, right click its animation and choose Clear Animation Data.

Clearing the Animation Data

Select the container and remove its Rigid Body. Now you can select both objects and join them with CTRL + J.