Boolean Operations
Boxshot can add and subtract shapes using the Boolean tool, accessible from the Tools menu or from the right panel when multiple shapes are selected.
Shape Types
There are two types of shapes with regard to boolean operations:
- Solid shapes
- Everything else
Solid shapes are backed up by a CAD engine and provide much more predictable results in boolean operations. Other shapes might work well (especially the simple ones), most complex non-solid shapes will most likely fail. Consider using solid shapes for boolean operations when possible.
Boolean Operations on Various Shape Types
The boolean operation behavior depends on the source shapes’ types. Here is the list of possible source types and the resulting type of the boolean operation:
- Simple/Complex solid + Simple/Complex solid = Complex solid
- Solid + Non-solid = Embedded model
- Any Solid + Scripted Solid = Embedded model
- Non-solid + Non-solid = Embedded model
Basically, only simple and complex solid shapes are fully supported in boolean operations. Scripted solids are also fully supported, but the result is converted to embedded model, as complex solids don’t support scripting. Non-solid shapes need to be converted to solids first in order to perform the boolean operation, but this usually fails because of the complex structure of the shapes.
Consider using solid shapes for predictable and stable boolean operations.
Trying It Out
Switch to the CAD section of the Shapes panel and create two Solid shapes. Configure them, move them around so they intersect, and select both. You’ll see the list of available tools on the right, or you can right-click them and select Tools menu there. Locate the Boolean option in the menu or on the right and click it. The boolean operation popup will appear.
The options you can configure are quite simple. First of all, you need to select the operation you are about to perform. Boxshot supports three types of boolean operations:
- Union — this adds one shape to another, effectively combining them;
- Difference — this subtracts one shape from another, good for making holes;
- Intersection — this leaves just the common parts of both shapes, dropping everything else.
You can select the operation type using the topmost drop-down control in the boolean tool parameters window.
In Difference mode it is essential to specify the main object, as the rest will be subtracted from it. In other modes, that doesn’t matter. Boxshot provides a drop-down list for selecting the main object, so make sure you do that if you are going to subtract shapes.
Finally, the Bevel parameter (only visible if solid shapes are processed) lets you smooth out the edges generated while performing the operation. Boxshot tries to be smart in detecting the proper edges, unless the operation touches the existing ones — then it might process them, as well.
Configure all the options and click the Proceed button to start the operation. It might take some time if the shapes are complex, but if you started with two solids, there’s a good chance you’ll end up with the result you expected.
Note on Shape Types
As previously mentioned, Boxshot prefers using solid shapes for boolean operations. If you try making a hole in hard-cover book, you’ll most likely end up with an error that the source shape cannot be converted to a solid. Boxshot tries to make solids from all the source shapes to perform the boolean operation properly, and this will most likely fail for many complex built-in objects in Boxshot. Consider using solid shapes for boolean operations.
Performing a boolean operation on simple solids results in a complex solid. The complex solid shape cannot be edited like a simple one — it is not possible to adjust the parameters of its ancestors, etc. The only way to edit the complex solid shape is to convert it to the scripted solid, then you can edit the script.
Other CAD objects like Lathe, Loft and Extrude usually work well with boolean operations, but still generate embedded models as a result.
Other Notes
Using booleans on non-solids or on scripted solids will generate embedded model shapes. As boolean operations use solids internally and solids don’t support multiple materials, the resulting shape will use only one material — usually the first one from the first source shape used in the operation.
Boolean operations might be unstable, especially if non-solid objects are used. It is highly recommended to save the project before performing boolean operations.
More Tutorials
Rendering
- Realistic Rendering — improving scenes visual appearance;
- Lighting — control environment and directional lighting;
- Saturated Reflection — make "rich" colorful reflections;
- Floor Reflection — reflecting scene objects in the floor;
- Job Manager — rendering jobs later;
- GPU Rendering — rendering scenes faster on GPU;
- Rendering Time and Quality — getting more control on rendering;
- Simple and Realistic Lighting — speeding up scene rendering.
Materials
- Texture Slots — how to use texture slots in Boxshot;
- Glass Materials — how to make semi–transparent objects look attractive;
- UV–Spot — how to make a UV–spot effect easily;
- Foil Effect — how to add foil–finishing to your shapes;
- Bump — adding relief to your materials;
- Copying Materials — how to copy materials to other shapes;
- Custom Materials — extend the materials library with your own ones;
- Semi–Transparent Labels — making semi–transparent and partial labels;
- Boxshot Materials — more details about Boxshot materials.
Features
- Boolean Operations — combining and subtracting shapes, making holes;
- Decals — applying decals and configuring them;
- Bump Decals — applying bump where it is needed;
- Depth Of Field — adding more realism to your renderings;
- Tools — read more about Boxshot tools;
- Managing Images — how to manage image files used by Boxshot projects;
- Shapes Instances — creating lightweight copies of other shapes;
- Model Editor — edit embedded models in many ways;
- Shrink Wrap — heat–shrink film simulation for objects wrapping;
- Physics Simulation — applying gravity to your scene;
- Palletize — arrange scene objects for the pallet;
- Snapshots — save scene state to re–use it later;
- Translation — teach Boxshot to speak your language;
- Vector Artwork — how to maintain the quality of vector artwork.
Shapes
- Lathe Objects — making symmetrical objects using revolving curves;
- Loft Objects — making custom objects with 2D cross–sections;
- 3D Text — making 3D text objects in Boxshot;
- Extruded Objects — how to make thick 3D object of your flat 2D curve;
- Conical Labels — making conical labels with distorted artwork;
- Dieline Box — a very realistic dieline–based box;
- Custom Shapes — adding custom shapes to the left panel;
- Solid Shapes — create boolean-friendly shapes;
- Script-Based Solids — create complex solid shapes with code;
- Third Party Shapes — importing third party shapes to Boxshot.