• Advertisement
Sign in to follow this  

Breaking up an object

This topic is 3420 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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'.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement