Proximity-based masking with mesh distance fields
You could say that each different recipe we've tackled so far has explored something new within Unreal's material creation pipeline. We sometimes talk about new material features, useful nodes, or smart shader creation techniques, and we even go as far as using other elements from outside the material editor to affect our creations. This is going to be one such example, since we'll be looking at a specific feature called Mesh Distance Fields that allows us to change the appearance of a material based on how close or far it is from other geometry in the scene. This, as you'll see, can be very useful, as it allows us to create dynamic effects such as distance-based masks or ambient occlusion-driven effects. Jump on board and let's take a look at one such example!
Getting ready
The scene we'll be using to demonstrate this technique is going to be very simple—in fact, we'll only use a plane and a sphere in terms of geometry. However, I'd advise...