Split an 3d object dynamically !

Bd42813d07e215df9ebf50c3b1b7a1eb
0
sayajin 101 Jun 11, 2010 at 00:51

Hi all,

is there an algorithm for split a single 3d object into several other object dynamically ?

Thanks :)

8 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Jun 11, 2010 at 00:53

You’ll need to be more specific…how do you want to split the object? What kind of sub-objects do you want to extract? What are you trying to do? ;)

Bd42813d07e215df9ebf50c3b1b7a1eb
0
sayajin 101 Jun 11, 2010 at 01:13

Suppose I have an 3d Object, and inside that object i choose a point randomly. From that point for example i choose the plan in the X axis, that plan cut the object in two part (one upside the X plan and the other donwside the Y plan). That i want is to split that object along the X plan. But finally i could do that with any object 3D and any plan that cut the 3d object, even several plan !

B7dcbc0c0f07253f25ff5c25fe38c081
0
SamuraiCrow 101 Jun 11, 2010 at 02:55

I know of a program that does that for you called ParaView. It is used in medical and scientific applications. I wrote plugins for it at my previous job as a contractor. It uses a slow but very accurate OpenGL wrapper called the Visualization ToolKit. See http://www.paraview.org/ and http://www.vtk.org/ for more information.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jun 11, 2010 at 10:27

That’s basically what you would do thousands of times when you build a BSP tree.

First of all, don’t think in terms of the x, y or z axis. If you split a 3d object you need a plane. This plane could be defined by a normal and a distance along the normal from origo.

With triangles completely on either side, it’s trivial. But some triangles will probably intersect the split-plane. They need to be clipped.

Google will serve you from here…

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Jun 12, 2010 at 10:36

This goes under geometry tools, they are pretty tough unless youve done it heaps of times.

Its actually what im specialized at :) splitting triangles in 2, ive recently written csg for a modeller and it works perfectly.

254754b37f468a2926bffcd83bbbf1fa
0
z80 101 Jun 12, 2010 at 19:29

If you want to do it at render time (the term “dynamically” kinda hints that) it might be fairly easy to do in a vertex shader assuming you understand the method (which geon already explained).

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Jun 13, 2010 at 01:37

Also, if its dynamic and its only “visual” it might not be important to keep model integrity perfect.

If it was actually in a modelling program, then you would need to chop all the tri’s perfectly, but if its just visual, like (id imagine maybe youd like to cut a guy in half with a sword?) then if your repeating vertices, triangles arent actually connected it doesnt actually really matter and you could get away with a cheaper easier to write algorythm.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Jun 13, 2010 at 10:15

Hey I got another idea, if you want a visual effect, you could draw the model multiple times with culling planes knocking off the part of the model thats chopped off… you know how to do that? In direct x its easy.