From BlenderWiki

Jump to: navigation, search

Boolean Modifier

Mode: Any mode

Panel: Modifiers (Editing context, F9)

Exclamation mark.png
This document section describes the two ways to perform Boolean operations in Blender: The “old way” (Boolean tool) and the “new, improved way” (Boolean modifier). In practice, the modifier is by far the more useful today, because of the characteristics that all modifiers share (and which “old way” boolean operations do not):
  • Modifiers have a true user-interface. It’s immediately obvious which object is being affected by the operation and which (other) object is the source.
  • If you don’t like what you see, you can re-arrange the modifiers in the stack to change the order in which the modifiers are applied. Or you can remove or disable them, and so on…
  • Like all modifiers, boolean modifiers can be selectively “switched on” and “switched off”.

In other words, modifiers (alone) offer non-destructive editing. When you use modifiers, you haven’t done anything irreversible to your model until (and unless) you choose to make the modifiers permanent by “applying” them.

Procedure

  1. Place two objects overlapping each other.
  2. Select one of them
  3. Add a Boolean modifier to that object.
  4. Select the type of operation to be performed from the Boolean operation menu at the bottom of the panel. It defaults to "Intersect".
  5. Select the object to perform it against next to the operation menu.

Description

This sub-panel appears in the Editing context panel group which is accessed using F9 or clicking Manual-Part-I-Interface-Context-Editing.png button in the Buttons window. It is part of the Modifiers parent panel. For further information about the common panel components see the Interface section on modifiers.

The downside of using the direct boolean commands is that in order to change the intersection, or even apply a different operation, you need to remove the new object and redo the command. In contrast, one can use a Boolean modifier for great flexibility and non-destructive editing. As with all modifiers, the booleans can be enabled/disabled or even rearranged in the stack. In addition, you can move the operands and see the boolean operation applied interactively in real time!

Caution
If the objects’ meshes are too complex you may be waiting a while as the system catches up with all the mouse movements. Turning off display in the 3D View in the modifier panel can improve performance.


To get the final, “definitive” object from this modifier (like with the direct boolean tools) you need to “apply” the modifier using the modifier’s Apply button, and to see the result you need to move the remaining operand away or switch to local view / NumPad. Until you apply the modifier, the object’s mesh will not be modified. When you apply the boolean modifier you are notified that any mesh sticky information, animation keys and vertex information will be deleted.

Warning
There is an important difference between using boolean tools and applying a Boolean modifier: the first one creates a new object, whereas the second modifies its underlying object’s mesh. This means that when you apply a boolean modifier, you “lose” one of your operands! Make a duplicate (⇧ ShiftD) of the object bearing the modifier, if you want to keep an “original” version.


However, you may not want to apply your Boolean modifier: it is indeed a very nice tool to perform some animated effects/deformations, as it is re-evaluated for each frame. This allow you e.g. to have a sort of “force field” deforming around an object when this one penetrates it (see example below). Note that you can set objects to be invisible on render, which might be very useful with one of the operands of a boolean operation!

From Blender 2.49, Boolean modifiers need no more to be at the top of the modifiers stack. This was quite a heavy limitation, as it meant that you couldn’t use more than one Boolean modifier at a time on a same mesh, and that you could only work on “raw” mesh data (i.e. couldn’t use e.g. the result of a Subsurf modifier as a boolean operand – unless you applied it first, of course).

Now, you can place a Boolean modifier where you want in the stack. You can also have multiple Boolean modifiers on the same object. And last but not least, the “second operand” object (the one you enter the name in the Ob field of the modifier) will also be used “all-modifiers-applied” (e.g. you can use its subsurfed form).

Warning
All these new possibilities are great. But be careful: the boolean operations are still a complex process, which may take a very long time to complete on operands with many vertices. So take attention to all modifiers placed before the Boolean one, especially to Subsurf ones!


Options

Modifiers panel with Boolean modifier activated.
Operation
This drop-down lists available boolean operation types (Intersect, Union or Difference).
Ob
The name of the object to be used as the second operand to this modifier.


Examples

Intersect

The cube and the sphere have been moved to reveal the newly created object (“A”). Each face of the new object has the material properties of the corresponding surface that contributed to the new volume based on the Intersect operation.

Before Intersect.
After Intersect.


Union

The cube (“A”) and the sphere (“B”) have been moved to reveal the newly created object (“U”). “U” is now a single mesh object and the faces of the new object have the material properties of the corresponding surface that contributed to the new volume based on the Union operation.

Union example.


Difference

The Difference of two objects is (as the “standard” subtraction) not commutative in that the inactive object minus the active object (behavior of this operation) does not produce the same as active minus inactive. The active cube (“A”) has been subtracted from an inactive sphere (“B”), and both have been moved to reveal the newly created object (“D”). “D” is now a single mesh object and the faces of the new object have the material properties of the corresponding surface that contributed to the new volume based on the Difference operation. D’s volume is less than B’s volume because it was decreased by subtracting part of the cube’s volume.

