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

Light effects

Discussion in '2D' started by majlan, Feb 6, 2014.

  1. majlan

    majlan

    Joined:
    Dec 30, 2013
    Posts:
    12
    I'm wondering how to create a light like the one in this video: http://youtu.be/rXDK6InUaO4?t=1m49s

    I already know that lights doesn't apply on the sprites however I don't understand the light in the video. How is it possible that the background is still visible even if there is no light and after adding that light it just goes a bit red as the light flashes? I am new to Unity so maybe I just don't get something about the lights so please explain this to me. Let's say I just want to create regular level with similar light effects in some places, how should I achieve this?

    Thank you very much.
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    There is a diffuse-lit version of the sprite shader. I think its located somewhere else in the shader hierarchy for some reason, but it's there. It's a surface shader which can accept light sources, from what I could tell.
     
  3. majlan

    majlan

    Joined:
    Dec 30, 2013
    Posts:
    12
    I see, it's the Sprite/Diffuse shader. It makes the sprites a bit darker so I created directional light which somehow lights whole scene up so it allows to correct the color back. I also tried to make the flashing light effect, I created point light and it works as expected. Thank you very much.
     
  4. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Sure. Thanks for posting that video, i hadn't seen it.