Material visible only from distance?

Good morning.

I have a material that displays a heat effect, which is deployed in a postprocess volume inside my level (it also has infinite extent).

But i need to only see it at a distance, like 500 meter away from the camera of my character for example.

What nodes i may add for that purpose?

Thank you.

You could these nodes:

  • ActorPosition will give you the actor position in world space.
  • WorldPosition will give you the world location for every pixel.
  • CameraPosition will give you the world position of the camera.

Then simply take the distance between 2 of them.

322299-worldpos.png

Thank you for you reply.
It gives me an error. How should they work together?

You’d want to use an If node.

Thank you very much, it works like a charm :slight_smile: