I would really need to know if it is possible to make an object have a material, that emmits only in the lit parts of an object. The dark parts would remain dark. I am using Eevee with Bloom turned on and so I need the lit parts to glow.
1 Answer
Yes, this can be achieved with a Shader to RGB
node. This lets you have a diffuse shader to compute which parts are lit, which you can then pass into an emission shader to make it glow.
Nodes:
Result:
I use a color ramp to separate between the lit and unlit areas, and then feed that into a mix shader so the lit parts are shaded with the emission, and the unlit with the diffuse shader.
If you want to achieve a smoother gradient, you can pass the value of the color ramp into the strength of the emission, so that the more lit parts also emit more.
-
$\begingroup$ just realized ive got an extra emssion node in there, you can ignore that one. $\endgroup$ Commented Oct 2, 2020 at 5:05