Search Unity

Help with lighting 2D

Discussion in '2D' started by hexasiel, Feb 7, 2019.

  1. hexasiel

    hexasiel

    Joined:
    Apr 20, 2018
    Posts:
    3
    Hey there,

    i've been searching for a solution for quite a while now, but I havn't found anything that would help.
    My idea is to create a 2D Game that is based on light and vision. I want to create a scene that is completely dark and the terrain and entities will be revealed only by illuminating the area. I actually found a few threats/totorials on lighting sprites, but none of these solutions worked out for me. Using the Sprite diffuse Shader or legacy transparent diffuse/bumped diffuse for my sprites for some reason does not work on black sprites, and revealing textures using it as a normal map does logically notwork either. So, does anyone have an idea how i could realize this?
     
  2. Regone

    Regone

    Joined:
    Aug 1, 2014
    Posts:
    35
    Hi,
    I didn't understand that is the issue with the Sprite Diffuse Shader.
    Did u try to make a new material based on Sprite Diffuse Shader and then apply it to the sprite render?

    If so, Make sure you have no light in the scene and try to illuminate the specific part with point or spot light.
    (make sure in Window>>Rendering>>Lighting Settings, Enviorment Lighting source is set to Color and Ambient Color to Black)

     
    hexasiel likes this.
  3. hexasiel

    hexasiel

    Joined:
    Apr 20, 2018
    Posts:
    3
    Thanks a lot! Changing the lighting settings made this work just fine! :).
     
    Regone likes this.