Search Unity

Lighting question

Discussion in 'Getting Started' started by Nitrox32, Nov 26, 2017.

  1. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    161
    How do I stop outside lights (ambient) from effecting indoor lighting? I have a scene with time of day lighting. That is causing problems inside.
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    The lighting engine takes normals into account. So if you've only modeled the interior, you'd have to have geometry that faces the opposite direction to block light from coming in where you don't want it. This is easy enough if your interior is a cell in itself (like Skyrim, for example), but if you're talking something like Fable where you can seamlessly move from interior to exterior, you have to just make sure there aren't holes in your mesh causing the problem.
     
  3. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    161
     
  4. Nitrox32

    Nitrox32

    Joined:
    May 9, 2017
    Posts:
    161
    That makes sense. I'm using village interiors and village exteriors. How do I know which direction the normals are facing?
     
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    If you created the models yourself, you can view them inside your modeling program. Otherwise, you can tell inside Unity by looking at the model's faces. Unless you're using a shader that renders both sides of a face, you'll only be able to see one side. So, for example, if you have a giant cube and a camera inside it at the center, you'd only be able to see the "walls" of the cube if the normals were facing inward.