On 13/06/2013 06:13, Steve Pratt wrote:
Hi Guys,
thanks for this great tool Julian, and thanks to Olivier for the
sample scene that helped me get my head around it.
As always, I had a play around and thought I had it completely sussed.
Now a job has turned up and I can't quite get it to work with
instances. Whenver I add instance geometry the instances interpenetrate.
I've tried using the Instance Geometry node and plugging it into the
Add Point node and tried the Instance shape node plugged into the Init
Particle Data node, but with no success.
Not sure what I'm doing wrong.
Hi Steve,
Dart Throw only works correctly with a spherical shape, sadly. It has no
concept of the size of the instances on the particle it just assumes
they're spheres governed by the particle size. I've been working on a
couple of things recently in order to upgrade Dart Throw: the ability to
input a specific array of sizes so that only those sizes would be used
and a small script to add an ICE attribute to each instance group member
specifying a correctly evaluated minimum sphere that would 'wrap' the
instance geometry (which could be fed into Dart Throw's size array).
Unfortunately, even a good minimum sphere (c.f. the very approximate min
spheres in the SDK) can leave huge volumes of the sphere unoccupied
(typically with a long thin instance) so the 'packing' can look pretty poor.
With instances I'd recommend that you use a relaxation simulation
technique and actual shape RBDs i.e. spread your instances loosely
around the object you're trying to pack them onto and then apply forces
to them to 'push' them onto the surface, each frame using the post sim
region to stick the particle back to the closest location on the
surface. With low elasticity and bounce, eventually, the instances will
settle onto the surface and the native collision routines in the RBD
simulation will take care of interpenetration. Once you're happy with
the distribution freeze off the ICE tree.
Julian