Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lighting issues

Discussion in 'General Graphics' started by TimoMattes, Apr 7, 2022.

  1. TimoMattes


    Feb 14, 2022
    I'm about to make a 3D Scene in Unity, where you can move through a house. But right now I'm stuck with the lighting of the scene. What I wanted to try is to bake my directional light (Sun) into the Scene. But right there is my first problem: If I didn't bake something (clear baked data) it looks quite good, but after baking, the Scene is really dark, what I don't understand, because I set Environment Light and before the Bake everything just looks fine. Here are some samples before the baking, of the settings and after the baking:

    Before Lighting - LightingSettings-Scene:

    Before Lighting - LightingSettings-Environment:

    Before Baking - Directional light (sun):

    While Baking (like EndResult) - ReflectionProbe Settings

    As you can see, the Scene gets really dark and it seems that for any reason, the ambient Light/Environment Light is missing after the bake.

    Another problem is the warning of overlapping UV's. What's the reason for that and how can I fix it?

    The aim of the project is to also publish it as a WebGL version. But if I build it as a WebGL version and try it on my server, the textures doesn't work. I looked up in the internet and read that directional lightmaps doesn't work for WebGL. But if I switched the directional Mode to non-Directional and replaced the directional light and only baked a Point light, the Texturemaps also didn't work in WebGL.. Does anybody know, how to use lightmaps for WebGL?

    Thanks a lot!!

    Attached Files:

  2. Sky77


    Jan 30, 2014
    Lighting in interior is tricky, if you’re only using a directional light it’s normal that everything gets very dark with baking.
    Ambient light is there, but it’s not enough usually.

    The only solution is experiment a lot: add more lights, alter the settings to add more light bounces, rise the ambient light value and so on.

    I don’t have an answer for the webGL issue.