Bool operators for 3D Models (subtract spheres)

Hey guys,

I was just wondering if theres a handy way to use bool-model-functions.

For example: subtract a sphere from a box and get the new model returned. Is it possible to do such things in real time (it is, but is it in Unity)? Is there any example on how to achieve such effects?

I remember seeing a class for metaballs, so I think it should be possible, but I’m lacking the knowledge on how to exactly do that.

Just to give you a better idea of what I want to achieve: Imagine one of the Worms 2D games, but in a 3D Engine (2D game play, but using 3D models). I want to edit the terrain in real time when shooting on it (cutting/subtracting circles [explosions] from it, if a hit occurs). If you played Worms 2D you know that its important, that the edge of the cut is kinda “high poly” and not “blocky”. It needs to be a smooth cut. I attached a little example of what I need.

Greetings
Johannes

234763--8396--$example_131.gif

Unity is not a 3d modeling tool, and as such does not posses functions like booleans. You will have to implement it yourself.

Note that boolean operations can be computationally expensive.

Is there any possibility to create the desired effect without using the way of bool-model-functions? Any recommendations?

Is it possible to create objects that can be broken?

you can take a look at the procedural examples for ways to create and modify geometry on the fly.

It might be possible but is not easy, I don’t think.

Thanks, I will give it a try and tell you guys how it worked out :wink: