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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Animation of sprites with normal maps

Discussion in '2D' started by iShadowfax, Nov 30, 2015.

  1. iShadowfax

    iShadowfax

    Joined:
    Mar 18, 2015
    Posts:
    38
    Please explain how to make animation with sprite renderer so that it would use normal maps sliced from sprite sheet.

    I want to use normal maps while animating sprites for lightning .
     
  2. iShadowfax

    iShadowfax

    Joined:
    Mar 18, 2015
    Posts:
    38
    Any help?
     
  3. iShadowfax

    iShadowfax

    Joined:
    Mar 18, 2015
    Posts:
    38
  4. Andreas Loew

    Andreas Loew

    Joined:
    Feb 27, 2013
    Posts:
    17
    Your sprite sheet and normal maps sheet both must have the same layout - it won't work otherwise.
    Create a material that supports lighting. Add the sprite sheet as albedo, add the normal map as normal map.
    Create the animation and assign the material. That's all.

    Here's a tutorial that explains the process a bit more in detail:
    https://www.codeandweb.com/blog/2015/05/04/2d-dynamic-lighting-tutorial-for-unity
     
    iShadowfax likes this.
  5. BoraG

    BoraG

    Joined:
    Dec 17, 2014
    Posts:
    9
    TexturePacker and Sprite Illuminator is way to go. Price is a little bit high but it makes the job done within minutes.
     
  6. ChrisVranos

    ChrisVranos

    Joined:
    Sep 5, 2016
    Posts:
    6
    Have any of you had success with animated normal maps on iPhone? I'm using a spritesheet, as described above, and it works on my PC. However my normal maps are mis-aligned and flicker a variety of strange colors on iPhone 5.