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. Dismiss Notice

Question [2020.1.11]Top Down flashlight lighting

Discussion in 'Global Illumination' started by Hilifrio, Nov 1, 2020.

  1. Hilifrio

    Hilifrio

    Joined:
    Feb 6, 2020
    Posts:
    10
    Hello evryone, i'm a beginner in game developement and i recently create a little project to figure out some features like lighting.
    My game is a little top down shooter. In a way to give give it an horror survival game atmoshpere, I tried to add a flashlight effect with reduce visibility. However i'm not satified by the result. Indeed the lights are not looking very realistic and i don't know what to do to fix that.
    I tried to add light probes and i baked lightmaps but if i've understood this is for static lights only?
    For now I just want my flashlight's light to have a realistic reflection's effect on my character and others items as well.
    I set up the environment lighting on black to control the contrast so my character is completly black and i don't know how to reflect the light on him..

    Thanks and sorry if my English is not very good ^^'!
     

    Attached Files:

  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    I screenshot from another game for what you're trying to achieve would be helpful.

    In general, if the spotlight is not directly shining upon your main character, you will not see light on your main character. You could fake it by adding a short radius point light without shadows where the spotlight is, but then again I'm not sure what you're trying to achieve.
     
  3. Hilifrio

    Hilifrio

    Joined:
    Feb 6, 2020
    Posts:
    10
    Thanks for your answer and yes this is what i'm trying to do, reflect the light on my main character but for now i fake it as you said i just wanted if there is an other way to properly do this but it seems not :/
    The fake light in blue and the light of my flashlight in red:
    Capture3.PNG
    However i've attached images in my first message, you can't open these?
    View attachment 727907 Capture2.PNG
    The other thing is that i would like to know how to reflect the flashlight when i'm near a wall, but i d'ont know if how to do it in real time because I obviously can't baked the flashlight's light..
     

    Attached Files:

    Last edited: Nov 1, 2020
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    I can open the images in your first post, but I meant posting images of what you want to achieve, not from what your game looks like.

    Your use case sounds like what Enlighten was meant for, unfortunately that is now deprecated in Unity.
     
  5. Hilifrio

    Hilifrio

    Joined:
    Feb 6, 2020
    Posts:
    10
    Yes sorry i misunderstood ^^' here are my best skills in paint:
    Capture4.png
    I would get this little boucing effect of the light on differnts surfaces like walls or the ground, this way as my character get closer to a wall or something, the light reflection get brighter on him.
    Is this feature deprecated in Unity?
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    The feature that would sort of do that was Enlighten, Enlighten is deprecated, there is replacement coming, but it's not here yet (and it probably won't be mature enough for a while).

    There are ways to fake this though, but they are way too involved to explain in a forum post from the top of my head.
     
  7. Hilifrio

    Hilifrio

    Joined:
    Feb 6, 2020
    Posts:
    10
    So there is no way to do that in unity for the moment if i've understood.. The only way to get active lighting is by using Unity prefab lights and kind of tinking it?
    And for static lights the reverberation on non static items like characters is made by probes? If i get it well ^^
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    Yes.