1
\$\begingroup\$

I'm trying to make a driving game in Unity, but recently have been having lighting issues.

When I was first building it, the lighting worked fine. However, recently, one side of everything (the indirect lighting side) has turned black.

Here's an image of the issue.

Picture of issue

I've tried changing my lighting settings, but can't seem to fix it. Here are my lighting settings.

Lighting Settings

What can I do to fix this? (I am using Unity 2017.2.0f3)

\$\endgroup\$
  • \$\begingroup\$ I notice your environment lighting is coming from your skybox. Can you show us what your skybox looks like and how you've set up its material? \$\endgroup\$ – DMGregory Oct 4 '18 at 4:41
  • \$\begingroup\$ @DMGregory I added a picture of my skybox. \$\endgroup\$ – Zackary Oct 4 '18 at 15:48
0
\$\begingroup\$

After some troubleshooting, I found that I could fix it with a shader called DoubleSided.

Here's what my scene looked like after applying the shader. Scene

(The DoubleSided shader is available in the free asset NYC Block #6.)

Here's what my skybox looked like as well.

Skybox

\$\endgroup\$
  • 2
    \$\begingroup\$ Note that double-sided rendering disables backface culling and can make your rendering substantially less efficient. There's probably a different root cause we can address without losing this functionality. \$\endgroup\$ – DMGregory Oct 4 '18 at 16:03
0
\$\begingroup\$

The problem turned out to be my environment lighting.

When the Environmental Lighting was set to Skybox, the indirect lighting was set to black - causing the problem with the scene.

Setting it to Gradient, and then setting the colors to a (slightly tan) white, grey, and a darker shade of grey has solved the 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.