Download

Texture Memory Used

Greetings!

  1. On the screen - the authorization level. But if you look at the stat memory - we see that “Texture Memory Used” is already 976 MB !!!
    And “listTexture” shows 3k files.
    Feeling, that ALL textures in the game are loaded immediately upon starting the game. How do I fix this?

  2. This is an android game and if you play it for a long time (at different levels with different textures), then the phone starts to slow down. The feeling that ALL textures are loaded into memory and remain there forever until you restart the game.
    How to fix it?

I really hope for your help.

SCREEN: https://i.imgur.com/cBZqnoc.png

So im still very new to UE4 but what made a great difference in my game is using streamed textures. I’m not sure how it would work in a mobile game but its worth a shot. Try going into some of your expensive (like 4k or 8k textures) texture files in UE4 and changing the ‘Power of two Mode’ to ‘Pad to power of 2’. This will make them basically nothing when not in view.

Alternatively if you have a lot of 4k/8k textures you can change the max texture size it loads in so it uses a lot less video memory. This is still in the texture file itself. Type ‘max’ in the texture search bar and you will see a ‘max texture size’ that you can set. Once applied you will see the stats at the top of how much video memory its going to use. Hopefully that helps. I think i remember something along the lines of dont try to stream textures that are user interface as they’ll come out messed up so dont bother changing those to pad to power of 2.

Thanks for the answer!
I’ll try!
Could it be that I have arrays in gameInstance with almost all the textures in the game?

All textures are streamed depending if they are loaded in the level and are visible or not. Also, check your resolution on textures.

Thank you for the answer. I optimize my textures, but listTexture gives me textures that are not used in any way at the level.
I have an authorization level, a maximum of 100 textures are used there, and listTexture print more than 3k.
It means that these 3k textures are loaded … but why?
Even if I create an empty level, listTexture will still show 3k textures loaded.
I’m confused = ((

Its possible. Any time you reference something that links to a texture or a group of textures, it loads them. Try removing a bunch of textures that arent in the main level you’re viewing (dont save just compile and play’ then leave play and undo the delete and save.

Hey. Thanks for the post, but I tried it. In my project, I created an empty level, replaced gameInstance with an empty one, but still listTexture still shows 900 MB of memory. On a blank map. With an empty gameInstance.
I don’t understand why all the textures of the game are in memory.

One of the forums told me - I share with descendants. I haven’t finished it yet, but it seems that the point is that arrays need to be made “Soft Object References”, not “Hard Object References”. Then the array elements will be loaded as needed, when we call them, and not all at once!