Render texture only from a far distance.

I’m trying to do something like this: How to paint foliage and optimize unreal engine 4 - YouTube (jump to 0:35 )

That starts to render the texture from a distance ( away) but when it’s close I want the texture to be transparent, because I have foliage in the landscape and when it’s far away the foliage will stop rendering and then it will render the texture in place.

Any help??

Try this:

  • Create a Camera Position node and an Absolute World Position node
  • Create a Distance node and connect the other two nodes as inputs to that
  • Divide the output of the Distance by a large-ish number(this number is the distance after which you want the texture to be completely opaque)
  • You can use the output of the Divide node as opacity/opacity mask/Lerp alpha
  • Clamp the final value between 0 and 1 if anything weird happens