Search Unity

Question how to make a dark basement, with bright outside

Discussion in 'Global Illumination' started by donutguy640, Sep 5, 2022.

  1. donutguy640

    donutguy640

    Joined:
    Sep 12, 2017
    Posts:
    5
    I'm using Unity 2021.3.4f1, still fairly new to Unity as a whole (couple months), and have just realized one of the implications of "unlit" as a material shader setting. I want to be able to make the area very dark unless otherwise lit (by flishlight, hanging light, w/e)

    I also have an outdoor area, same scene, that I DO want generally well-lit. It's positioned above the basement, and I had thought a directional light would make sense, but I added a dummy block of ground, and it's lit the same as the rest, even when it's well within the would-be shadow (accounting for the light angle, of course) I'm finding it to be shiny anyway though, even after I change Workflow Mode from metallic to specular.

    I've found though, that the directional light in my scene only provides a portion of the light, and even if I delete it, everything's still clearly visible. How can that be?

    Currently using Unlit/Texture for everything in the basement, and UPR/Lit for the ground outside.
     
  2. donutguy640

    donutguy640

    Joined:
    Sep 12, 2017
    Posts:
    5
    Tried URP/lit again, and happened to notice that it chose a different texture, on its own. Eventually figured out where to even choose one (first image) I'm guessing each of those checkbox-looking things can accept a texture? (i.e., a material can have multiple maps...I still think they look like checkboxes!) otherwise seems very counter-intuitive compared to the second pic...

    In any case, for a little bit, I thought using URP/lit let things be affected by the directional light, but then I have a new problem, in addition to everything else. Despite the directional light having solid white as its color, most everything appears pink! The few things that don't, appear bluish, as if highlighted.
     
  3. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Unlit shaders are generally used for stylized environments. If lighting is of high importance to your scene, stick with the regular shaders.
    As for lighting, the workflow would differ depending on whether you'd want to use baked or realtime lighting. If you'd opt for baked lighting, you will get baked occlusion in indoor areas which will appear dark. You'd probably need to set up some post processing volumes to tweak the exposure when entering the indoor area.
     
  4. donutguy640

    donutguy640

    Joined:
    Sep 12, 2017
    Posts:
    5
    I'm thinking I'd need realtime lighting due to the flashlight...that I apparently forgot to mention...Could have sworn I did, sorry! Aside from the flashlight though, yeah, all other sources are going to be stationary.

    Should I have both baked, for the stationary stuff, and realtime for the flashlight? Also, not sure how to tell if something's baked or realtime, or what the regular shaders are. URP/lit and URP/baked lit? I'm trying both, and now everything's bluish. Trying a bunch of others, too, mostly with terrible results.

    Regarding tweaking exposure, that would just be to simulate how our eyes would adjust, right?

    I feel like if I could locate and modify this light source that affects everything, that'd accomplish what I'm trying to do.

    Thanks for the help!
     
    Last edited: Sep 9, 2022
  5. donutguy640

    donutguy640

    Joined:
    Sep 12, 2017
    Posts:
    5
    Kristijonas, I could really use some clarification of your answer, please.
    How do I tell whether I'm using baked or realtime lighting?
    Which shaders are "the regular ones"?

    It's the right color when the directional light touches it (and presumably the flashlight I've yet to add), and as dark as I would like it, the color shouldn't matter, though I'd still like to fix that as well...but it's still just too light.
     
  6. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
  7. donutguy640

    donutguy640

    Joined:
    Sep 12, 2017
    Posts:
    5
    Ok, so the issue ended up being the skybox and the default reflection probe that goes off it. I set the skybox material to none, and now the walls look like they should. I don't intend to leave it as none, but hope that now I understand enough to nullify or counter it.

    The reflection probe segment seemed to imply that the default is only in effect in places where there are no other reflection probes in effect. So, if I set a reflection probe for the basement, I can reinstate the skybox and it will still stay fixed? Faaaiirly sure of that, so as long as nobody tells me otherwise, I'm running with it.

    Thank you very much!