5
$\begingroup$

I am attempting to fill a cup with small capsules to create the effect of sprinkles sitting in a bowl. To do this, I have been using rigid body simulations to pour the sprinkles into the cup and then joining all the objects to create a single mesh.

Although the result (below) looks similar to reference photos, the sprinkles around the edges seem to avoid touching the cup. Is there any way I can fix this so that the sprinkles fill the entire container as they do in the real world?

Below is a sample render and screenshots which contain the rigid body simulation settings for the sprinkles and the cup (I don't think the funnel should matter).

Render: enter image description here

Cup: enter image description here

Sprinkle (same settings for all of them): enter image description here

Thanks for the help!

$\endgroup$
1
  • $\begingroup$ It looks like some of them are protruding closer to the cup - and some seem to be intersecting. Have you applied the scale (Ctrl+A, Apply Scale) to both the cup and the sprinkles? Is the sprinkle origin set to the centre of mass of the sprinkle? $\endgroup$ Jun 13, 2018 at 8:16

1 Answer 1

5
$\begingroup$

I believe your problem is due to the Collision Sensitivity Margin - although you shoul dalso ensure you always Ctrl+A, 'Apply Scale' on your objects (if you have rescaled them) prior to running any simulations.

I've replicated a similar situation to drop a multitude of small cylinders into a box :

with margin of 0.04

In the above image you can clearly see that the cylinders are separated from the surface. This is due to the default collision Margin of 0.04 on the Cube. The collision margin generally helps with generating a more stable simulation by providing a 'buffer' with the surface to prevent objects from intersecting. However, the default may be too large for some simulations - especially with objects at a small scale.

Here's the same simulation with the margin set to 0.001 :

margin 0.001

As you can see there is now no noticeable gap between the container and the cylinders.

Note that the smaller the 'margin' the closer objects are allowed to get before they are considered to have collided. However, the tooltip on the margin does suggest that better results are obtained when set to non-zero. Therefore, you should generally set it to a value for your scene that is just small enough to not notice a gap between colliding surfaces.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .