BoolPro: A better mesh boolean


#21

:beer:

@Dansolo, I mixed the versions. I uploaded a new version of the plugin, please try it now.


#22

:beer: Yep worked straight away. Congrats and like others have said its great that it has history and can be animated.

:cool:


#23

Awesome work @zoharl! Glad to see Maya’s boolean work the way it should have from the start. :thumbsup:

I like what you have done here. However, I do have one request. Can you have the operation not triangulate the whole mesh? Perhaps have the triangulation happen only at the intersection of the meshes? I’m not sure if this would be an easy thing to do. I am no coder that is for sure, but it would make this plugin so much better. :smiley:

Btw, thanks for this!


#24

Nice one, thanks for sharing zoharl.


#25

Hmmm, I tried it on two primitives and got the below result???


Before script executed


After


#26

@ChewyPixels, in it’s current version curve lib supports only triangulations, so the output is triangulated. It’s future version might include a more general solution, which I’ll try to employ in this plugin. Also I considered to add as an alternative CGAL boolean ops. Although it is much slower, and demands a clean output, it supports a general mesh (the input doesn’t have to be triangulated), and it uses exact computation, which should be able to handle the trickiest cases. In a few days I’ll add this to the future work.
In the meantime we can consider a post processing step, which can remove new edges that weren’t in the original triangulation, if their incident faces didn’t change. The friends in the forum are invited to help me here.

@Hamburger, as I noted before, I welcome tricky examples that would help us know better the plugin limitations, but I’ll need two models (.obj or .fbx), and the boolean operation that you performed.


#27

Hi Zoharl, it’s just two cubes (run this code in blank scene):

polyCube -ch on -o on -w 1.082833 -h 1.082833 -d 1.082833 -cuv 4 ;
duplicate -rr;
move -r -os -wd 0 0 -1 ;
setAttr ā€œpCube2.rotateYā€ 45;

After selecting both cubes and running the script, it creates a corrupt copy of the two cubes:

This corrupt result happens with every object I try this so far, from complex ngon objects to basic maya primitives… some reason it’s breaking 100% - but this is the most basic example I can give.

Edit: Thought I might add, I’m on 2012x64 SAP. Also have those MS patches installed.


#28

@ChewyPixels, my mistake, carve lib does support polyhedra with general valence. I updated the plugin, please give it a try.

@Hamburger, please do the following:

  1. Download the new plugin with the topology preserving update.
  2. Check the script editor for errors, and the output window as well. In the output window the plugin reports the CSG operation that was made, so you should see a line such as:
Computing CSG 0, mesh1 has 8 ver, mesh2 has 8 ver
  1. Perform a sanity check of the following example:
polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1;
polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1;
setAttr "pSphere2.translateZ" 1;

  1. Please translate the resulting mesh (select polySurface1 from the outliner) away from the original objects, so you could clearly see the result. Please show me a wirefame of this scene (original objects and the translated bool result).

#29

Thanks zoharl, actually.

I was misunderstanding the workflow but after trying out what you said I get it now. Initially I expected the original objects to be deleted. But now I understand that its defaulting to ā€œUnionā€ and keeping the original objects. My mistake in the end!

BTW, the new update is very good. Thanks a bunch again.


#30

As others noted before, try to translate the source objects after the boolean operation.


#31

To the topology preservation, we added normal preservation. Please update your plugins.


#32

Looks great! I’ll be sure to give it a shot.

Thanks a lot for sharing. :slight_smile:

Cheers!


#33

Awesome! I will give this a try as soon as I get a chance.

Thanks @zoharl! :slight_smile:


#34

@zoharl - The normals preservation does not seem to be working for me. Here is an example:

Notice how I am getting messed up normals on the cutout area. I am using the latest build.

I also have another request. :slight_smile: Can you implement a UV preservation feature? This would be so useful!

Keep up the great work! :thumbsup:


#35

Some questions:
How should the normals be?
Do you have a simpler example?
Does a union of two spheres, one hard edge and one soft edge, work for you?
Can you share the problematic meshes?

Actually it looks fine to me, not what you wanted, but how it should be. The black surface on the intersection part has the normals pointing down, the same as the original surface that these faces came from. Do you have another algorithm in mind?
If I think of it, for intersection it make sense to invert the normals on the intersection part, but I need to consider if it covers all the cases. In your specific case, if you manually invert the normals of the to faces, does it produce what you want?

The UV preservation is in the future work along with vertex color preservation. But I’m not sure when I’ll have the time for it though.


#36

Invert the normals of the cylinder before the intersection, right?


#37

The normals are pointing in the correct direction. The problem is that the cutout area normals become messed up causing the polygons to turn black. Not a huge problem…since it is fixable by unlocking the normals on the mesh then applying a smooth/harden normals. :slight_smile:


#38

Anyone managed to install BoolPro into maya 2013 yet?


#39

it’s not compiled for it


#40

I am also interested in a 2013 compile (win 7 x64)…beers for whomever can find the time. Thanks,

-nb