Difference example.


More complex examples with Boolean modifiers

Multiple Modifiers

The process to model the complex object shown to the right.
A complex object modeled using multiple Boolean modifiers.

(The process to model the complex object shown to the right) illustrates how to model quite a complex mesh object, using only three basic forms, and several modifiers. As usual, click on the picture to enlarge.

(A complex object modeled using multiple Boolean modifiers) is the result of this modeling process. You can download the demo blender file here.

Here is a video showing the new Blender 2.49 workflow:

Animation

An animated boolean deformation.

(An animated boolean deformation) shows some key-frames of the boolean-deformation of a “force field” sphere penetrated by a sort of space swallow. It tries to demonstrate the possibilities of Boolean modifiers in animations.

The schema of the effect.

(The schema of the effect) summarizes the key points of the boolean-deformation effect. There is one small trick here: one of the boolean operands (“SpaceShip_ext”) is not rendered (the third toggle control, at the right of the Outliner window, in Outliner display), which allows us to keep the “FField” surface a bit away from the real “SpaceShip” (else, we would have a lot of artifacts!). “SpaceShip_ext” is a linked-duplicate (AltD) of the “SpaceShip” object, just slightly up-scaled and parented to the “original”.

You can download the blender file here.

And here is the complete video of this anim (Media:manual-modifiers_boolean_exvideo.avi):


Technical Details

Visible normals.

The boolean operations rely heavily on the surface normals of each object and so it is very important that the normals are defined properly and consistently. This means each object’s normals should point outward. A good way to see the object’s normals is to turn on the visibility of normals using the Mesh Tool More panel (Buttons window, Editing context – F9) and clicking Draw normals. The normals are only visible while in Edit mode. (Visible normals) is an example of a cube with its normals visible.

In the case of open objects, that is objects with holes in the surface, the interior is defined mathematically by extending the boundary faces of the object to infinity. As such, you may find that you get unexpected results for these objects. A boolean operation never affects the original objects, the result is always a new object.

Warning
This is not true with the Boolean modifiers: when they are applied, they modify their owner object, and do not create a new one!


Some operations will require you to move the operands or switch to local view (/ NumPad) to see the results of the boolean operation.

Limitations & Workarounds

The number of polygons generated can be very large compared to the original meshes, especially when using complex concave objects. Furthermore, the polygons that are generated can be of poor quality, for example, very long and thin and sometimes very small. Try using the Decimate modifier (Editing context, F9) to fix this problem.

Sometimes the boolean operation can fail with a message saying “An internal error occurred -- sorry”. If this occurs, try to move or rotate the objects just a very small amount and try again.

Deprecated Boolean Tools

Mode: Object mode (meshes only)

Panel: Modifiers (Editing context, F9)

Hotkey: W

Menu: Object » Boolean Operation...

Description

Boolean operations are a method of combining or subtracting solid objects from each other to create a new form, a new object. Boolean operations in Blender only work on two Mesh type objects, preferably ones that are solid, or closed, with a well defined interior and exterior surface. If more than two mesh objects are selected only the active and previously selected object are used as operands. The boolean operations also take materials and UV-textures into account, producing objects with material indices or multi UV-mapped objects.

Options

Using the Boolean menu (W in Object mode) presents the following options:

Boolean operations.
Intersect
Creates a new object whose surface encloses the volume common to both original objects.
Union
Creates a new object whose surface encloses the total volume of both original objects.
Difference
The only operation in which the order of selection is important, the active object is subtracted from the selected object. That is, the resulting object surface encloses a volume which is the volume belonging to the selected and inactive object, but not to the active one.
Add Intersect Modifier
A shortcut that applies a Boolean modifier and selects Intersect in one step.
Add Union Modifier
A shortcut that applies a Boolean modifier and selects Union in one step.
Add Difference Modifier
Guess what? A shortcut that applies a Boolean modifier and selects Difference in one step.




