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\$
2
  • \$\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
    Commented Oct 4, 2018 at 4:41
  • \$\begingroup\$ @DMGregory I added a picture of my skybox. \$\endgroup\$
    – Zackary
    Commented Oct 4, 2018 at 15:48

3 Answers 3

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\$
1
  • 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
    Commented Oct 4, 2018 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\$
0
\$\begingroup\$

This issue was you had Skybox on as your Environment lighting method but you needed to generate that ProbeLight. In Unity 2020 that's in Light Settings. Switching to color or gradient just changed the lighting method but didn't "fix" the issue. Cubemaps for Reflections and Environment lighting generally looks better that color or Gradient as your scene lighting will have more range in the ambient values; simulating bounce lighting. Unfortunately Unity current has a confusing system where "real-time" light baking is under: Window->Rendering->Lighting->Baked Lightmaps->Generate Lighting.

Even if you're only using real-time lighting and not using "Backed Lightmaps" you need to generate the convolved cubemaps for environment lighting for real-time reflections and lighting.

Documentation for precomputed lighting data.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .