Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Normals and SpriteAtlases - Serious Bug?

Discussion in '2019.2 Beta' started by thormond, Jul 5, 2019.

  1. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33
    I'm using a Sprite with normal channel (_NormalMap) added via SecondaryTextures (sprite editor). It works well until I actually drop that Sprite into "Objects for Packing" field under Sprite Atlas.

    The sprite is affected by 2D lights that have "Use Normal Map" field checked, without that enabled the issue doesn't appear at all (hence the conclusion that it has to do with how normal map channel and atlas interacts)

    before adding to atlas:

    after adding to atlas:

    It's as if the _NormalMap channel gets stretched to the Atlas size which produces those artifacts

    Any idea if there's a way of fixing it? (I know you can make your own atlas in photoshop and then use Sprite Mode: Multiple and it should work around the issue, but that's downgrading the workflow a lot)

    Edit: If that Sprite is the only thing in the atlas this doesn't occur, so it is stretching the normal after all.
     
    Last edited: Jul 5, 2019
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please submit a bug report for this issue and reply in here with the issue ID?
     
  3. thormond

    thormond

    Joined:
    May 11, 2013
    Posts:
    33
    I received an email after sending in a sample project with the bug reproduced, the title contains "(Case 1167829)" so I guess that must be the ID you requested.
     
    Peter77 likes this.
  4. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    335
    Currently SpriteAtlas doesn't support Sprites with secondary textures, meaning secondary textures won't be combined and put into an atlas texture, so you'll have to make atlases manually in this case. We had an internal dev branch that makes Sprite Atlas and secondary textures play nicely together, but that still needs some more work.