Search Unity

Best way for mobile texturing

Discussion in 'General Discussion' started by BloomBytes, Nov 27, 2021.

  1. BloomBytes

    BloomBytes

    Joined:
    Jul 11, 2017
    Posts:
    7
    Hello,
    I need some tips on how best to use textures in mobile games.
    At the moment my game has a gradient style, I chose this so I can keep textures very small and render all objects in a scene with the same material (texture).
    Now I'm thinking about using stylized textures to get a better look.
    For this I would need several textures or much bigger ones if I combine several textures to one big one.
    Do you have any tips on how I can best solve this? The game should also work on older smartphones.

    At the moment I'm also texturing with Blender. Do you have any better programs that you can recommend?

    thanks :)
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    Frankly, if you are not going for a full pbr workflow, where you would need 3-4 maps per material (and it sounds you aren't), there isn't much you need to do to accommodate mobile phones.

    Just don't go too crazy with resolution.

    Are you painting with blender? What are you doing exactly?

    The go-to texturing app these days is something like Substance Designer / Painter, but its usefulness is much more limited if you're not going for full PBR.
     
  3. BloomBytes

    BloomBytes

    Joined:
    Jul 11, 2017
    Posts:
    7
    @AcidArrow

    thanks for your answer :)

    I don't work with normal maps or anything else. Each material has only one texture.
    I work with "Projection from view" in Blender to assign a gradient to a part of the object in my texture which I prepare first in Photoshop.
    I do not draw in Blender. However, I'm still quite a beginner in Blender, especially when it comes to texturing.

    But if I create a texture for each object with a size of 256x256 and then I have about 20 materials in Unity, the drawcalls increase extremely. Is there a solution for this?

    another option would be to pack the 20 256x256 textures together. However, I would then have an extremely large texture.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    Going up to 100 draw calls is trivial these days. Even in somewhat older phones. But yes, you could bundle them together.
    1k maps are really no issue for mobile phones. You can pack 16x256 maps in a 1k texture and potentially reduce draw calls a lot.

    But if you are still worried about taking too much memory with textures (and you shouldn't be) and your art style is mostly gradients, you could either use vertex color and then have no textures at all.

    OR

    You can have an image with multiple gradients and then just place your UVs accordingly.

    See this image for example: https://twitter.com/andreintg/status/1442395164941692930

    And this video:
     
    Ryiah, Billy4184 and zombiegorilla like this.
  5. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    If you still have performance problems with lot's of textures causing lot's of draw calls, there are free and paid solutions to atlas your textures. Atlasing combines multiple textures and materials in to one, which will allow more objects to batch. I wouldn't bother unless you are having real problems, though, since having separate materials is easier to work with. As always, use the profiler to find your real bottlenecks.
     
  6. GimmyDev

    GimmyDev

    Joined:
    Oct 9, 2021
    Posts:
    160
    You don't necessarily need an atlas if your objects use the same texture source, what you need is to pack the island of each objects in that single texture, which is a different deal altogether, and might save some space but having tighter packing.

    Also one big texture is better than many small texture, texture has be power of two, but they don't have to be square too.