1
\$\begingroup\$

I have a directional light as a "sun". At night, I need a pitch black scene, but a mesh I'm using as terrain somehow stays faintly lit when the light intensity is 0.

At night:

  • The direction light "sun" is rotated so it's beneath my world.
  • The sun light is set to black, intensity to 0
  • I tried setting fog and ambient light color in RenderSettings to black
  • I tried setting ambient intensity to 0

Notice how the background is lighter than the character. Something is causing that light to remain.

However, if I enter playmode with the light object inactive, the coloring works fine.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Ambient not work?! can you send image from your terrain.please edit your question something like "how can I make pitch black scene?" \$\endgroup\$ – Seyed Morteza Kamali May 26 '18 at 11:12
  • \$\begingroup\$ I'm not convinced this is an ambient light problem, because I get pitch black when my scene starts without the light object enabled. I've forced ambient light to 0 intensity, black color, and some meshes remain dimly lit. It's not just my terrain mesh now, it's also a low-poly tree mesh I've used from a free low-poly asset on the store. \$\endgroup\$ – BotskoNet May 26 '18 at 15:17
  • \$\begingroup\$ After some more debugging it appears to be the "reflectionIntensity" that has to be set to 0. Not sure what's reflecting, but it fixes my issue. \$\endgroup\$ – BotskoNet May 26 '18 at 16:11
  • \$\begingroup\$ what shader do you use? try by using Diffuse (or unlit) shader then set environment lighting multiplier and reflection multiplier to 0 \$\endgroup\$ – Seyed Morteza Kamali May 26 '18 at 18:13
  • \$\begingroup\$ @BotskoNet if you’ve found a solution, you can answer your own question, in case future people with the problem wind up here \$\endgroup\$ – Phoenix May 27 '18 at 8:56
0
\$\begingroup\$

After some more debugging it appears to be the "reflectionIntensity" that has to be set to 0. Not sure what's reflecting, but it fixes my issue.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.