Hi,
I’ve got this simple boolean operation going on in blender.
I’d like to export the animation with a ‘live’ boolean from blender to Unity, just as you can see in the preview.
[gif animation]
VelvetyLeanArcticfox
Unfortunately whether I apply or not the modifier in Blender I can’t get the intersection+animation to work. What comes out is a moving final cut of the box, and not a box the appears/disappears.
Is that possible in some other way?
Thanks!
The blender importer bakes all modifiers, which makes sense as those are blender specific. But if you want that simple example in your game, just animate a cube with scale and position. For a similar effect you could use shaders (like in this example:
). But those wont ‘cap’ the mesh though (keep it closed) as the boolean modifier does. Boolean operations can be costly depending on mesh complexity, so they are typically faked or worked around in realtime scenarios.
In general, many things(especially with materials and modifiers) that work in modelling software won’t directly work in Unity. Boolean modifiers are one of those things. You need to find a Unity way to do it. Unity does let you directly modify models, even at run-time. I wouldn’t be surprised if there wasn’t already an asset that can handle exactly what you are wanting to do.
Thanks for the insightful responses. I’ll keep on searching for a solution. I posted the box as an example. My ultimate goal is to have objects moving in an invisible bounding box and appearing/disappearing as they enter and leave it. So all in all an invisible clipping object. I’ve read it should be possible with a custom camera clipping.
Hmm…that is a completely different thing than doing booleans, though I get where you get the idea. What you are asking for is going to be much easier to do from what I understand, although I’ve never done it. I think you are going the right way with custom camera clipping though.