Can you animate a boolean modifier?

29 January 2020 04:40
Hi there, quick question,

can you animate a cube with a boolean modifier cutting away at say a sphere, like so…

if it's moving from the right to the left?

Example 2.79 file is here…

If not is there any other way of doing it with say materials, etc?
03 February 2020 08:37
03 February 2020 22:42
Devs say dynamic modifiers are not supported except for armatures, so you can't use it.

Maybe you could simply apply the modifier for each frame, i.e. create many "sliced" copies of the Sphere along the cube's X axis and then animate them with show/hide as the cube goes through. Of course that's a large increase in geometry…
04 February 2020 01:13
Yeah that was my fall back plan of cutting the Sphere up.

Just wondering if there were other options before I do that.

Does masking with materials work?
04 February 2020 10:29
Can you elaborate what you mean exactly by "masking with materials"?
05 February 2020 04:05
Ok I work for a university as a multimedia graphic designer creating resources for academics. We have one project where we've scanned a real brain along with photos of other brains that has been sliced into segments.

We want to make this a interactive web 3d model for our students and was wondering what the best way would be to do that when the slices will be in all three XY & Z axis, ie (as a simple example, since i cant show that actual files im working on for privacy reasons, the brain is a pink sphere, orange planes are where the photographed slices would be, but we'd need to remove one side of the brain so you could see those photos, hope that makes sense) ….

So just trying to work out what the most efficient way to do this.

So just thinking if we had a transparent material mixed with the brain material and use a mask to mix the two to hide the brain part we dont want to show.

Does that make sense?
05 February 2020 10:43
There is a simple trick that I think comes pretty close to what you want to achieve, without messing around with any geometry, and that is to animate the UV map on the brain model. Basically, you make a texture for the brain model and then blank out half of it (transparency). Then animate the UV map so that the cross section moves up or down across the brain. Add the slice (the plane with the brain-scan image) and move it in unison with the cross section.

You also need to switch the correct slice with m_tex.replace_image (not happening in the screen shots).

You can animate in the other axes by using 90° rotated models. The model (or rather the UV unwrap) must consist of precisely horizontal rows of polygons, otherwise you won't get a flat cross section.
06 March 2020 08:05
Thanks for that Blend4Life.

Is there anyway of using the PBR process?

ie i've set mine up this way but I don't think it's correct…

06 March 2020 22:56
They have a screenshot of the setup in the blog:

I don't know, maybe it's not possible to combine UV animation and PBR.
09 March 2020 03:29

sorry i'm still a bit confused.

I can get the alpha animating (see my file here ) with B4W nodes…

But how do I edit the nodes to work using PBR nodes? ie in my screenshot if I swap the Blend4web Material node to the PBR node and then back into the Output node it doesn't work.
Please register or log in to leave a reply.