How do i make a material "cull" or fade away when the player gets too far from it?

How do i make a material “cull” or fade away when the player gets too far from it?, basically, lets say if a player gets 50m away from the object, the materials fades out, or culls.