Introduction
What is Blender?
Introduction
Blender’s History
License
Blender’s Community
About this Manual
What's changed with Blender 2.4
Installing Blender
Introduction
Python
Installing on Windows
Installing on GNU/Linux
Installing on Mac
Installing on other Operating Systems
Configuring Blender
Directory Layout
Starting
The Interface
Introduction
Keyboard and Mouse
Window System
Arranging frames
Headers
Console window
Window Types
Screens (Workspace Layouts)
Scenes
Configuration
Modes
Contexts
Menus
Panels
Buttons and Controls
Internationalization
Your First Animation
1/2: A static Gingerbread Man
2/2: Animating the Gingerbread Man
The Vital Functions
Quick render
Undo and Redo
Default scene
Screenshots
Help!
Setting Preferences
Configuring Preferences
Interface
Editing
Themes
File
System
Interaction in 3D
Introduction
Introduction
Navigation
Introduction
3D View
3D View Options
3D View Usage
Camera View
Layers
Local or Global View
Sketch in 3D Space
Introduction to Grease Pencil
Drawing sketches
Layers and Animation
Converting sketches to geometry
Transformations
Introduction
Basics
- Grab/Move
- Rotate
- Scale
- Gestures
Advanced
- Mirror
- To Sphere
- Shear
- Warp
- Push/Pull
Transform Control
Introduction
Precision of Transformations
Numeric Transformations
Transform Properties
Reset Object Transforms
Manipulators
Transform Orientations
Axis Locking
Pivot Point
- Active object
- Individual Centers
- 3D Cursor
- Median Point
- Bounding Box Center
Snapping
Snap to Mesh
Proportional Edit
Data System and Files
Blender's Data System
Blender's Library and Data System
Blender's Datablocks
Scenes
Working with Scenes
The Outliner Window
Appending and Linking
File operations
Introduction
Opening blender files
Saving blender files
Modeling
Introduction
Introduction
Objects
Objects
Selecting Objects
Editing Objects
Groups and Parenting
Tracking
Duplication
- DupliVerts
- DupliFaces
- DupliGroup
- DupliFrames
Mesh Objects
Meshes
- Mesh Structures
- Mesh Primitives
Selecting
- Selectable Elements
- Selection Basics
- Advanced Selecting
- Selecting Edges
- Selecting Faces
Editing
Basic Editing
- Translation, Rotation, Scale
- Adding Elements
- Deleting Elements
- Creating Faces and Edges
- Mirror editing
Vertex Editing
Edge Editing
Face Editing
Deforming Tools
- Mirror
- Shrink/Fatten Along Normals
- Smooth
- Noise
Duplicating Tools
- Duplicate
- Extrude
- Extrude Dup
- Spin
- Spin Dup
- Screw
Subdividing Tools
- Subdivide
- Subdivide fractal
- Subdivide smooth
- Loop Subdivide
- Knife Subdivide
- Bevel
Miscellaneous Tools
Retopo Tool
Sculpt Mode
Multi Resolution Mesh
Vertex Groups
Weight Paint
Mesh Smoothing
Curve Objects
Curves
Selecting
Editing
Advanced Editing
Surface Objects
Surfaces
Selecting
Editing
Text Objects
Texts
Editing
Meta Objects
Metas
Editing
Empty Objects
Empties
Group Objects
Groups
Scripts
Modeling Scripts
Modifiers and Deformation
Introduction
Introduction
Modifiers Stack
Modify
UVProject
Generate
Array
Bevel
Booleans
Build
Decimate
EdgeSplit
Mask
Mirror
Subsurf
Deform
Armature
Cast
Curve
Displace
Hooks
Lattice
MeshDeform
Shrinkwrap
SimpleDeform
Smooth
Wave
Simulate
Cloth
Collision
Explode
Fluid
Particle Instance
Particle System
Soft Body
Lighting
Introduction
Introduction
Lights
Introduction
Light Properties
Light Attenuation
Light Textures
What Light Affects
Lights In Other Contexts
Shadows
Introduction
Shadow Properties
Raytraced Shadow Properties
Volumetric Lights
Introduction
Lamps
Introduction
Lamp Light
- Raytraced Shadows
Spot Light
- Raytraced Shadows
- Buffered Shadows
- Halos
Area Light
- Raytraced Shadows
Hemi Light
Sun Light
- Raytraced Shadows
- Sky & Atmosphere
Lighting Rigs
Radiosity
Introduction
Rendering
Baking
Scene Light
Ambient Light
Ambient Occlusion
Exposure
Exposure
Materials
Introduction
Introduction to Shading
Materials Introduction
Usage
Assigning a material
Material Preview
Material Options
Multiple Materials
Properties
Diffuse Shaders
Specular Shaders
Ambient Light Effect
Color Ramps
Raytraced Reflections
Raytraced Transparency
Subsurface Scattering (SSS)
Strands
Node Materials
Material Nodes
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Material Node Types
- Input Nodes
- Output
- Color
- Vector
- Convertor
- Dynamic
Vertex Paint
Using Vertex Paint
Halos
Halos
Textures
Introduction
Introduction
UV/Image Editor
Common Options
Texture Stack
Texture Types
Texture Types
Procedural Textures
Image Textures
Video Textures
Texture Nodes
- Nodes Editor
- Node Controls
- Nodes usage
- Nodes Groups
-- Textures Input Nodes
-- Textures Output Nodes
-- Textures Color Nodes
-- Textures Patterns Nodes
-- Textures Textures Nodes
-- Textures Convertor Nodes
-- Textures Distort Nodes
Texture Plugins
Texture Painting
Painting the Texture
- Projection Paint
Mapping
Mapping
Environment Maps
UV Unwrapping Explained
- Unwrapping a Mesh
- Managing the UV Layout
- Editing the UV Layout
- Applying an Image
Influence
Influence
- Material
-- Bump and Normal
-- Displacement
- Particles
- World
World and Ambient Effects
World
Introduction
World Background
Ambient Effects
Mist
Stars
Rigging
Introduction
Introduction to Rigging
Armatures
Armature Objects
Panels overview
Bones
Visualization
Structure
Selecting
Editing
- Bones
- Properties
- Sketching
- Templating
Skinning
Introduction
Linking Objects to Bones
Skinning to Objects’ Shapes
Retargeting
Posing
Introduction
Visualization
Editing Poses
Pose Library
Using Constraints
Inverse Kinematics
Constraints
Introduction
Introduction
Constraints Common Interface
Constraints’ Stack
Transform Constraints
Copy Location
Copy Rotation
Copy Scale
Limit Distance
Limit Location
Limit Rotation
Limit Scale
Transformation
Tracking Constraints
Clamp To
IK Solver
Locked Track
Stretch To
Track To
Relationship Constraints
Action
Child Of
Floor
Follow Path
Null
Rigid Body Joint
Script
Shrinkwrap
Animation
Introduction
Introduction
The Timeline
Markers
3D Views
Animation Editors
Animation Editors
Ipo Editor
Ipo Curves and Keyframes
Ipo Datablocks
Ipo Types
Ipo Editor Interface
Editing
- Ipo Curves
- Keyframes
Ipo Drivers
Action Editor
Editing Action Channels
NLA Editor
Editing NLA Strips
Strip Modifiers
Animation Techniques
Introduction
Animating Objects
- Using Constraints
- Moving Objects on a Path
Animating Shapes
- Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples
Indirect Shape Animation
Animating Armatures
- Stride
Animating Lamps
Animating Cameras
Animating Materials
Animating Textures
Animating World
Physical Simulation
Introduction
Introduction
Dynamics
Force Fields
Collisions
Particles
Particles
Types
Physics
- Newtonian
- Keyed
- Boids
Visualization
Controlling Emission, Interaction and Time
Cache & Bake
Hair
Children
Vertex Groups
Particle Mode
Soft Body
Introduction
Exterior Forces
Interior Forces
Collisions
Simple Examples
Combination with Armatures
Combination with Hair Particles
Reference
Cloth
Introduction
Fluids
Fluid
Using the Game Engine
Using the Game Engine
Rendering
Introduction
Introduction
Camera
The Camera
Perspective (Vanishing points)
Depth Of Field
Render
Displaying Renders
Basic Options
Antialiasing (Oversampling)
Rendering Animations
Panoramic
Render Baking
Using the Command Line
Output
Output
Video Output
Effects and Post Processing
Introduction
Render Layers
Render Passes
Edges & Toon
Stamp
Color Management & Exposure
Depth Of Field
Motion Blur
Render Performance
Rendering Performance
Distributed Rendering
External Render Engines
Introduction
YafRay
Compositing with nodes
Composite Nodes
Introduction
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Composite Node types
Composite Node types
Input Nodes
Output Nodes
Color Nodes
Vector Nodes
Filter Nodes
Convertor Nodes
Matte Nodes
Distortion Nodes
Editing Sequences
Introduction
Introduction
The sequencer
Usage
Sequencer Modes
Sequence Screen Layout
Effects
Built-in Effects
Plugin Effects
Audio
Audio Sequences
Extending Blender
Introduction
Introduction
Python Scripting
Python Scripting in Blender
Setting up Python
The Text Editor
A working example
References
Python Scripts
Script Catalog
Bundled Scripts
Plugins
Blender's Plugins System
Texture plugins specifications
Sequence plugins specifications
Game Engine
Introduction
Introduction
The Logic Editor
Usage
Game Properties
Sensors
Introduction
Sensor Types
Controllers
Introduction
Expressions
Actuators
Introduction
Action
Camera
CD
Constraint
Edit Object
Ipo
2D Filters
Game
Message
Motion
Parent
Property
Random
Scene
Shape Action
Sound
State
Visibility
Cameras
Cameras
Dome Camera
Physics
Physics Engine
Material Physics
Object Types
- Static
- No Collision
- Dynamic
- Rigid Body
- Soft Body
- Occluder
- Sensor
Python API
Bullet physics
VideoTexture
Various resources
List of Features
External resources
Game Engine Basics (BSoD Tutorial)
FAQ