Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to align a smaller normal map to a texture atlas?

Discussion in 'General Graphics' started by Pun_Mister, Sep 14, 2023.

  1. Pun_Mister

    Pun_Mister

    Joined:
    Jun 5, 2023
    Posts:
    13
    I'm trying to align a 64x64 normal map to a 64x64 texture, the issue is the texture is a part of a larger texture atlas. Does anyone know how I could align the normal map to the specific part of the texture? I'm comfortable with using blender if it relies on placing the UVs somewhere else or something.

    Using URP
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,581
    You just have to put your normal map islands in the exact same position and rotation on the normal map atlas as the texture islands are on the texture atlas.

    I mean, if you are making an atlas of albedo maps, then I assume you're making an atlas of normal maps too? Just make them the same.
     
  3. Pun_Mister

    Pun_Mister

    Joined:
    Jun 5, 2023
    Posts:
    13
    I think you misunderstood, I don't have a normal map atlas, only a texture (albedo) map one, since most objects in my scenes wont really need a normal map, but one (or in some cases a couple) do. I was just wondering if I could match up a single one to a specific coordinate on the other one. But yea it is a lot more straightforward with a matching atlas. Though for mobile optimization purposes I'd rather not have so much wasted texture space
     
  4. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,581
    If you have only one object that has a normal map and the rest don't, then just skip that one object when you create your texture atlas.

    The only alternative is to write a shader that uses different uv map for the albedo and normal map. This option is almost certainly not worth the effort, though.
     
  5. Pun_Mister

    Pun_Mister

    Joined:
    Jun 5, 2023
    Posts:
    13
    Got it. I suppose it's not world ending to have to have an extra texture. Thank you ^^