Breaking up an object

Started by
5 comments, last by MrPickle 15 years, 7 months ago
How would I go about breaking up any 3D shape, from any point on the object? I want the shape to break up into random pieces. I have the all of the shape's vertices stored in a STL vector.
Here to learn :)
Advertisement
depends if you mean shattering or slicing.

if it's shattering you would be best to look up some research papers (afraid I can't help you there).

if it's a slice, i think defining the plane of the slice then doing ray->plane intresections with each line vector between two joining vertexes vs the plane would yield intersection points, which could then be used to define the new geometry. I don't think it'd be mathematically difficult (then again, I haven't tried), but it might be a bit of a fiddle to do in code (particularly joining up the two meshes properly could be some bother).

EDIT: Just re-read your post. So you're talking about shattering rather than slicing then? I gues 'random pieces' could be generated from a series of randomly angled slices.
It would be shattering, yes.
Here to learn :)
I know one of the new starwars force unleashed games uses this object shattering stuff for glass panes and so forth. That might be a start point (think they use a third party engine, but at least if you look into the games you can find out what it's called and maybe get a few useful terms to google).

Sorry I can't be more helpful.
I can only find stuff through google to do with 2D shattering.

I guess that you could shatter glass using a 2D method and then just extruding the points.
Here to learn :)
You can start by looking at Pixelux Entertainment for inspiration :-) I've heard other physics engines may be doing something similar soon (there are videos on YouTube if you look around). If you want information on coding it yourself then the term to search for is probably 'fracturing' rather than 'shattering'.
I think this might be along the lines of what I'm looking for

http://artis.imag.fr/Publications/2004/MGDH04/modellingShort.pdf
Here to learn :)

This topic is closed to new replies.

Advertisement