Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Is there any way to add a material with a normal map to a SpriteShape sprite?

Discussion in '2D Experimental Preview' started by tmcdonald, Oct 13, 2019.

  1. tmcdonald

    tmcdonald

    Joined:
    Mar 20, 2016
    Posts:
    20
    Hi all!

    I'm playing around with 2d lighting and sprite shapes. I know with a sprite renderer, I can just assign a material that has a normal map on it to get the lighting effect I desire. I have a sprite with an accompanying normal map texture that I really like the look of (and the 2d lighting works perfectly with it on a sprite renderer.) But I don't know how I can pull this off with a SpriteShape. Does anyone know a good way to make this work?
     
  2. tmcdonald

    tmcdonald

    Joined:
    Mar 20, 2016
    Posts:
    20
    I wanted to add an example to demonstrate what I'm talking about:



    The object on the left is has a SpriteRenderer with the same sprite and a material with a normal map I created. On the right is the sprite shape I created with this sprite. But I cannot find any way to use the normal map with it.
     
  3. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    48
    Hi @tmcdonald ,

    If you use latest 2019.3 Editor together with the latest packages:
    Universal Render Pipline 7.1.2
    SpriteShape 3.0.5

    ===
    You should be able to use Normal Maps.

    1. Add the normal map via Secondary Texture Module in Sprite Editor window.

    2. Make sure you activate the "Use Normal Map" checkbox in your 2D light
    upload_2019-10-21_17-50-45.png

    3. Also use this "Enable Tangents" in your Sprite Shape Controller to make sure the Normal Map orientation is correct throughout the SpriteShape.
    upload_2019-10-21_17-51-45.png