We are currently developing a volumetric soft-body physics engine and one of the things we want to implement is to use a volume to select a portion of a static mesh, remove the overlapping volume, and replace it with our soft actor.
Brushes offer the functionality that we need (subtraction to be specific), but this does not work with static meshes since they are, as they are called, static. For normal assets, one would use an external modeling tool to edit the static mesh as needed, but we want to do this in the editor (not necessarily at run-time).
As we see it, there are two ways to do this:
- Visually - use the geometry shader to hide the polygons that overlap with the volume. This should be doable if the volume is simple like a box, but it would be hard if the volume itself is also a static mesh.
- Modify the mesh - reuse/modify the existing BSP/CSG code or implement it as a plugin.
What would be the easiest way to achieve this? Has someone done this before?