Taking advantage of mesh distance fields in our materials
You can say that each different recipe we’ve tackled in this book has explored something new within Unreal’s material creation pipeline. We’ve seen new material features, useful nodes, and smart shader-creation techniques, and this recipe is not going to be any different in that regard. Having said that, we are now going to look outside the Material Editor to tackle the next technique.
We are going to be focusing on a specific feature called Mesh Distance Fields, an attribute of the 3D models that we work with that will allow us to know how close or far we are from them – enabling us to change the appearance of a material based on that information. You can think of them as the visual representation of the distance from a volume placed around the model to the surface of the 3D mesh. This data gets stored as a volume texture, something that can be very useful for us as it allows us to create dynamic...