View Full Version : Boolean Question

06 June 2007, 06:41 PM
I basically avoid booleans like the plague- but a recent job requires that they be used in Maya (without going into detail, it is an engineering issue and not an artistic issue... in other words, not my call). So- as many of you know- Booleans suck and tend to crap out if done too much or improperly.

My Question: How do you know when a Boolean will not work? Sometimes when I create a Boolean- the geo just disappears. I'm wondering if there is some rules about making Booleans- like "They only work with Planar geometry" or "check your normals". If you have some clue- please post. The more answeres- the better.

Booleans suck

06 June 2007, 09:05 PM
Used to think that way, too. But actually it's the other way around: Most of the times booleans get screwed because the artist ****ed up the model. Why? Because he didn't care what booleans are all about.

Don't know everything about booleans, but one thing for sure: CLOSE ALL YOUR OBJECTS BEFORE DOING A BOOLEAN OP!

06 June 2007, 11:43 PM
I hope the first post didn't make you think that I blamed computer engineers or "non" artists for issues I have with Booleans- or that I don't care about models- I mentioned engineering because the model I'm making has technical needs that can't be avoided. I basically just wanted to get across that a Boolean has to be used- I was trying to avoid answers like "don't use a Boolean".

Thank you for the advice. I believe that Booleans do fail in part to artist error- but I'm trying to figure out what those errors might be. To clarify- all models I boolean have normals facing out, quad geo, are closed meshes, have no faces with zero geometry area, have no manifold geometry, have history deleted. I run into problems when I try to Boolean models twice, which seems to be common to other users. When I create a second boolean to geo the model has triangles at that point... but that doesn't seem to be the problem, booleans tend to work fine on triangulated geo. There are some instances that the Boolean still doesn't seem to work- perhaps the clean up didn't go as I thought? Is it just ptoper model cleanup- or are there other errors that people can think of that I hacven't mentioned.


06 June 2007, 03:09 PM
I don't know a whole lot about Boolean, but I do know one thing: if you want to boolean multiple objects, like the six dots on a dice, you need to combine the 6 sphere objects (treat all 6 spheres as 1 unit), then do the boolean operation once.

I hear you, it happens to me too... my geometry disappears after booleaning...

06 June 2007, 03:44 PM

Thank you- that appears to be helpful in some sittuations. Any more advice is appreciated. The more answers the better.


06 June 2007, 09:07 PM
It's true, Maya's booleans are buggy. So were the the booleans in 3ds Max until recently.

It's a good idea to run the Polygon Cleanup tool before attempting Booleans on complex geometry.

The thing you need to avoid is nested booleans, where a boolean object is used as an operand in a subsequent boolean operation. This can very quickly lead to an unstable situation. Definitely combine all of your "cutting" objects, delete their history before doing the Boolean. Then delete the history again before proceeding.

06 June 2007, 09:13 PM
DrYo. Thank you as well for the info. So Max is better for Booleans- I will check that out. I do run a poly cleanup as you suggested, but thank you for your advice. I do have a question- what about creating a Boolean in geo makes it unstable for further Booleans? What gets left over in the geo that causes a boolean to fail a second time.... is it a node that can be deleted in the Hypergraph?


06 June 2007, 01:08 AM
The issue with nested booleans is simply that the code was written to handle two objects. If one of those objects has two objects inside it, and if one of those has two objects inside it, then things get very messy very quickly. There are so many dependencies involved that the software often barfs.

Deleting the history between boolean operations bakes the geometry, eliminates the dependencies and makes the barfing less likely.

06 June 2007, 06:29 AM
Thanks again Dr. Yo. I'm still troubled- because I have had instances when after deleting the history- I still get a poor result from multiple Boolean opperations- its like some form of corruption built in. Myabe I've already answered my own question and I need to open up the geo and look at it in the hypergraph.... it just seems like some left over node remains to constantly screw up further Booleans. Your answer was helpful- thank you.


06 June 2007, 07:08 AM
Yeah, we all get those issues with the geometry disappearing and having that second geometry model in there after the boolean allows for allot of really neat effects when playing with the translation of the objects booleaned in, making things disappear and reappear without any scripting involved. But the one major problem I've noticed is that if faces on the separate objects line up, the boolean will have the objects go bye bye . One thing you might try doing, if you already cleaned up and know everything is closed and verts are merged, moved the object over just a little, then boolean. Chances are the boolean will work, then all you need to do is move the object over by editing the history on the boolean. Thus achieving the bool you wanted. hehe bool

06 June 2007, 12:49 PM
i have the same problem here

i need live booleans (2 skinned mesh with a difference operation) and sometimes in the animation when i have no luck. i have a pop..

i simplified a lot the substract object to avoid the luck of coplanar edges and all. but you cannot avoid it all with this..

