BoolPro: A better mesh boolean


#1

This node version superseded the boolop command (obsolete):

                                                  [http://forums.cgsociety.org/showthread.php?f=89&t=1028025&highlight=boolop](http://forums.cgsociety.org/showthread.php?f=89&t=1028025&highlight=boolop)
                                                  
                                                  By Zohar and friends.
                 
                                                  [u]Usage:[/u]
                                                  
                                        1. Download the plugin and put it in your %MAYA_HOME%\bin\plug-ins
                   (e.g. c:\Program Files\Autodesk\Maya2013\bin\plug-ins\).
                   
                   [http://svn.code.sf.net/p/mymayaplugins/code-0/trunk/boolPro/](http://svn.code.sf.net/p/mymayaplugins/code-0/trunk/boolPro/)
                   
                   The link includes the source and binaries for Windows Maya 2010-2014.
      Thanks to @sit10, we now have binaries for Mac x64 2012-2013.
                   
                   2. Load the plugin inside maya: Window> setttings/pref> plugin manager
                   
                   If the plugin doesn't load on windows you are probably missing vcredist, so install the one for your platform:
                    
                    [http://www.microsoft.com/download/e...ls.aspx?id=8328](http://www.microsoft.com/download/en/details.aspx?id=8328)
                    [http://www.microsoft.com/download/e...s.aspx?id=13523](http://www.microsoft.com/download/en/details.aspx?id=13523)
                    
                For more troubleshooting
                [http://forums.cgsociety.org/showthread.php?p=7277884#post7277884](http://forums.cgsociety.org/showthread.php?p=7277884#post7277884)
                
                   3. Select a few meshes.
                                        4. Run the python script 'connect_boolPro.py' (copy-paste to script editor) :
                                        [](http://%20https://sourceforge.net/p/mymayaplugins/code-0/8/tree/trunk/boolPro/)[http://svn.code.sf.net/p/mymayaplugins/code-0/trunk/boolPro/](http://svn.code.sf.net/p/mymayaplugins/code-0/trunk/boolPro/)
                     
                   5. Create a button shelf from the script.
                   
        
        Additional notes:
        
         - boolPro can accept more than two meshes, and it's preferable that way, since the inner data is kept as double precision, and thus doesn't suffer from the following limitation that can break a chain of booleans:
                                           
                                           [http://forums.cgsociety.org/showthread.php?f=89&t=1040477](http://forums.cgsociety.org/showthread.php?f=89&t=1040477)
                                                  
     To connect a new object to the node, first create a new item slot with the 'Add new item' button in the plugin attribute editor, then use the connection editor to connect the new object to the slot similar to the connections that are already there. See also the next note.
     
     - To setup the plugin manually (without the python script), see post #33 on:
     
     [http://forums.cgsociety.org/showthread.php?p=7568531#post7568531](http://forums.cgsociety.org/showthread.php?p=7568531#post7568531)
     
     It can be used, for example, to set the boolean operation before connecting complex objects to work on.
     
         - boolPro tries to preserve the original input meshes topology. Thus the meshes are not triangulated before the boolean op. In can of problems the first thing to do is to triangulate the input meshes.
                                                  
       - If the operation fails, first check the validity of the input meshes. Each input mesh should pass the Mesh> Cleanup with all the parameters on. If the problem persists please post here a link to your two meshes (.obj or .fbx).
  • Boolean operations are defined for solids. Thus, any input object should be watertight and with planar faces (preferably triangles). Whatever booPro does with other objects is magic, which might fail.

                                   [u]Limitations and future work:[/u]
                                                 
                          - Please send me compiled versions for your platform, and I'll add them.
            - Add CGAL boolean operations as an alternative to carve lib. CGAL uses exact computation, which makes is slower, but robust to the more trickier meshes.
          - boolPro preserves normals, and preservation of UV coordinates and vertex color should be added.
          - BUG: In a boolean operation (e.g. union) between two objects A and B, if A  is fully contained inside a face in B, then the face would disappear.  Temporary solution: refine the face (Mesh> smooth). See post #79 on this thread.
    
            [u]Changes[/u]
            
        28-Mar-2012: Added normal preservation
            27-Mar-2012: Added preservation of the original topology as much as possible (doesn't triangulate the meshes before the boolean op).

#2

this sounds really great, if it works as well as you say. :slight_smile:

would it be possible to get some kind of user friendliness? not necessarily a user interface but just simple commands. so you can just select the objects to be affected and then run the command or something? connecting it by hand isn’t really intuitive if you’re handling many objects at once for example. my knowledge of mel stretches only to the copy paste method. :wink:


#3

Mikael,

For you, done!

Select a few meshes and just run the script above ;).


#4

Added binaries for:

Windows Maya 2010-2012 win32 & x64

using my build all script:

http://forums.cgsociety.org/showthread.php?p=7274393#post7274393


#5

@ Zoharl, this looks very promising. For those of us who are less savvy with this, how do we install? I downloaded the .mll, now what?


#6

any chance to get a OSX build? thanks


#7

@Robosity, install the plugin like any other, e.g.

http://simplymaya.com/forum/showthread.php?t=26223
http://www.realflowforum.com/view_topic.php?pid=612

basically put it in your maya bin dir, e.g.:

c:\Program Files\Autodesk\Maya2012\bin\

Then load it inside maya: Window> setttings/pref> plugin manager

Then follow my usage in the first post.

@SePu, sorry my build script works only for windows. Please ask one of the forum members who has OSX.


#8

Sweet, thanks a bunch mate! :beer:


#9

hmm, when I try to load it I get this error message:

// Error: Unable to dynamically load : C:/Program Files/Autodesk/Maya2012/bin/plug-ins/boolPro_2012_x64.mll
The specified module could not be found.
//
// Error: The specified module could not be found.
//
// Error: The specified module could not be found.
(boolPro_2012_x64) //

which is weird, because this is exactly the place where I put your .mll file: C:\Program Files\Autodesk\Maya2012\bin\plug-ins

do you have an idea why this is?


#10
  1. I mixed the versions. Please download a new version.

  2. You missing some dlls. Please install:

http://www.microsoft.com/download/en/details.aspx?id=8328

If there is still the same error, please download depends:

http://www.dependencywalker.com/

Load into it the plugin, and tell me what dlls does it say you are missing.


#11

Ho, you probably need the x64 version:

http://www.microsoft.com/download/en/details.aspx?id=13523


#12

Great job zoharl! I just booleaned a high poly scan with a torus and animated it without errors or crashes. This is a godsend!

-shawn


#13

Good to hear, I’ll try to pass it on. I am also interested in examples that breaks it (two meshes in .fbx / .obj).


#14

great plugin zoharl. I’m glad that you created this out of the hilarious boolean thread discussion :beer:


#15

Hi,

Tried to use the 2010 x64 version and I got the
// Error: Unable to dynamically load : C:/Program Files/Autodesk/Maya2010/bin/plug-ins/boolPro_2010_x64.mll
The specified module could not be found.
//
// Error: The specified module could not be found.
//
// Error: The specified module could not be found.
(boolPro_2010_x64) //

Ran http://www.dependencywalker.com/ and it says

both
MSVCR90.DLL
and
IESHIMS.DLL
are missing.

Any ideas where I can get them from ?


#16

You don’t need IESHIMS.DLL, it’s in a yellow question mark. Strange that it reports MSVCR90.DLL, it should have reported MSVCR100.DLL. Anyway follow my usage step 2, download and install vcredist x64 from microsoft for vs2010. If it still complains try vs2008 which depends asks for:

http://www.microsoft.com/download/en/details.aspx?id=2092


#17

Hi again,

Nope that didn’t work either,
I already have vcredist x64 installed for vs2005, vs2008, vs2010.
I downloaded them again and all it gave me the option to either repair or uninstall.
Did a repair and rebooted. Still the same error in maya.


#18

Download loadLibrary64.exe from

http://svn.code.sf.net/p/mymayaplugins/code-0/trunk/loadLibrary/

Put it and the plugin in %maya_home%\bin.

Now let’s try to load the dll manually. From cmd run:

loadLibrary64.exe boolPro_2010_x64.mll
 
 or
 
 loadLibrary64.exe boolPro_2010_x64.mll initializePlugin

For each missing dll it complains about, locate it on your computer using for example:

http://www.voidtools.com/

and put it in the bin directory with plugin. Every complaint that you can’t deal with, ask me with the output of loadLibrary.

Which OS do you use anyway?


#19

Hiya,

In running windows 7 64bit.

Did that and it throws up some error about openmaya.dll

www.dbdigital3d.co.uk/Clients/boolerror.jpg


#20

Zoharl, you are the ****ing man! This works great! The thing I especially love about it is that it keeps the initial meshes, and I can change my result real time! Thank you so much for this :smiley: :beer: