Stylized Foliage - Is there way to control the emission based on world lighting conditions

I have made a stylized tree with some emission for stylized look.

But in dark the trees glows due to the emissive color

I am wondering if there is a way to control the emission based on lighting.

I know one way is to use material parameter and update it based on day & night cycle. But this will not work always. What if there is a tree in very dark place during daytime or a tree in well illuminated place during nighttime.

Is there any way to dynamically do this in materials. Pls someone help me with this!

Then you need to figure out a way to get the result you are after using a non-emissive material, materials in deferred shading have no information about the lights affecting them.

Without emissive it dosn’t look great due to self shadowing. Any ideas how can I reproduce this without emissive.
Without Emissive


With Emissive

  • Use the two-sided foliage shading model and adjust the SSS and opacity to get the desired result.
  • If you’re using regular shadowmaps you can adjust the shadow opacity in the directional light settings
  • An unshadowed skylight would also likely help
  • Local exposure could be useful but the detail may be too fine

Some combination of those should help. Start with the two-sided foliage SSS color, that is by far the most important.