BoolPro: A better mesh boolean


#41

Added, please test.


#42

Thanks zoharl

I will test it tonight.


#43

I’m testing this out and have run into a problem.
The scene is a cube with 2 cylinders subtracted. The original objects are white. I deleted history on the original meshes and setup the boolean before moving them. Raytrace reflections are set to 2.
In the top image, the cylinders are overlapping. The subtracted surfaces aren’t rendering correctly and we can see triangulation in them.
In the bottom picture, the cylinders don’t overlap, the top of the box doesn’t render, the outer boolean renders correcty, but the inner boolean renders dark. Any ideas?
Thx


#44

@EightBit - I think this may be an issue with the normals getting messed up after performing the boolean operation. I mentioned this to @zoharl before but so far no fix as of yet. :shrug:

Good news is you can manually fix the normals after the boolean operation since I encountered a similar problem. Try this:

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:

I hope this works for you. Otherwise, I’m not sure what the problem can be.


#45

That is a partial help, but isn’t a total fix.
I’m having better luck w/Maya’s Booleans.
Thanks for the reply.


#46

Hi @chewy, our discussion about this is just a few posts above. Actually boolPro does preserve the normals, but for the kind of operation you want, as I said, I believe the normal preservation is ill defined (mathematically / algorithmically). Meaning the result that you expect from the algorithm isn’t consistent for various inputs. Thus for this situation it is impossible do to anything until a better definition is found.
Actually this task is not even on the todo list, which unfortunately I don’t think I would have time to take care of, unless something really critical would emerge. But don’t despair, on the first thread I also published my code, and there should be some good people out there that can help. Also I don’t understand how autodesk didn’t get the hint by now, and bought carvelib and officially added it to maya.

@8bit, first if maya bool satisfy your needs, then by all means use it. This plugin intention was to fill holes, which the maya bool can’t fulfill, but no reason not to use them both.
Concerning your problem. First I see that you use textures, and uv preservation is still on the todo list, so you’ll have to set a new uv map after the bool operation. If uv mapping isn’t the problem (does it render well without texture?) then I guess there’s a problem in your geometry, so make sure that it’s clean. Beyond that, I I’ll need you to attach the models, and tell me the steps that you have taken to produce the results, and exactly where the problem lies, and I’ll try to look into it. If the models are as simple as in the images, then a script to build the models would suffice.

Cheers


#47

Some tips for building the plugin under OS X:

http://forums.cgsociety.org/showthread.php?f=7&t=1072917&page=2


#48

Oh my god.

I wish I’d found this thread before having to cut up my terrible awful mesh into chunks in order to boolean it bit by bit.

Thank you.


#49

Hi Zohar,

Sooooooo happy that I found this thread because I almost decided to do the same thing as you do!
But when I try to use your plug-in on my case, it fails…
In my case, there are two meshes overlapping each other at some faces. The result disappear when I use Maya boolean union.
It seems that when too many faces of the operand meshes overlap, Maya boolean fails.
Hopefully you can help me solving this problem with BoolPro!
Thanks a lot!

Daniel


#50

Yes, the function of maya boolean operation is to make the mesh disappear, and sometimes it has a bug and it does a boolean operation :wink:

A boolean op algorithm isn’t magic. For the algorithm to infer the shape, the data should be:

  1. Closed, water-tight surface.
  2. Manifold topology, preferably triangulated.

Having said that, I’ve seen some cases that carveLib (the core of boolPro) makes the most of it (some cases border on magic) and can cope with inputs that not necessarily follow the requirements. I wish Sergei (the author of carvelib) would publish the algorithm he used (maybe you can also contact him).

For you specific case:

  1. After Mesh>fill hole, boolpro was able to union the shapes, but I wouldn’t vouch for the resulting quality. The intersection was nonsense.
  2. Triangulation could never hurt.
  3. Try maya’s cleanup and MeshLab cleaning filters, so that your meshes would follow the requirements, and you won’t need any magic.
  4. If you don’t care about topology, you should reconstruct the meshes, e.g. try a filter of MeshLab such as Poisson surface reconstruction.

To summarize: You can cleanup a bit and massage your meshes, and hope for good, or you can do a decent job and follow the requirements, and then I would be surprised if boolpro fails.


#51

Hi Zohar,

Thanks for the reply!
I’ll see what I can do.

Daniel


#52

Hi Zohar,

Thanks for the this plugin!

I’m just wondering how to make a boolean difference with it.

Doing just like you said, I only can get an union.

Sorry if it is an idiot question, I’m a newbie with Maya yet.

Thank you one more time!


#53

Select the objects with the BoolPro node, go to the attribute editor, switch to the BoolPro node tab, and change the operation from union to difference.


#54

Oh! It works great! Thanks!


#55

Just wanted to jump in and thank you for this. I’m modelling a room that is geometrically complex and this script has really helped me out.

Here’s a preview of what I am modelling (I’ll post the finished room later)


#56

@WodenDigital, that looks nice (although I can’t estimate where you used the bool).

Thanks to @sit10, we now have binaries for Mac x64 2012-2013.


#57

Tried this and its working great.
Booled some complex meshes together, then just did a triangulation followed by a quadrangulation. Added a phong material and looked for shading errors: none.

Great plugin. Ill use this for work.

EDIT: I’m gonna make a MEL UI for it later… at least for my own personal use. If someone else wants it then I’ll share ofc.


#58

is it possible to have a 2014 compatible, thanks!


#59

Added.

@DeadlyNightshade, cheers. Please elaborate on the UI.


#60

Thanks pal!