For our game, we have many little selectable characters that you can play.
Currently, they all share a single 1024x1024 UV sheet where they are organized in a 4x4 grid.
Eventually though, we are getting to a point where we are running out of space and will need another texture atlas.
I was thinking - is it actually worth doing it that way for draw calls, or does Unity do something under the hood that will atlas it anyways? For example, it would be much easier for us if each little character mesh had its own texture associated with it, and we just called in the new texture when you swapped characters. This way we could just have a library of single textures.
I suppose doing it this way would require the use of only a single material, and then programmatically swap in a the new texture to the same material when required, correct?
Is this effectively the same thing as one single texture atlas?
Do it the easy way first. Just make 512x512 textures for each character, or whatever they need. Get it working and complete, and then go back and run the profiler. Worrying about things like this before you know if they’re even going to be a problem is a bit backwards. Changing this later is not a real big deal, you can move the UV islands around to pack them onto a larger texture atlas later without too much work, but trying to put this into your workflow if it’s not necessary is just making work.
I suspect that in most games this isn’t going to be an issue, but it depends on how many character you have on the screen. If you have just 10 characters or something, then no, I suspect it won’t matter at all.
You’ll notice that there’s only ever one character on screen during gameplay (its the main character that you select from a selection of character types.) The only time you see more than one is when you see 6 at a time during the character selection screen. 1 texture atlas, and 1 material.
The reason Im asking is because I currently have a texture atlas setup for them as I said, but we want to make more balloon types and I’m running out of space on the atlas. To simplify, i’d rather have one texture per balloon.
Let’s say I change it so that i have 1 texture per balloon, and also 1 material per character - will that be a bit much once we hit, say, 100 characters? The other option, as I mentioned, is have 1 texture per character, 1 material, and then just swap out the texture in the material to match the required balloon.