Sign in to follow this  
MrPickle

Breaking up an object

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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this