Filling a container with Musli

HI. I modeled a yoghurt packaging that contains Musli in the lid/ plastic container.
I have a bunch of 3d musli bought at cg axis. I wanted to know if there is any way in Rhino to fit multiple amount of models (cereal, seeds, bla bla) inside the limits of my container without doing it manually.

I guess some kind of dynamics. Thank you very much.


It depends on if you are trying to recreate physically poring cereal in or just want to fill it visually?

The latter could be done in grasshopper in the mac WIP version.

Steps that I would take to do this in grasshopper:

  • Create a shape that represents inside area of container
  • populate shape with random points
  • create a bounding box for each cereal item and order them from largest to smallest
  • for each point, move largest cereals from Bounding box centroid to the random point
  • if the bounding box intersects container walls or another cereal bounding box then replace with the next largest cereal and repeat until either one of the cereals fit or none of them do
  • move to next random point

The random point array needs to be appropriately dense for this to work so might take some trial and error.

1 Like

i would do that with an external software you will also have it physically correct. in grasshopper you could also do that with kangaroo i guess but its a little more time consuming to set it up there.

to name one which is free like blender there are plenty of tutorials, its a matter of a few minutes to set it up. i use cinema for this but its the same workflow.

1 Like

Kangaroo for Grasshopper might work for you. I believe it does rigid collisions of arbitrary meshes now (cc: @DanielPiker). If your elements are roughly spherical, a simpler sphere packing is definitely possible.

1 Like

If it’s for rendering, and if you’re an Arnold, Maxwell, Vray or Blender user, you can use one of their scatter functions.

Thnks all, at the end I bought a musli block and erased the undesired elements.

It worked quite well. I use MODO I was researching this too, I believe its quite similar to the blender link sent by @RichardZ

Kind regards

I’m late to the party, but I use Blender and a simple gravity simulation to fill containers. I’ve been meaning to try to figure out how to do this with Grasshopper/Kangaroo, but it seems overly complicated, compared to Blender.