Some of you may be familiar with the digital-tutors dynamics DVD. In there they show you how to write a script that attaches all your RBD objects together to allow you to have a multi-piece object remain as one piece until either a set frame or a set force acts upon it. Its a variation of dynamic_boy's attachator script except that it fixes each object to every other object (and isn't quite as tidy :) )

I have written out a similar script and made one or two changes to the original to make it a little more flexible (ie entering variable values at the top of the script instead of hunting through it, and allowing either breakable frame or breakable force automatic - the original was hard coded to only be breakble force)

Just playing with it now. As in the DVD, sometimes RF crashes. Just try again - oh and save your scene before you run the script :)

Ways to improve it?Adding another UI so that you can add a numeric value for either force of frame instead of having to edit the script directly.

hi!
ive also been looking thru that dvd and copied his script.
The problem I have though is that my project is slightly more complicated.
I have an object with over 500 shards. Idealy I would like it to have even more shards.
With that script it would generate 250000 constraints? (500x500, or how does it work?)
I let it run for a couple of hours and still only had about 4k of the constraints setup.

In the dvd he says something about there might be a way to use some form of distance object detection or such.

In the dvd he says something about there might be a way to use some form of distance object detection or such.

He'll be talking about writing a script that looks at the distance of your object to the shards, as well as their velocity and their distance to other shards. In other words, when your "breaking" object hits the shards nearest to it, they become dynamic, and the script looks at the velocity of those newly dynamic shards and if their velocity is over a certain threshold, shards nearest them become dynamic, so on and so forth until all objects that meet the conditions are dynamic.