Realtime subtractive geometry

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

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 :slight_smile:

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.

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:

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 :slight_smile:

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 :wink:
Unfortunately I never worked with voxels so can’t help you any further, but might be worth looking around the forums.
Good luck! :slight_smile:

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