I saw this image on Grayscale Gorilla and I know how to do this stuff in Cinema 4D.

But I have problems to recreate it in Blender. What is the best way to clone objects to a volume and push them apart, so they don't intersect with each other.

Is there a way to do it it with physics and rigid bodies?

enter image description here


1 Answer 1


There may be methods that doesn't require aniamtion nodes, I will test that later. but here is what I thought at the most beginning and has been proven to be working:

Theory: using locations of particles as a guide for rigid body objects to set in their places. The intersection will be prevented by rigid body dynamics.

  1. Add a particle system to a mesh. (This mesh and particles system should not be rendered at the end, you can just emit hallo or none. Hide the whole thing is also an option)
  2. Uncheck gravity options so that generated particles don't fall with gravity.
  3. birth should all be at 1 frame.
  4. set source type to "volume". Change the velocity acoordingly (0, since the point is not to emit particles but keep them in the volume of mesh)

enter image description here

  1. Finish modeling your "particle object" (preferably a single object). It can be "donut" or whatever stuff, add a rigid body dynamics to that. (Preferrably, you should also add materials at this stage. For reasons, please see the end of this answer)
  2. go to animation nodes panel, the tree should look like this. The principle is stated in the theory. Caution, a check in "copy full object" is very important, It copies things such as modifier, physics and material. Each time you add additional thing to the original mesh, and you want to update it to the instancers, you have to do that again.

enter image description here

Up to this part this is basically done. There are several additional points to that.

  1. if you want to randomize rotation or scales, use "random euler" (for rotation) and ["random number" + "vector from value"] nodes (for scale). ("Scale" is a vector, you can also use "random vector" for random number in each X, Y and Z. But by using random number + vector from value, X,Y,Z are uniform and I think this is what's expected most of time) enter image description here
  2. Due to rigid body, objects will firstly being pushed apart with a high speed. To pull objects back, easiest way I think is to add a force field, and set the strength to as negative as -1000 or even higher. You will see the effect that pulls objects back.

  3. Some issues to be cautious with. If you rechecked the "copy full objects" for whatever reasons, the originally instanced meshes won't actually disappear automatically (This is different from normal circumstances). you have to manually delete them. Since everything is generated within "AN collection", simply lock all other collection, and shift + A to delete all meshes in AN. Don't worry, as soon as AN updates, the expected meshes will be generated by the node tree again.

let me know if you have any question. for more information about AN, please go to mannual: https://animation-nodes-manual.readthedocs.io/en/latest/


You must log in to answer this question.

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