Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Top Down Shooter - Interior Lighting

Discussion in 'Global Illumination' started by intrikit, Oct 25, 2015.

  1. intrikit

    intrikit

    Joined:
    May 25, 2013
    Posts:
    130
    I'm working on a top down shooter which both has exterior and interior environments. I would like suggestions on how to approach lighting for these as the player can enter and exit an interior within the same level without a load.

    I was thinking of a rudimentary technique of creating a roof geometry to house the interior and not be affected by the sun and then hiding it after lighting is baked. Any other suggestions would be much appreciated.
     
  2. _M_S_D_

    _M_S_D_

    Joined:
    Nov 12, 2013
    Posts:
    511
    If I understand what you mean correctly I don't think you need to hide geometry after baking. Just create the geometry needed and set the Cast Shadows option to "Shadows only" and it should block the sun. That way you won't have to hide/unhide geometry every time you bake the lights.
     
  3. intrikit

    intrikit

    Joined:
    May 25, 2013
    Posts:
    130
    Thank you. That solved it!
     
  4. Adam_is_learning_all_the_time

    Adam_is_learning_all_the_time

    Joined:
    Jun 29, 2016
    Posts:
    12
    Hi there, apologies for resurrecting an old thread, but I just wanted to note for future googlers that this also works a treat for realtime lighting without bakes - I was at a loss on how to do this, and stumbled on this thread. Thank you so much :)

    Setting Shadows only on my "fake roof" allows it to be in scene, but not visible, and only as a shadow emitter. This gets around some quirks I got with trying this stunt and hiding the roof in a layer on the camera. :) Thanks again! :)

    I am a muppet and left the clearflags set to hide the light blocking roof layer when building! :) Works perfectly on WebGL!
     
    Last edited: May 2, 2022
    Pema-Malling likes this.