Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Pitch black sides on objects

Discussion in 'Global Illumination' started by easyE, Sep 25, 2020.

  1. easyE

    easyE

    Joined:
    Sep 24, 2020
    Posts:
    2
    I am extremely new to unity and I am working on my first project, my goal was building a simple level and then adding character with a first person view that can walk around and jump and maybe push around boxes, I had only just started building the level when I noticed that the sides of the shapes facing away from the directional lighting were pitch black to the point you could not see the color or texture at all. I do want the sides of shapes facing away from the directional lighting to be a bit darker but this is way to dark. These are not imported models they are just cubes that I added to the scene through unity so its probably not a import problem, also they also have this problem with no material on them. and in the tutorial I have been following this problem did not crop up in it, the sides of the cubes he placed that faced away from the directional lighting were only slightly darker. The unity version used in the tutorial is much older, the video was posted in 2015 but I have had no other problems with it so far. The version of unity I am using is (2019.4.11f1) even though its not the newest version it said it would have long term support so I was using that for my first small project, I have my reasons. I also got all the platform compatibility modules installed for it except for the ones for mobile devices. I also opened up a new project and it had the same problem. I have barely done anything yet, just added a few cubes, gave some a rigidbody component, made and given them materials and change the color of the light and strength of the shadows, so I don't think I somehow messed up the settings. Also when ever I make a new project the directional lightings color is set to a light brownish color, is that normal? Is there any way I can adjust how dark the sides of the shapes facing away from the lights are? If its unfixable with this version of unity I will download the newest one but I would rather not if I don't have to. Can anyone please give me some advice on this.
     

    Attached Files:

  2. easyE

    easyE

    Joined:
    Sep 24, 2020
    Posts:
    2
    Looking back at my post you will probably need more info to help me, if you give me instructions on where to go, I will take a screenshot of other control panels/menus in my project.
     
  3. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    307
    Hey there,

    As far as I can tell from your screenshots, this is expected behavior. A directional light will by default leave faces of an object that aren't being directly illuminated dark. This is by design.

    You have a few options for getting rid of this effect:

    Baked global illumination
    It looks like you are not using any baked GI (indirect lighting), just realtime direct lighting. If you want your objects to respond to global illumination, you should open the lighting window (Window > Rendering > Lighting) and tick the checkbox for "Baked Global Illumination". You probably also want to set the "Lighting Mode" to "Baked Indirect". Next, tick the "Contribute Global Illumination" checkboxes on each of the scene objects you want lit. Lastly, bake the lighting for the scene using the "Generate Lighting" button at the bottom of the lighting window. If you do this for the plane and the cube on those screenshots, the backside should be less dark.
    Check out this link for more information about lighting and GI in Unity.

    Ambient lighting
    If you for whatever reason don't wish to use global illumination, you still have a few options. The simplest is probably to add ambient lighting to your scene, which in some ways can be seen as a crude approximation of GI. You can do this in the lighting window, under the "Environment" tab. Set the environment lighting source to "Color", and choose a color for your ambient light.

    More lights
    Another solution if you don't wish to use baked GI is to just add more lights, though I can't exactly recommend this. If you for example add another directional light to your scene, facing in the opposite direction, and disable shadows on it to prevent duplicate shadows, you might get the result you are looking for.

    Hope this helps, and let me know if you have additional questions.
    Cheers
     
    cmortizm likes this.