Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What is smarter: several smaller textures or one bigger texture atlas

Discussion in 'General Graphics' started by Tech-Labs, Oct 21, 2019.

  1. Tech-Labs

    Tech-Labs

    Joined:
    Feb 5, 2014
    Posts:
    105
    Hi,

    So say I have three 1k textures that I apply to a block of houses (one object).
    What is smarter to do in balancing memory use and speed:

    1) Keep using the three separate textures, using less memory in total
    2) Create a 2k atlas for these textures, using just 1 textures but of a total size that's bigger than the three 1k textures

    Cheer!

    Marco
     
  2. BakeMyCake

    BakeMyCake

    Joined:
    May 8, 2017
    Posts:
    175
    It's useful to refresh what atlassing is done for - it lets you use the same material for all of your house blocks. This in turn lets Unity(or you, if you're willing to go that deep) batch all houses into one draw call(ideally).

    In your case atlassing will use more memory, but may give you a reduction in draw call count due to better material recycling. Or it may not, because we don't know your setup. Maybe you won't be able to recycle one material due to other reasons, or maybe it's one of those situations where the batcher can't group houses together anyway, because they're lit by different light sources. You'll have to measure the result yourself.

    Generally it tends to be beneficial, and video memory is huge these days.
     
    pahe likes this.
  3. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    as said : speaking strictly, atlasses are a drawcall solution

    If you do not encounter drawcall bottlenecks you can forgo atlasing for advantage individual materials namely organization, UV's, smaller updates per texture swap.

    fallback advantage :
    • Individual image/material workflows -> atlasing solutions can be automated bundle/build or at runtime
    • Easier than a team that atlas early-on who then has to un-atlas
    - you want to avoid atlassing when it wasn't needed;
    (...but usually it will be in some form)

    It is a bench-marking|profiling issue specific to your game once stood up/vertical slice running on desired platforms
     
    Last edited: Oct 23, 2019
    ron-bohn likes this.