# Realtime subtractive geometry

**URL:** <https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232>\
**Category:** Character & Animation\
**Tags:** spawn, unreal-engine, bsp, brush, question\
**Created:** [April 1, 2014, 2:51am UTC](https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232 "2014-04-01T02:51:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miracle7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@miracle7](https://forums.unrealengine.com/u/miracle7)\
**Post date:** [April 1, 2014, 2:51am UTC](https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232/1 "2014-04-01T02:51:36Z")

</div>

Basically what I am looking to do is move one piece of geometry through another, and have the volume ‘carved’ out of it, similar to the effect seen here using a subtractive cylinder brush:

![2904-game+mode.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/0/32083203eed24d8cd57ccdc91435d770c2d8eee4.png)

What I was going to attempt was to have a subtractive brush move along while creating duplicates of itself, however I can’t seem to find a means to actually move these ‘brush’ objects at runtime or instantiate them at all.

If this is possible to do, please advise me of how I can achieve it. If it cannot be done like this, I would love to hear an alternate solution to ‘carve’ geometry in real time.

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![phoboz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phoboz](https://forums.unrealengine.com/u/phoboz)\
**Post date:** [April 1, 2014, 3:16am UTC](https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232/2 "2014-04-01T03:16:59Z")

</div>

I don’t think BSP was meant to be used at runtime.

If you plan on making only slight modifications to the mesh you could use dynamically created geometry like CustomMeshComponent and recalculate/update the vertices yourself. But if you thing about some serious changes to the shape my suggestion would be to look into voxel-based geometry instead.

---

<div class="post-metadata">

**Author:** ![miracle7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@miracle7](https://forums.unrealengine.com/u/miracle7)\
**Post date:** [April 2, 2014, 12:47am UTC](https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232/3 "2014-04-02T00:47:32Z")

</div>

Thanks for your response, I was originally thinking that some kind of high density voxel-based geometry would be ideal actually, however I was unaware that you could do that kind of thing in Unreal Engine.

I saw someone mention something similar in this question, however the link in the response doesn’t work for me:

> **[Procedural geometry in c++](https://forums.unrealengine.com/questions/3096/procedural-geometry-in-c.html)**
>
> Im looking for a way to create dynamically generated meshes and render them, ive found the FDynamicMeshBuilder, and that could do the work, do i just create a new instance of that object, and then fill in it the vertices, or i have to do something...

Also when I search for “voxel based geometry unreal engine” or similar search terms all I get is stuff about Voxel Cone Tracing.

If you have any idea of how to get voxel based geometry in Unreal Engine 4 please let me know, or if someone could at least point me in the right direction it would really help me out 🙂

---

<div class="post-metadata">

**Author:** ![phoboz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phoboz](https://forums.unrealengine.com/u/phoboz)\
**Post date:** [April 2, 2014, 1:01am UTC](https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232/4 "2014-04-02T01:01:57Z")

</div>

Those are old forum links, not sure if there is still some way to access them.  
AFAIK there is no built-in voxel in UE4, you will have to do some implementation 😉  
Unfortunately I never worked with voxels so can’t help you any further, but might be worth looking around the forums.  
Good luck! 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0e83961b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0e83961b](https://forums.unrealengine.com/u/anonymous_user_0e83961b)\
**Post date:** [April 19, 2019, 3:22pm UTC](https://forums.unrealengine.com/t/realtime-subtractive-geometry/279232/5 "2019-04-19T15:22:42Z")

</div>

hi,  
have you been able to accomplish what you wanted? I mean geometry editing in runtime?  
I tried to fake it somehow using render target, light, opacity ,… but nothing seems to work
