Sphere mask, how to make the masked result 'stick' to the material?


I’m trying to figure out a way to use dynamic masking such as that of a sphere mask on a skinned object. I would like to have the resulting mask ‘freeze’ at some point and stick to the object for a limited time period before fading out.

Ex. Think of a paint brush entering a paint bucket, sort of uses the sphere mask to ‘color’ the brush intersecting the liquid area red, and when we pull the brush out and away form the sphere mask the red paint is still stuck where it is supposed to be and then slowly fades away.

Any ideas how to accomplish this task please? Quite important to me at this stage.

Thank you!

I’m trying to understand it further, perhaps I could render the sphere mask result onto a render target and draw that back into the material somehow? Not sure how to go about it but hoping someone will have an input on this.

Thanks again.