Mist that only erases objects and not background? I'm trying to make an odd effect similar to a video game where things off in the distance aren't drawn, but aren't chopped off completely - they blend into the background instead. So it's sort of like a fog or mist, but one that only applies to objects and not the background.

The closest I've come to making this work is by using two separate RenderLayers - one that's only the background with a mist pass, and one that's all the objects. Unfortunately, this leads to a "ghost" effect: the objects are semi-transparent over the background. Additionally, it doesn't work with non-white objects.



Is there anything I can do?
With a single render layer, enable a mist pass.



Then in the compositor use the mist value and a color ramp a factor to mix the background.