maybe we have an solution if you can detect the problem with a preframe script and then move a little bit the mesh. but i don't know how to detect warning in preframe scripts :)

06 June 2007, 05:29 PM
trancor and yznah, thank you- I appreciate the help. Trancor- I like your idea of using history and avoiding matching faces.


06 June 2007, 05:50 PM
This is from the Maya doc's. I find that in the situations where a user thinks that they have followed all of the recomendations and are still having issues then it usually helps to merge vertices with a small tolerance before the boolean.

Boolean operations may sometimes produce unexpected results if the original objects are not closed volumes, or if they contain nearly coincident vertices. Other conditions to note include:

The region of intersection should not contain border edges. You can display border edges by selecting Display > Polygons > Border Edges.
Avoid meshes that are non-manifold in nature. That is, an edge does not connect to more than two faces.
The normals on the meshes must consistently point outwards on the volumes. You can view the normals on a mesh using Display > Polygons > Face Normals. You reverse face normals using Normals > Reverse.
Before applying a boolean operation, fill any openings in the original objects (for example, use Mesh > Fill Hole), and then use the Merge feature (Edit Mesh > Merge) with a suitably small Threshold tolerance to merge vertices that are effectively coincident.
Ensure the meshes involved do not have zero area faces or zero length edges. Booleans operations do not work on meshes that have zero area (or very small) faces and zero length edges. Either enlarge these components or remove them.

06 June 2007, 06:17 PM
Thanks goleafsgo.

So- you do software development for Maya? First, let me say what a fine program you have developed, and I've always loved Booleans and the way Maya performs them. Okay- now- I have a long list of tools I need you to add. First, a flatten brush for the Artisan Sculpt Geometry Brushes. Second, a layering setup that allows for adding sculpted details to be added removed (like blendshapes). A setting for the move tool that aligns axis to selected face automatically (I know you can do this already, but I want it done without having to use the marking menu). A better system for uprezing down rezing models. :) Just kidding around- but I had to take a shot at getting some changes made (I really do want that flatten brush).

Thank you once again for taking time out to give me advice- now get back to work, I need you to make sure the obj importer is part of Maya and not a plugin. :)

06 June 2007, 06:33 PM
Anyone who is trying to do animated booleans in Maya is asking for a world of pain.

A couple more hints and tips:

1. Try to make the two operands have the same level of detail. You'll get better results if the polygons are approximately the same size on both objects. More divisions is better than fewer. If you enable the display of triangles from the boolean object's shape node you will see the tessellation... long thin skinny triangles are bad. Adding explicit detail to the operands can help a lot.

2. Oldest trick in the book: increase the scale of the objects. Larger objects results in higher accuracy (within reason). Not sure where the sweet spot is with Maya, but you can bet your last pixel that an object on the order of one to ten units will be less accurate than an object on the order of 100 to 1000 units.



06 June 2007, 08:03 PM
I don't know if this will interest anyone- but Trancor- you just saved my bacon. I was told to get a piece of geo ready before lunch so it could be used later that day in a shot- I had about 5 minutes to do it- high pressure, but plenty of time because all I had to do was a Boolean a cylinder thru the geo.... except it refused to work. I did many of what was reccomended here- clean geo, increase geo size, increase tessalation, check normals, check for open geo.... I even exported the geo as an obj hoping to rid itof any nodes that might be corrupting it- still no luck. Then I rotated the cylinder along its axis as Trancor suggested- sweet, it worked. So- thank you for all your advice- it has paid off (you will get nothing from me but credit and a thanks, meanwhile I get paid to do my job- no justice :)).


06 June 2007, 03:30 PM
Im glad that things worked out, there's nothing worse (well, there are.. but) than being pressured to perform well on a job and technology doesnt cooperate.

forums are awesome.

06 June 2007, 03:36 PM
on thing i learned form a max guru is to try to isolate were your goin to boolean so divide you model were your goin to boolean youll have less stray points an yea try to match the ploy count in that area. an eveything mention above


06 June 2007, 06:24 PM
deleting uv's beforehand may also help because maya considers uv's in the boolean operation. Which is nice. most programs just delete all your uvs. Maya tries to generate correct uvs....that could be a source for calculation errors, too.

just a thought.

06 June 2007, 01:43 PM
Unless it's a funky shaped boolean, I avoid them altogether. I just take the DT approach and add resolution using the insert egde loop tool. Process goes:

Make a rough shape of what you're trying to cut out.
Align it to the object you're trying to cut from.
Us insert edge loop to basically cut out a profile of the shape into the object (this also adds resolution so it holds it's shape better)
And then just delete the faces.

...I really hate Maya booleans.

CGTalk Moderation
06 June 2007, 01:43 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.