MeshSlicer
Mesh slicing feature demo with Unity
A Unity demo that slices 3D objects in half in real time, producing two solid pieces with capped interior surfaces where the cut occurred.
The MeshSlicer repository by Keijiro is a demonstration of how to slice 3D objects in half inside the Unity game engine. The core benefit is visual and interactive: you can take a solid 3D shape and cut through it, producing two separate pieces that fall away from each other with exposed interior surfaces.
The project accomplishes this by taking a 3D mesh (the collection of points and triangles that form an object's surface) and mathematically dividing it along a flat plane. When the cut happens, the tool creates new geometry to cap the open faces where the slice occurred, so both resulting pieces appear solid rather than hollow. This process happens in real time, meaning the cut can be triggered while the game or application is running, not just during the editing phase.
A game developer would use this to add a dynamic slicing mechanic, similar to games where a player can cut through objects, walls, or enemies and watch the pieces physically separate. It could also serve industrial or architectural visualization purposes, where someone needs to show a cross-section of a modeled object on the fly. Because it is presented as a demo, a developer might use the code as a learning reference or a starting point to build a more robust version tailored to a specific game's needs.
The repository's README does not provide additional documentation, so anyone using it would need to explore the Unity project directly to understand the specific implementation details and any limitations.
Where it fits
- Add a real-time slicing mechanic where players cut through objects and the pieces fall apart.
- Show live cross-sections of 3D models for architectural or industrial visualization.
- Study the demo code to learn how mesh slicing works and build a custom version.