create cavity in ue4

How to Create Cavity in UE4: Easy Step-by-Step Guide

By Steven Smith
AD

Creating a cavity in Unreal Engine 4 is a fundamental skill for level designers and environment artists who need to carve out hollow spaces, build tunnels, or add recessed details to geometry. Whether you are blocking out a level with BSP brushes or refining a static mesh with advanced modeling tools, understanding how to generate a cavity efficiently can save time and improve visual quality. UE4 offers multiple workflows, each suited to different stages of production, from rapid prototyping to final asset optimization.

The term "cavity" can refer to a physical subtraction from a solid volume or a visual effect that simulates depth. In this guide, we will explore both interpretations, focusing on practical methods that yield clean results. You will learn how to use subtractive brushes for instant level geometry, leverage the Modeling Mode's Cavity tool for precise indentations, and perform Boolean subtraction to create complex hollow shapes. By the end, you will have a clear roadmap for choosing the right technique for your project.

Creating Cavities with BSP Brushes

BSP brushes are the traditional building blocks of Unreal Engine 4 level design. They come in two primary types: additive and subtractive. An additive brush adds solid geometry to the world, while a subtractive brush removes geometry from any overlapping additive brushes. To create a cavity, you simply place a subtractive brush inside an additive one and rebuild the level geometry. This method is incredibly fast for blockouts and prototyping, allowing you to carve out rooms, corridors, and holes without leaving the editor.

AD
[UE3/UE4] Generate Cavity from Normals
[UE3/UE4] Generate Cavity from Normals
How to make a cave in UE4 (Unreal Engine 4)
How to make a cave in UE4 (Unreal Engine 4)
80.lvl Article - How to create Material Function in UE4, Clinton Crumpler
80.lvl Article - How to create Material Function in UE4, Clinton Crumpler

The workflow is straightforward: you first place an additive box to serve as your solid mass, then position a smaller subtractive brush within it. When you rebuild geometry, the overlapping region is cut away, leaving a hollow cavity. You can combine multiple subtractive brushes to form complex shapes, such as L-shaped tunnels or irregular chambers. While BSP brushes are not ideal for final rendering due to performance and lighting limitations, they remain an essential tool for early-stage design and iteration.

Step-by-Step Guide to Subtractive Brushes

To begin, open the Place Actors panel and drag a Box brush into your level. In the Details panel, set its Brush Type to Additive. Scale and position this brush to define the outer volume of your object. Next, drag a second Box brush into the scene and set its Brush Type to Subtractive. Move and scale this second brush so it intersects the first one where you want the cavity to appear. You can use the transform tools to fine-tune its placement, ensuring it is fully enclosed by the additive brush for a clean cut.

[UE4 Tutorial] How To Make a Basic Layered Material in UE4 (pt. 3)
[UE4 Tutorial] How To Make a Basic Layered Material in UE4 (pt. 3)
Creating an Ominous Scene in UE4
Creating an Ominous Scene in UE4
Material Cutoff Effect Tutorial - (UE4)
Material Cutoff Effect Tutorial - (UE4)

Once positioned, click the Build button in the toolbar to rebuild geometry. The subtractive brush will carve a void into the additive brush, creating your cavity. If you need a more complex shape, you can add multiple subtractive brushes or use the Hollow feature on the additive brush for a uniform shell. Remember to rebuild after every change, and check for geometry errors by using the Geometry Editing tools. This approach is perfect for quickly testing level layouts before committing to final assets.

Best Practices and Limitations of BSP Cavities

BSP brushes are excellent for rapid prototyping, but they have significant limitations for final production. They lack efficient lightmap support, often causing visible seams and poor shadow quality. Their geometry is also not optimized for rendering, leading to higher draw calls and potential performance issues. For simple cavities or temporary blockouts, they are perfectly adequate, but you should plan to replace them with static meshes as your level matures. This transition ensures better performance and visual fidelity.

AD

When using BSP cavities, keep your subtractive brushes as simple as possible. Avoid overlapping multiple subtractive brushes in ways that create non-manifold geometry, as this can cause rendering artifacts. Always rebuild geometry after any adjustment, and use the "Show Flags" to visualize brush interactions. If you need a cavity for a final asset, consider using the Cavity material function instead of actual geometry to simulate depth without the performance cost. This is especially useful for adding subtle panel lines or vents to surfaces.

UE4 Tutorial: Material Functions
UE4 Tutorial: Material Functions
UE4 Tutorial - Press Button to Open Door
UE4 Tutorial - Press Button to Open Door
UE4 Base Building / Walls
UE4 Base Building / Walls
UE4 | UE5 Tutorial : Outline Material
UE4 | UE5 Tutorial : Outline Material
[TUTORIAL] Custom Collision in Unreal Engine 4
[TUTORIAL] Custom Collision in Unreal Engine 4
UE4 Emissive lighting and materials tutorial - unreal engine for beginners
UE4 Emissive lighting and materials tutorial - unreal engine for beginners

Advanced Cavity Creation with Modeling and Boolean Tools

For more precise and optimized cavities, Unreal Engine 4 offers a suite of geometry editing tools available in the Modeling Mode (or via the Geometry Editing plugin in earlier versions). These tools allow you to manipulate static meshes directly, performing operations like extrusion, inset, and Boolean subtraction. The dedicated Cavity tool is particularly useful for pushing faces inward to create recessed areas without altering the outer silhouette of the mesh. This non-destructive workflow is ideal for adding mechanical details, architectural trim, or organic indentations.

Boolean operations take cavity creation a step further by letting you subtract one mesh from another. This is perfect for creating hollow containers, pipes, or complex cutouts that would be tedious to model by hand. However, Boolean results can produce messy topology, so you must clean them up using the Poly Edit tools. With practice, these advanced methods give you complete control over your geometry, enabling you to craft cavities that are both visually appealing and performance-friendly.

AD

Using the Cavity Tool in Modeling Mode

To access the Cavity tool, first enable the Modeling Mode from the Mode dropdown in the main toolbar. Select the static mesh you want to edit, then choose the Cavity tool from the Modeling panel. Click on the face you wish to cave in, and drag to set the depth. The tool provides options for offset, falloff, and even a profile curve, allowing you to create rounded or sharp edges. You can preview the result in real time and adjust parameters until the cavity matches your vision.

Material Design Tricks in UE4
Material Design Tricks in UE4
Dynamic Decay Creation in UE4
Dynamic Decay Creation in UE4
UE4 X-ray Vision Post Process Effect l Unreal Engine 4.26 (Tutorial)
UE4 X-ray Vision Post Process Effect l Unreal Engine 4.26 (Tutorial)
🍎 CUSTOM GRAVITY - UE4 Tutorial 🍎
🍎 CUSTOM GRAVITY - UE4 Tutorial 🍎

This tool is especially effective for adding surface details like screw holes, vents, or panel gaps. Because it operates on the existing topology, it preserves the overall shape of the mesh while introducing localized depth. Once you are satisfied, click Accept to commit the change. If you need to make further adjustments, you can use the Undo history or continue editing with other Modeling tools. The Cavity tool is a fast, intuitive way to add realism to your assets without leaving the engine.

Performing Boolean Subtraction for Complex Cavities

Boolean subtraction is a powerful technique for creating cavities from two separate meshes. Start by placing your base mesh (the solid object) and a second mesh that represents the shape you want to remove. Select both meshes in the viewport, then open the Boolean tool in the Modeling Mode. Choose the "A minus B" operation, where A is the base mesh and B is the cutter. The tool will subtract B from A, leaving a cavity that matches the cutter's shape. This is ideal for creating hollow shells, intricate cutouts, or negative spaces.

AD

After the Boolean operation, inspect the result for non-manifold edges or flipped normals. Use the "Auto Repair" option or manually clean up with the Poly Edit tools. Keep in mind that Boolean operations can significantly increase poly count, so you may need to decimate the mesh or create LODs. For game development, always test the final asset in the engine to ensure it renders correctly and performs well. With careful preparation, Boolean subtraction can produce cavities that are both complex and optimized.

Mastering cavity creation in UE4 opens up a world of possibilities for level design and asset creation. Whether you are blocking out a dungeon with subtractive brushes or refining a hero prop with the Cavity tool, the right technique depends on your stage of production and performance goals. Experiment with each method, and soon you will instinctively know which tool to reach for. As you integrate these workflows into your daily practice, you will find that creating cavities becomes a seamless part of your creative process, allowing you to focus on the bigger picture of world-building and storytelling.

AD