Filling gaps in mesh after applying opacity mask

Hello guys,
I want to slice a mesh object dynamically. I got location based opacity (with [this tutorial][1]) and now I need to make more complex feature: fill holes (gaps) after masking. I’m stuck with it and need your help.

I tried to show what exactly I want on screenshots below (red lines show area which I want to fill with material):

I would be grateful for any advice.

Trouble with what you are trying to do is that there isn’t any actual geometry to fill in with material information. What you could try doing is, instead of passing the mask to opacity, pass it to world position offset and offset those vertices by a vector. This wont work for slicing but if your just shortening or lengthening.

A much more complex solution would involve some kind of parallax occlusion “like” mapping but I wouldn’t have any clue how to implement that.

Though I just saw in the 4.9 release notes an experimental “Volume Decal” that would work but epic says is very GPU expensive.

Otherwise a geometric solution would be to modify the underlying mesh at runtime using the custom mesh component:

or procedural mesh component:

I need an input on this as well. However my application of the mask is slightly different. I am slicing two planes that are parallel to each other and has a gap so it practically is a wall. After applying the opacity mask, I can see the gap.

Did you have any success with this? I’m very interested in figuring this out as well.

The only current way to make something similar (i mean fake it with unlit color):

Thanks, better than nothing.