Introduction to Maya - Rendering in Arnold
This course will look at the fundamentals of rendering in Arnold. We'll go through the different light types available, cameras, shaders, Arnold's render settings and finally how to split an image into render passes (AOV's), before we then reassemble it i
# 1 29-08-2011 , 06:48 AM
Subscriber
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 27

Boolean Union deletes random faces

Hi,

I'm doing the tutorial with the jerrycan and something weird happened when I do the boolean union between the main part of the jerrycan and the top part where the cap goes. A bunch of small faces disappeared around my model and to do fill holes 50 times.
Any reason why this is happening?
user added image

# 2 29-08-2011 , 09:16 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
There area couple things that can cause the boolean to fail. Here is what I would recommend.

First the rules for boolean are the pieces must completely insect through a single surface.

The normals should be in the same direction (go to lighting and turn off 2-sided lighting).

It is not necessary but can help to run mesh cleanup on the two parts to ensure you have no non-manifold or laminar geometry.

Likewise deleting history on the two parts can sometimes help.

Do not be discouraged Maya boolean operation can be temperamental like this. If none of the above fixes the problem I would be happy to look at you file and see what is causing the boolean to fail.

Also although it should work if the parts are constructed as they are in the video I have sometimes had to join geometry manually and would be happy to make you a video to show how to do that. It's bascally a process of intersecting the parts and manually cutting edges around it, deleting the unneeded face(s) and then merging the verts. I used boolean because I wanted to demonstrate that is can be a time saver used in the right places with a minimum of mesh cleanup required.


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 29-08-2011 at 09:55 AM.
# 3 29-08-2011 , 09:20 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
Here is a bit more complete description of the rules for using maya booleans and possible reasons they can fail....

Boolean operations don't work as expected 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 very small faces and edges. Booleans operations do not work on meshes that have zero area (or very small) faces or zero length (or very short) edges. The boolean feature automatically checks for and removes very small faces and edges via the Use Thresholds option on the polyBoolOp node. This controls two threshold settings that determine whether small faces and edges are checked for and removed automatically during the boolean operation. The default setting is on.

- The Vertex Distance Threshold checks for zero length edges (or very short edges). Any vertices closer than the value specified will automatically be merged into one vertex.

- The Face Area Threshold checks for zero area faces (or very small faces). Any faces with an area smaller than the value specified will automatically be collapsed into one vertex.

NoteThe default threshold settings are a good starting point. If the boolean operation fails, you can experiment with the threshold settings to achieve best results. Increasing either the Vertex Distance Threshold or the Face Area Threshold on the polyBoolean node by too large a value will cause portions of the mesh to disappear.

Maya runs out of memory when using the boolean operations Using booleans on large polygonal objects is a memory intensive operation. Maya can run out of memory if this operation is performed many times on large polygonal objects.

To reduce the possibility of running out of memory, keep the undo queue length small or flush the undo queue every now and then when performing boolean operations on large polygonal objects.


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 03-11-2012 at 08:58 PM.
# 4 29-08-2011 , 09:24 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
Keep me informed if you are still having troubles and I will be more then happy to look at your mesh as well as show an alternative way to connect the spout to the can manually.


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675
# 5 29-08-2011 , 09:47 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
Oh wait! I just looked at you screen shot and know what is going on. The boolean join worked but random faces in the model disappeared. I have seen this, and it started with maya 2011 for me. Not saying it's a bug as it could also be associated with the graphics card.

1. reassign the shader to the surface. Another common new behavior that started in maya 2011 for me is the tool works but maya just randomly loses the shader attachment for random polygons in the surface. Without show border edges on I cannot tell if you have lost the polys or just the shader attachment. But as you are having to use fill hole you definitely are losing polys. You can grab all the edges in the model and hit fill hol but if some of the holes are adjacent then you'll have incomplete edge loops.

2. When you do an operation and faces get deleted I find there is only 2 solutions. One use fill hole and or append to polygon to rebuild the geometry or if it is just to many faces that go missing. You will have to attach the parts manually and not use the boolean until if or when autodesk fixes this bug (if it's a maya bug).

Sorry for all the extra info above but it is handy to have a set of the rules and fixes for maya booleans.


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 29-08-2011 at 03:41 PM.
# 6 29-08-2011 , 06:13 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Yes, just assign the shader again. That should fix it.


Imagination is more important than knowledge.
# 7 29-08-2011 , 07:51 PM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
I think he said in the post (and I missed it too) that the faces are actually gone and I have seen both behaviors where faces lose their shader link and where the faces are deleted. He said he had to use fill hole.

This behavior has only popped up in the last couple releases does anyone know if autodesk has commented on it?


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675
# 8 29-08-2011 , 08:35 PM
Subscriber
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 27
Yes it wasn't a shader issue, I've seen the shader issue before, usually by refreshing the view or re-assigning the shader it would fix but this time I had to use fill hole and even cut faces in some cases where to polys next to eachothers were deleted so I had to recreate the edge.
I've noticed that those deleted faces where located where the polygons where the smallest on the mesh, maybe there's a sensitivity parameter for boolean operations...

# 9 29-08-2011 , 08:42 PM
Subscriber
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 27
Thanks ctbram for all those info! Definitely useful!
I'll check my files tonight when I get home, I think I saved a copy just before doing the boolean operation since it can cause troubles later on. If I still have it (I almost finished the tutorial now) I 'll try again using your method and will let you know. user added image

# 10 29-08-2011 , 10:40 PM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
thank you Keld you are correct. Maya considers the face area of those polys to be 0 and is deleting them. This has always been an issue along with very close edges (co-resident vents). but in older version of maya both object disappeared rather then just the offending faces, so I guess you can say things are improving.

They added some options to control the distance and face area threshold but you can only get to them after you do the boolean. Here is a video that hopefully will explain it all. I did it just to have in my library for the next time I forget what causes this....

tip faces disappear after boolean - YouTube


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675
# 11 29-08-2011 , 11:58 PM
Subscriber
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 27
Man thanks so much for this video, indeed I'm a new member, less than a week and this forum rocks! user added image Going to test this tonight.

# 12 30-08-2011 , 04:51 AM
Subscriber
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 27

# 13 30-08-2011 , 05:41 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
TY Keld for the kind words and I am glad the combination of Distance and Area threshold sliders fixed the disappearing face issue.

This issue has been in Maya as far back as Maya 3.0; However, in the older version of Maya both objects in the boolean operation would disappear. It appears that Autodesk did update the boolean tool and now instead of both objects disappearing just faces go missing or shader to poly linking gets meshed up or both.

As both keld and my videos demonstrate these issues can be resolved by either unchecking the use distance and area threshold checkbox, or playing with their sliders. you can also remove offending control edges, boolean, and then cut the control edges back in.

The best approach however, would be to try and do your boolean operations before cutting in your control edges and bevels or any other very small poly or close edge details.

Again, thanks keld for your video and best wishes to you as you continue to learn to use Maya.

Cheers.


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 30-08-2011 at 05:45 AM.
# 14 01-09-2011 , 06:47 AM
Subscriber
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 27
So I'm reactivating this thread user added image as I'm still stuck on boolean but boolean difference this time...
Here is my model, I'm trying to make the holes in the lid thingy everything looks good but when I try to add some edges like the ones in red on the picture, the faces go all crazy around the holes and I can't connect anything. I've redone the boolean operation by deleting history, freeze tranformation and all but nothing works.
Attached is also my Maya file (2011).
user added image

and the maya scene:
https://dl.dropbox.com/u/9331552/dt/16_holes.ma

Thanks!

# 15 01-09-2011 , 08:33 AM
ctbram's Avatar
Moderator
Join Date: Jan 2004
Location: Michigan, USA
Posts: 2,998
yes you have a "hole" in the geometry (which is confusing because maya defines hole in 2 different ways). In this instance hole means you have a polygon inside another polygon but no connecting edge from the inner polygonal hole to the outer one.

Here is an explanation of what is happening and two work flows that demonstrate how to resolve the connecting edge to hole issue.

tip connecting edges to holes - YouTube


"If I have seen further it is by standing on the shoulders of giants." Sir Isaac Newton, 1675

Last edited by ctbram; 01-09-2011 at 05:58 PM.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads