Combine polygon meshes using booleans
Boolean operations in Maya describe features that determine how existing shapes interact with each other. For example, you can use the volume of one shape to sculpt another. They can be very powerful for modeling shapes that would otherwise be very difficult to model using other techniques.
Maya provides three boolean operations:
- Union combines the volumes of the two meshes you select.
- Difference subtracts the volume of the second mesh you select from the first.
- Intersection leaves the shared volume of the two meshes.
Boolean operations are very useful for trimming objects.
Boolean operations generate a new shape node. If you keep construction history, the original shapes can still be selected in the Channel Box, Hypergraph, or Outliner and edited, with the boolean result automatically updating. You can even change which boolean operation to use to combine the objects.
To combine two meshes with a boolean operation
- Select the meshes.
For the Difference operation, select the mesh you want to subtract from first.
- Select one of the boolean actions in the Mesh > Booleans submenu.
The faces of the objects are now connected and both original meshes act as one single object.
You can select the original objects using the Outliner, Hypergraph, Attribute Editor, or Channel Box. As long as construction history is on, when you edit the originals, the boolean result updates automatically.
For example, you can subtract a sphere from a cube using the Difference operation, then animate the original sphere to create an interesting effect:
Troubleshooting the polygon boolean operations
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 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.
For example, to select zero area faces:
- Select the meshes.
- Choose Select > Select Using Constraints.
- Set Constrain to All Next
- Expand the Geometry and Area sections.
- Turn on Activate and set Min to 0 and Max to 0.0001.
- You can now enlarge them or remove the faces.
If you want to remove zero area faces or zero length edges altogether, use the Mesh > Cleanup feature to remove them prior to using the Booleans.
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.
Return to Autodesk Index