I don't think Ogre can by itself perform boolean like that, as it is mainly a rendering engine.
But, can use SDF as a post processing effect in Ogre to perform 100% perfect (better than any mesh could ever create) shapes with boolean operations:
https://iquilezles.org/articles/distfunctions/
Using shadertoy, you can also easily check that it works with your specific needs as well, like this: https://www.shadertoy.com/view/lt3BW2
You can also remove its smoothness in real-time (and then the little arrow button to compile) by altering the "opSmoothUnion" function to this:
Code: Select all
float opSmoothUnion( float d1, float d2, float k )
{
return min(d1,d2);
}
However, SDF are quite heavy on the GPU, so if your target machines are not that great, SDF is probably not the solution.
Here are also some other libraries you can use to perform boolean operations, which you could then possibly visualize as a mesh in Ogre afterwards:
https://opencsg.org/
https://www.cgal.org/
Also, maybe it can be done using Ogre Procedural using meshes? I am not sure though, but you can check it out: https://github.com/OGRECave/ogre-procedural