Search Unity

Sprites have shadows, how to remove?

Discussion in '2D' started by joostvanpoppel, Jun 9, 2018.

  1. joostvanpoppel

    joostvanpoppel

    Joined:
    Nov 24, 2017
    Posts:
    42
    Hi,

    Incoming N00b Question;
    I added some Sprites to my scene and stacked them up precisely on top of eachother;


    The left stack has 5 cards, the middle one has 16 and the right one is just a single card.
    I expected each stack to look like the right stack. Can you guys advise me on how to solve this? I already positioned the cards further away(increase Z), but thats not helping. Looking through the inspector on the Sprite Renderer I see no settings to adjust this.

    Thanks in advance!
    Joost
     
  2. bakir-omarov

    bakir-omarov

    Joined:
    Aug 1, 2015
    Posts:
    48
    As i now Unity doesn't add shadows to sprites. You have to add them using some shaders, custom scripts, or effects.
    Can you check if you already have some "shadow effect" in your sprite? You can open your sprites out of Unity and check if there is some blurry shadow effect on your image. If yes, you have to just cut off your shadows in Photoshop or in any photo editor.
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    There is no setting to adjust this. Do not bake the shadow into the cards. The shadow will multiply when it's drawn leading to that.

    So create the card art without the shadow, and create a new shadow sprite.

    Draw one shadow sprite for each stack of cards lower than the stack, so there is no opportunity for the shadows to multiply as you control it by drawing the single shadow sprite per pile (optionally).

    Side view:

    ____ card
    ____ card
    ____ card
    ____ shadow

    or

    ____ card
    ____ shadow

    It's just something you need to manually control.
     
    joostvanpoppel likes this.