explode a mesh in 3D objects

I’m a newbie in python scripts and I found a very interresting script in jms’s website : explode4.py
which allows to separate a mesh into faces.
But I was wondering if it wasn’t possible to separate the mesh into different other objects to make it more real.
If you know ways to make it, just tell me, please ! :wink:

As far as I know there isn’t a script out there to break the mesh apart in any way other than along pre-existing faces (That is to say, it doesn’t really change the existing mesh topography, it just seperates each face from the others) I too would love to see a script that could break apart the mesh into more random shapes with jagged edges and such, as well as extruding the shapes a bit so they have some thickness. (3DS max has a good example of a nice explosion tool) I can’t pretend to understand how difficult this might be to do in python though… Might be a pretty tall order.

-Trev

I’ve been thinking about doing such a script, but didn’t have time to go through all the mathematics needed for it.
Some idea for how the code could work>

add random inner vertices
Make delaunay triangulation(creates the smallest possible primitives - tetrahedrons from the object)
choose some groups of the tetrahedrons and make objects of them - so that the pieces aren’t too small.

pildanovak, sounds good. A choice (from - to) that reffers to the minimum and maximum number of polygons in each group would be use ful and give some control in randomnes. A polygon couldn’t be a part of a group if it shares only one vertex with other polygons. Just some first thoughts…

stamatis

Could you grab some of the code from the particle engine to do things like set the speed and rotation of each fragment? …might make things simpler?

-Trev

I made this explosion but it was done largely by hand, using the knife tool to cut the original into pieces

http://www.putfile.com/media.php?n=New_demo_pass2

VERY cool. Did you hand animate all the shards? Hmm, I wonder if somebody could make a script where the knife tool randomly add poly’s at odd angles to the mesh before it gets exploded.
-Trev

It’s a WIP. I hope to eventually melt the pieces and then reform them into some full 3d letters :).

I did not hand animate any of the shards. I used the new softbody properties and a fan on the pieces. So softbody allows the software to understand gravity effects. And the wind blows them towards the viewer.

The problem with the knife tool is that if you cut a cube, you do not end up with two solid looking pieces of a cube. You have to manually add the faces to each resultant part.

I was trying the same script explode4.py how did you get it working ???

It always says list index out of range…

Somebody pleaaasssseee help me ! :slight_smile:

try to read the doc …