Hello,
I couldn’t get any distance field map along terrain as it shows in the picture.
Please let me know how to get the distance from terrain for the map.
Hello,
I couldn’t get any distance field map along terrain as it shows in the picture.
Please let me know how to get the distance from terrain for the map.
It isn’t implemented yet. DanielW said that it’s possible and asked around on here if people would like to see it. I am in the yes camp as I have ideas for it. Also just want to point out that you have the gradient node not the actual distance so you would be getting the normal direction.
A workaround would be to use absolute position and then calculate the difference against the heightmap texture in the material (you would have to account for the scaling and position of the landscape in the material, maybe send that accross as material parameters on begin play in the level blueprint). You would also only get vertical distance as it would be just a Z compare so if you were up against a cliff face you would only trace down and get the ground not the cliff to the side of you.
another note, if you did actually want the gradient and you use the texture to get your height value, then you could calculate that in the material too by taking two samples in the U and V direction each and getting the finite difference/derivative then normalize.