I have been trying to figure out a way to create a shader that creates an outline where two objects intersect.
Similar to the white outline/froth that is created when the water intersects with the landscape. (example in the attached image)
I have tried DepthFade and PixelDepth but haven’t had any luck.
There is two problems with this solution.
1 It has to be translucent
2 it does not appear around the intersection but where the mesh is below the water mesh.
I am also trying to create a water material but I cant use a translucent material for the water since I’m using pixel depth for the waves and the depth always messes up when its translucent anyway.
How would I use distance fields for this effect? I looked at the documentation for them and got something like the demo mobile fog working however it only effected a tiny area around the intersection, is there any way to enlarge the distance around the intersection that is effected?
Is there a version of this that works with 2 dynamic actors? I’m not able to find any documentation on how Mesh Distance Fields are generated or what’s included with them, but I’m only able to get this to work with static meshes placed directly into the environment. Even actors that contain static meshes that are placed in the environment don’t seem to work.