Search Unity

2D Atlases and Materials

Discussion in '2D' started by BinaryX, Sep 2, 2015.

  1. BinaryX

    BinaryX

    Joined:
    Aug 4, 2014
    Posts:
    55
    Hello,

    I'm making an isometric game. The ground is made up of different tiles each being rhombus shaped, which means the rectangular sprite containing it has a big transparent zone. When i tested this first time with 100 tiles, everything worked ok. But when the map got bigger (10,000 tiles) i just couldn't scroll through the game. In the Profiler the most consuming process was Drawing Transparent Graphics (about 90%). That's when i decided to use meshes.
    I found a free asset that's converting sprites to meshes, then using materials with Unlit/Texture shader i was able to boost the performance by A LOT.

    The problem I have now is the following : I want to group the textures into atlases to maybe increase the performance a bit more. How can I achieve this ? Currently, I can't assign a specific zone from the atlas to the material (i can do it manually using the tiling and offset but i won't be doing that to >1000 textures) and i don't think i have access to the UV map of the mesh, since it was created inside Unity and i don't have a 3D model of it in an external software like blender. How can I make this work ?

    And also, if you have any other suggestions about how to do this or any other way of increasing the performance at this scale, I'm happy to try it.

    Thanks and have a good day.