Possible to have a 3d models texture in a sprite sheet?

I am trying to cut down on the size of my mobile game it currently is at 117mb. I have quite a few models in the game and I really want to cut down the size of my game more.

Is it possible to compress the textures of a model into a sprite-sheet and then assign each texture individual to the material. Or is this not possible?

Or are there ways around this, I have already looked at the Unity documents on how to cut down size of an app. This I have done already. Deleted a few textures and UI I didn’t need but still quite a big game for not much in it. :confused:

Thanks guys!

It is possible to use a single texture like what you want, but it isn’t something that you would do in the Unity editor like you think. I should also mention that it won’t really save space because you are still storing all of the images, even if you are storing a 1024x1024 instead of 4 512x512 images(as an example) because you still need the same space for the same pixels. What you would save instead would be materials, and therefore you would increase drawing speed by the automatic batching of same materials. Now, if you cut down the texture sizes, that is another story, but then you also possibly cut quality, depending on what size they are now, and how big the objects are on the screen.

If you have already made your models and UVs, then the procedure for creating texture Atlas sets for your game will be quite tedious, depending on how many models you have. You would basically take the textures for your models, put them together onto a single texture(which is therefore much bigger, depending on how big the textures are and how many you are including. Then you would adjust your UVs to only use the corresponding portion of the texture instead of the whole UV space. So if you put 4 textures onto 1, then you would have one object use one corner. Then the materials would all use the same texture, while each object would only access the portion it needs.

Remember that this will save draw calls, but unless you change your texture sizes, combining them won’t save any real amount of space.

I recommend you take a look at the size of your game. And the part I’m getting at is to not over optimize, and to not sacrifice quality if it isn’t worth it. If your game actually merits 117mb, as in the quality is there, and there isn’t really anywhere to save space, I would leave it as is. Sometimes you can’t save anymore space without sacrificing quality. You might be able to change your game’s music for example to save space. You could make all your sounds mono if they aren’t already, because since they are on mobile, I don’t think Stereo sound makes a difference, so your players won’t notice the loss. But if you chop texture sizes to an extreme, your objects that get close to the camera with too few texture pixels will have texture stretch, which may be noticed by your players, depending on how bad it is. There are things that just aren’t worth optimizing, so optimize where the sacrifice doesn’t matter, and the rest of the space will be needed.

Also, remember that space isn’t at the premium it used to be. There are mobile games that are multiple GBs of space, and if your game is not some simple puzzle game, rather has varied graphics, etc… then 117mb is really a pretty small amount, at least IMO.

1 Like