Change color of particle depending on distance to camera (Eevee)?

Hi folks,

Probably a real simple one, this:

I have particles emitting from an object and i’d like to have the particle color change depending on the distance to the camera.

Hopefully this is easy ti achieve, could anyone point me in the right direction?

BTW, i’m working in Eevee!


Id use the Camera Data Node, remap the distance to be [0, 1], and use that to drive the color.

Thanks! … how do i remap the distance?

With a color ramp?

With a map range node.
The color ramp only goes from 0 to 1 which is ideal for remapping. It is possible if you multiply the remapped value by 0.01 or something similar lwo but the map range node is specifically for this.

Thanks, will give it a try!