Sign in to follow this  

Splitting a 3D model with respect to angle of cut

Recommended Posts

ionosphere    122
In 3D Max Studios, I recalled there is a function (I couldn't recall the name of the function, sorry) to cut a 3D model into two. For instance, you create a sphere, then you cut it in the middle, leaving 2 half spheres. Now, how about a human body? Imagine a samurai cutting up an enemy at the stomach, now that enemy's model will become 2 models: one is the upper part from head to stomach and another is the lower part from stomach to feet. Also, in order to prevent the player to see inside the cut model, an extra polygon will also have to be placed into both models. (and preferably, add blood texture in this polygon to give an impression that this is the blood inside the body) Sorry if my explanation is poor, do you understand what I am trying to say?

In 3D Max Studios, we can do above. Now, 3D programming-wise, what do I have to do if I want to achieve something like this? Sure, one cheap method is to have the cut models pre-made, but this is not realistic.

I am looking for a way to cut a model into two with respect to angle of cut in real time. Is this possible? What subject should I look into?

Share this post

Link to post
Share on other sites
karwosts    840
Sure it's possible, but its probably not easy.

I'd just imagine you would define a plane that describes your cut, test all the edges in the mesh against the plane, and find any intersections.

For each edge that intersects, you'd have to destroy that edge and replace it with two new edges, destroy each triangle that touches that edge and recreate it based on the new vertices that you've created. Then you'd have to create new polygons to fill in the hole, I guess you could create a triangle fan that connects all of the new vertices, though that will probably have some bugs if you say cut off two legs with one plane, so you'd want to create two separate capping polygons, not totally sure how you would do that though.

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