I have an idea but i don’t know if it’s doable.
can we make a slider which can control the offset after we broke the model?
that could be a lot more convenient.
just a thought.
I have an idea but i don’t know if it’s doable.
can we make a slider which can control the offset after we broke the model?
that could be a lot more convenient.
just a thought.
ILM has a Voronoi shatter tool for Zeno that works based on 3D Volume Textures (like a crater in maya, volume noise, etc). Lays out the UV’s for all the inner pieces as well. Super robust and from what I remember, tweaking the texture also modifies how the cuts/shards look and feel.
Hey guys, the interface is shaping up nicely.
Actually, I think this is possible... all the 'cut' faces are already identified, so they only need to be moved along the face normal by some value. There would have to be a check for faces disappearing to nothing...
What is difficult with this set up , is moving the cell centres interactively. I've done it with just a couple of points, there is a scene posted way back in this thread that just uses an expression to figure the plane position. It would be nice to be able to do that with hundreds of points...
Another thing I'd like to do is have progressive cracking... cracks at one end of an object, but not the other, controlled by keyframes.
Probably what I'll do next though, is work on a 2d version suitable for things like breaking windows, earthquake cracks etc. Should be good for the nCloth coin trick the other Dave mentioned earlier:)
Dave.
Nice work guys looking cool. I’m messing with a script that can shatter multiple objects like if there is a few objects that all want the same shatter. or subtle differences in the same shatter. I’ll let you know if it’s worth a damn.
I can’t even begin to describe the joy I’m feeling right now…
THANK YOU, Azshall! And everyone that’s contributing to the BEST shatter I’ve ever seen in Maya!
Hey guys I dont know how far you plan on going with the script but it would be cool if it had a couple of tools that could do dynamic shatter sims.
I played around with the old script and had it shatter a rigidbody if there was a collision with enough force. It needs work, but basically it would save you from keying the visibility of the objects and the ignore state on the rigidbodies. Which is super handy if you want to do a couple layers of shattering.
http://www.youtube.com/watch?v=XRO2Qrsq_1s
http://www.youtube.com/watch?v=Yl0XX3KD1zY
I’ve updated the Destructor script with the help of agentfx… This version requires Maya 2009 to run as well.
Changes made were swapping out the classic particles for nParticles. Setting up self collisions on the instanced objects based on their bounding box scale, its a hack but works quite nicely. More stuff to come soon hopefully.
http://www.highend3d.com/maya/downloads/mel_scripts/dynamics/Destructor-5614.html
Damn, I didn’t see the rotational stuff you added to this one, I’ll have to go ahead and mod that to stick it in. I’ll also add a baking option so if you select an instancer node in the outliner and re-run the script it will give you the option to bake it to keyed geometry. I’ll make those changes later today and update it on highend.
One change that I made to the bounding box stuff was to instead use a float perparticle array attribute. I used the particle command to stuff the bounding box data into it so that you can just use it in the runtime/creation expressions like a normal attribute and not have to mess with a global variable.
great work guys!!!
I love new destructor!
thx azshall and agentfx 
i love you guys 
now the only thing it missing is simple runtime expresions something like in vmvInstanceObjects 
thx again!
cheers!
You guys are doing an amazing job with these plugins!
Thanks for putting your effort and time into them! =D
Sure thing, you can download it from this post. Just unzip it to your scripts folder, use the below code to be sure what folder that is if you’re unsure.
internalVar -usd;
Use this command within Maya to run it.
eval("source \"" + `internalVar -usd` + "seths/destructor/destructor.mel\"");
If you unzipped it to the proper scripts folder, the above command should execute it. Don’t move anything 
I’ve been away for a while, just read this thread… wow! Thanks for the script(s) davegreenwood, and other contributors, this voronoi shatter is very cool. I only just started to play with it this morning… does it create only convex shards if your original object is convex? (if so, that’s great for the Bullet and PhysX physics engines.)
Anyone have a best way to assign a physics mass to shards (given a reference base)? I tried computePolysetVolume, but it isn’t working well. For the test below I used the poly area (polyEvaluate -a) of each shard as a basis for its relative mass… Found the minarea and maxarea of all shards, then assigned a mass within a range (0.5-50 in this test) relative to each shard’s poly area. So the smallest shards have a mass of 0.5 and largest have a mass of 50.
It’s a very “standard” (sorry) quick test this morning with the voronoi script: a concrete wall hit. Voronoi shatter is well suited for rock / concrete it seems. Cuboid concrete wall (nice that the textures uv carry forward onto the shards) with directional point particle emitter very near the surface at the location of impact, spread 0.75. This emitter method works well in this case to create small shards near the impact and larger ones further… nice.
I used Bullet Physics for Maya (Dynamica plugin) for the sim (with each shard having a different mass, as explained above). While the plugin only scratches the surface of what the Bullet Physics engine can do, you’ve got to love that it is open source, multi-platform, and that they are working on an OpenCL branch for bullet. (BTW the latest source code for Dynamica has some constraints functionality implemented, thanks to Herbert Law). I just hope we can exploit more of Bullet from within Maya in the future, as a physics engine it’s pretty solid, and fast.
My quick test on Youtube: Voronoi shatter with Bullet Physics
Again, thanks for the cool script.
(Edit: another quick one: Nonconvex mesh Voronoi shatter with Bullet Physics test)
(Edit2: having fun: Exploding Sphere - using Bullet physics with Maya radial force)
Hi Sphere, yes this is the case. Also if you have a concave mesh you can easily sort convex from concave shards by checking the material assignment…
for volume… I don’t think it’s possible to calc the volume of an irregular shape from it’s surface area, but maybe it’s bounding box might be close enough for this? Certainly that would be a quick calculation. For greater accuracy, you might go for a object orientated bounding box, a bit of googling should help.
I see you are using bullet physics… I don’t seem to be able to find source code for the maya plugin. The google code site has the 2.75 libraries, but the maya plugs are just binaries. I’d like to (try to) compile 2.75 for maya2009 OSX. Do you know where it might be found?
Cheers
Dave.
Thanks for the info, I’ll check out those things… still thinking bounding box wouldn’t work for things with thin extrusions (e.g.: T, L, + shaped objects).
It’s part of the source code, it’s under: Extras > MayaPlugin. For best results get bullet-2.75-rc6 or later (if using SVN, you can checkout the very latest, at the risk of having WIP code).
Can you query contact information thru mel with bullet physics? If not, then I will just stick with PhysX. . .
You can get contact information from Bullet, but, no, just like PhysX, it’s not accessible through MEL yet (but you can always mod the plug-in ;)).