# Boolean SOP

## Summary[edit]

The Boolean SOP takes two closed polygonal sets, A and B. Set these Sources to the SOPs with the 3D shapes that you wish to operate on. There are two important requirements for input geometry:

- Shapes must be completely closed. A tube with open ends is not an acceptable input. You can close Tube ends with an end-cap. An extruded letter with no back polygons output is also unacceptable (even with backs output it can be unacceptable because of the second requirement).
- All polygons must be convex and coplanar. In the case of the Extrude SOP, you must select Output Convex Faces for front and back faces. It will now be a usable input for Boolean. The Divide SOP also offers a convexing function for geometry not created with the Extrude SOP.

Other caveats for Boolean are the following:

- Point colors and texture UV coordinates are not interpolated correctly.
- In some cases polygons can be reversed so that all normals point outwards. The polygon reversal should not usually present much of a problem (use a Primitive SOP > Face/Hull page > Vertex > Reverse to reverse them if necessary).

This SOP is quite visual and intuitive; you can experiment with the different combinations on screen to see the effects.

**Note:** The Boolean SOP handles polygonal geometry types. For boolean-type operations with nurbs and Bezier surfaces - see Surfsect SOP.

## Parameters - Page

Operation `booleanop`

- ⊞ - Some of the operations below produce guide geometry to give you visual feedback on the results of the operation being performed. The appearance of the geometry is context sensitive - if you are performing an intersect operation, or either of the edge operations the guide will be both inputs; if you are doing A minus B then the guide will be B and if B minus A then the guide will be A. If you are doing union then there will be no guide geometry.

If the guide geometry is too distracting, you can disable it by entering the Viewport options dialog and clicking on the Guide geometry button so that it no longer appears indented. This procedure is global and will disable the guide geometry of other SOPs as well.

The Boolean SOP will automatically orient polygons so they face the same way. This may not be enough in some cases because Boolean results in some unshared edges where the intersection cut took place. If the shading is still not good enough, you are best to follow Boolean with a Facet SOP. In it, Consolidate Points, Orient Polygons and finally Cusp.

If you have really strange shaped polygons, you can first triangulate one or both of the inputs with the Divide SOP.

- Union
`union`

- Geometry from the two inputs is combined, and interior polygons are removed. The result is a closed shape. This can be very useful for joining pipes or other shapes that the camera will travel inside, or where the intersecting shapes must be transparent. Points at the intersection of the shapes are not consolidated.

- Intersect
`intersect`

- The resulting geometry is a closed shape where the two input shapes overlap or intersect. Geometry outside the common area is discarded.

- A minus B
`aminusb`

- The result is a closed shape in which the geometry from B is cut away or subtracted from the geometry in A.

- B minus A
`bminusa`

- All operations same as previous three, but resulting shape is Part B with Part A cut away from it.

- A Edge
`aedge`

- Closed face(s) are produced, at the edges where the two parts meet. The face(s) can be twisted (not planar). The point order is unpredictable; append a Polygon SOP with the Order Points option enabled to sort them out if you want to make connections to the face.

- B Edge
`bedge`

- Closed face(s) are produced, at the edges where the two parts meet. The face(s) can be twisted (not planar). The point order is unpredictable; append a Polygon SOP with the Order Points option enabled to sort them out if you want to make connections to the face.

Accurate Attributes Interpolation `accattrib`

- If selected, all inputs are convexed to triangles, otherwise they are convexed to quadrilaterals.

* *

Create Groups `creategroup`

- If selected, a group is created containing all faces pertaining to the first input, and a second group containing all faces of the second input.

* *

Group A `groupa`

- When Create Groups = On, specify a name for Group A.

* *

Group B `groupb`

- When Create Groups = On, specify a name for Group B.

## Uses

- Cutting a 3D shape from another 3D shape.
- Joining a 3D shape to another 3D shape, removing interior polygons.
- Creating a 3D shape where two 3D shapes intersect.
- Creating holes or planes where 3D shapes intersect.
- Animating any of the above effects.

## Operator Inputs

- Input 0 -
- Input 1 -

TouchDesigner Build:

SOPs |
---|

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • |