- Home /
Which one is better for iOS?
Hello. Which one is better for iOS -> using 20 of the 2048x2048 texture and 20 material or using 40 of the 1024x1024 texture and 40 material. thx.
Answer by Jessespike · Aug 10, 2016 at 05:18 PM
Well the difference between 1024x1024 and 2048x2048 is a power of two. So not sure why your material count only doubles, shouldn't it quadruple?
If you simply compare the memory required for textures:
1x 2048x2048 @ Truecolor = 16 MB
20x 2048x2048 @ Truecolor = 320 MB
1x 1024x1024 @ Truecolor = 4 MB
40x 1024x1024 @ Truecolor = 160 MB
From a memory point of view, 40x textures at 1024 would be better option. It's half the memory required.
Now, in case you messed up the material count and actually meant 160x textures sized at 1024, the memory required would be the same (320 MB). I'm not sure which would be the better option here, I don't like either, as they both seem excessive. But to answer the question, I guess using the smaller textures would be better, because then if an object is being culled then it's texture won't have to be drawn. If you have objects using a larger texture as an atlas, then the entire atlas will need to be drawn even if one object only uses a portion of the atlas.
Then again the answer depends on the application, maybe all textures are always present and you want to perform batching, then using the larger textures might be better.
Thx for the reply. 2048 texture is only 2x the 1024 texture size. Not 4x. So yes double the material.
I have a huge terrain and Unity doesn't allow multiple textures per material. I was going to assign multiple texture UVs in 1 material. but thats not going to work. So i'm going to chop up my mesh into 20 or 40 diffrent mesh and texture that way. Bigger texture and less material or small texture and more material. Im tryina figure out which one would be better for memory.
[my terrain is unique so there is no seamless texture involved]
A 2048 texture is indeed 4x the size of a 1024. Unity also will allow multiple textures per material, but that all depends on the shader it is using. You are also asking about iOS, which means you will most likely have a concern with draw calls depending on how you break up the mesh and how much can be batched.
As far as memory is concerned, the vast majority of the time your issues will be with textures. If they are using the same material and you are not modifying it, that material should only be in memory once, and the same for the texture. $$anonymous$$eaning if nothing ever changes in your scene, the smaller texture and more materials would be more memory efficent.
When it comes to mobile though, the thought is usually to use larger texture atlases to share draw calls if you can afford it memory wise. The biggest battle for mobile (especially if you are supporting like an iPad 2), is the memory vs draw call, so that is certainly something for you to consider. If you cannot batch all of those objects, each one of those small meshes is now a draw call. With some devices only wanting to handle as few as 50 draws per frame, if you have a complex terrain, that could quickly get out of hand.
Thank you. $$anonymous$$y bad with the textures. Can you tell me which shader allows multiple UV textures? I'm planning to use unlit because it's a mobile game. I can do this too: Have one high poly model and 40 material for every UV texture for specific area for the whole model. Without mesh splitting. Less draw right? Ideally im looking for make 1 material for 1 80$$anonymous$$ tris polygon mesh and that material will have 40 slots for my textures for every UV texture.
$$anonymous$$y target is iPhone 6 and above im not worried about not running on lowr devices than the 6. iPhone 6 is packing lots of power so im not too worried about it.
Your answer
Follow this Question
Related Questions
Splitting Large texture among multiple planes 1 Answer
max texture size ios 1 Answer
Unity iOS forced 1kx1k 2 Answers
IOs App much bigger than Android-App 0 Answers
iOS texture size 1 Answer