- Home /
A question on the optimization... (mobile 3D game)
Simply question: For a mobile game, is better four 256 textures and four materials or one material and a 1024 texture ? ( 4 texture in 1 ), thank you :)
Well that's strange...
From my point of view, Having 4 different textures and materials would make it harder for the system to identify and assign those on the game, but it would be better for the size of the application overall. Now having just 1 texture and 1 material is a lot better to identify and assign, but it's bad for size so... It's some kind of 50/50 thing. I guess none of them would actually matter...
Answer by Bunny83 · Apr 23, 2017 at 11:45 PM
In mobile games you should keep your draw calls (set pass calls) as low as possible. Every seperate material requires a seperate setpass call. The main point of using an atlas texture is to reduce the drawcalls. Unity will automatically batch objects with the same material together if possible and draw them in one go.
However using an atlas requires you / Unity to do some additional setup work. For example 3d models have to adjust their unwrap (UV map) so it's using the right portion of the texture.
If you're able to fill all the space of your atlas texture, there's no other disadvantage. Though if you pack textures of different sizes into one atlas, there's usually some "wasted" space. However that's usually neglectible.
ps: textures are two dimensional data so they have a width and height. If you have 4 256x256 textures you need one 512x512 texture to pack them together. A 1024x1024 texture could include 16 textures of the size 256x256.
Your answer
Follow this Question
Related Questions
optimizing game material with emission map? 0 Answers
Is it bad to have this many materials? 2 Answers
Some texturing questions... 2 Answers