Download

Collision Based Per Pixel Material Change

I am trying to achieve an effect where if an object is some sort of field/sphere collision/box doesn’t matter, that it would change material from one to another. It should be as easy as lerping from A to B based on a mask generated by said overlap. No Overlap, black, overlap, white.

I should be able to dynamically grow and shrink and move the collision and it should reveal. It can be done through intersection of invisible meshes or an outright collision box controlled by some blueprint. I just need help trying to figure out how to get it set up. I found many examples, but none actually does what I want, and usually require unshaded materials. I need two shaded materials of any kind to be masked, so I basically just need to generate a mask through some sort of overlap.

To put it simply the effect is pretty much this: https://i.imgur.com/7VRAaoX.mp4