- Home /
Splitting a huge sprite and memory management?
I have a relatively large set of large textures, all 8192x8192. Unity allows importing them as such, but it makes little sense to hold such large textures for mobile environments. How does Unity process a split texture internally and in regards to spending GPU memory?
To be a bit more specific, If I use "Sprite Mode: Multiple" to divide it into sections of say... 512x512 textures and render them at different points manually, does Unity actually separate them into different textures on the GPU or is it just using UV to reference the behemoth? i.e. Do I have to splice it manually in my Graphics editor of choice and import the fragments separately?
Answer by Dave-Carlile · Jun 05, 2015 at 01:04 PM
The texture is kept intact when using Sprite Mode: Multiple
. The individual sprites are drawn from the large texture using texture coordinates.
I'm not completely up to date on the latest graphics hardware, but 8192x8192 seems very large, and may limit the hardware you're able to run on. I certainly doubt it would work well on mobile devices, if at all. I would suggest smaller texture.
That half answers my question. I also knew that the textures are too big, but I do need a large rendered surface with accuracy that's bigger than what I'm capable of storing in a single texture. Is there anyway Unity can splice a texture for me or do I have to use external tools to slice one into small bits and then somehow reconstruct it manually?
There may be some tool to split it for you within Unity, but I don't know of any. If it were me I'd just do it in Photoshop or other external app. Within the game you'd still need to treat them as separate textures. I don't know what you plan on displaying them with - a model? sprite? quad? Assu$$anonymous$$g a sprite, you can just create multiple sprites with the different textures and align them properly. You could also generate a mesh manually using sub-meshes for the different materials.
Your answer
Follow this Question
Related Questions
Sprite2D texture memory optimization 0 Answers
Bad quality of the sprite in Unity 0 Answers
Anti aliasing with sprites 0 Answers
Sprites and textureformats on Android 0 Answers
UI Sprite very pixelated 1 Answer