Download

Is it possible to capture only emissive pixels from a scene?

I’m making a material that is similar to the blurring glass from this tutorial by using the SpiralBlur-SceneTexture material function. I have noticed that if the objects on the other side of the “glass” mesh have an emissive map but are receiving very little or no light then the emissive parts of those objects will not be visible even though intuitively the mind expects they should be. Is there any way to use something like a SceneColor node (or Custom node with some HLSL) to grab only the scene pixels that are self-illuminating? (I don’t need the bloom halo, just the pixels that are affected by an emissive map.) I would then simply plug that into the SpiralBlur glass material’s emissive channel to, in effect, ‘pass’ the emissive through it.

Here I have created a simple demo scene illustrating this. There is a cone with a checker applied to its emissive input, and a plane that has the SpiralBlur material applied to it. When the viewport is changed from Unlit to Lit, you see that the cone disappears if you’re looking through the plane (even though you’d expect the emissive bits to remain visible) because no light touches the cone. This would be really easy to fix if there was like a buffer that held only emitting pixels as seen from the player camera.

Yes? No? Maybe?

I got a harebrained idea to try chroma keying the emissive color from SceneColor and it actually kind of works. But it’s really a horrible solution and it doesn’t work properly under a lot of lighting scenarios so really it’s no solution t all.