boolean operations on meshes

Software: Away3D 4.x

ender, Newbie
Posted: 09 January 2012 04:43 PM   Total Posts: 5

I’m looking for boolean operations on meshes dynamically. In the web are a lot of engines that supports this, but no one in flash.

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 January 2012 09:33 AM   Total Posts: 669   [ # 1 ]

+1

This would be awesome (and I’m English so I don’t use this term for everything smile

 

   

ender, Newbie
Posted: 10 January 2012 01:37 PM   Total Posts: 5   [ # 2 ]

I mean 3d Objects of course. I try to program this due to some algortihms in the web, but it’s not so easy.
In Version 3.6 there is the renderer INTERSECTING_OBJECTS. I think the way from this to boolean operations should not be too far, because of constrainded triangulation of the intersection objects is there already done.  The last step would be to check which triangles are to be selected and which not.

I am not English, therefore sorry for missunderstanding.

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 10 January 2012 02:01 PM   Total Posts: 669   [ # 3 ]

Hi ender, your English is perfect :O) Booleans on Meshes at runtime sure would be sweet.

I was referring to our American friends and their overuse of the word “Awesome”. For example, “I got 2 pickles in my burger”, “wow, that’s Awesome”.

 

   

nicoptere, Newbie
Posted: 14 January 2012 10:57 PM   Total Posts: 2   [ # 4 ]

hi,
I don’t have a solution unfortunately:/

I may be wrong but I think the QuadrantRenderer ( the one you mentionned ) splits concave meshes to render the occluded objects properly.

the problem is that the algorithm is performed on a set of projected vertices ; not on the actual 3D geometry. this would be awfully heavy to compute.

the only solution I can think of is to perform a triangle-triangle intersection test for each triangle of a mesh against all the triangles of the other.

if two triangles intersect, create and insert the intersection vertices, delete the vertices of the original triangles that are contained in the other mesh ( maybe this can be done with a point classification ), delete the intersecting triangles and rebuild 1 to 6 triangles per intersecting triangle and push the new triangles in the pool of triangles to test.

this is a tough algorithm to do smile
( just found this paper while writing )


antoher option if we use primitives is the Constructive Solid Geometry, some crazy guy ported this in javascript.

anyway, it would be AWESOME wink

 

   

ender, Newbie
Posted: 15 January 2012 11:21 AM   Total Posts: 5   [ # 5 ]

You’re right. It starts with intersection test between the triangles. Define new points for each intersected triangle, triangulate with Delaunay triangulation, check if intersection lines are included (constraints), ....  I try to implement this due to some explanations in the web.
I just wanted to know if there are intentions of the away-3d team to implement this feature.
I programmed the steps till the constrained Delaunay triangulation (but not checked clearly). I put an example of to cubes:

 

   

nicoptere, Newbie
Posted: 15 January 2012 01:07 PM   Total Posts: 2   [ # 6 ]

hi,
(nice example already smile )
not sure if the delaunay should be performed in 3D ; I think that, apart from the intersection tests, all the splitting operations can happen on the triangles’ planes ( = 2D ).

it’s only intuition but I think we could just skip the delaunay as the output configurations (1 to 6 new triangles / face) will always match the Delaunay criteria.
in fact the (one of the ) worst case(s) is to have a smaller triangle (like a needle) going throught a large triangle resulting in the creation of 5 new tris on the bigger face and 1 or 2 new tris on the smaller. even in that case, the 5 newly created triangles might be delaunay compliant ( empty circumcircles ). check the picture I attached, it seems to be delaunay compliant.

anyway, the more I think of it, the more complex it gets smile

 

   

ender, Newbie
Posted: 15 January 2012 01:25 PM   Total Posts: 5   [ # 7 ]

You’re right, that the the splitting operations are done in 2D. After detecting the intersection of two triangles, the axis where the normal has the biggest amount ist eliminated. After that the triangulation is done in 2D.

I chose Delaunay to be on the safe side. Maybe it’s true that all triangulations in this case match the Delaunay criteria. I was too lazy to think about it smile

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X