4.10 Vram consuption

Hello ,

Did you figure out what is causing this?

Thanks.

I have been reaching out to developers to determine what may be causing this. I have yet to hear a reply.

Hey ,

The crash you showed is a GPU out of memory crash. You can’t set the texture pool anywhere near as large as the amount of VRAM that a card has. If you have a 4GB card, and frame buffers are 400 MB then you can probably only go to between 2 and 3 GB for the texture pool, and setting it at 4 GB is going to make performance terrible as DX11 starts swapping textures and eventually crashes for being OOM.

Nothing changed or broke from 4.9 to 4.10, the on screen message about being over-committed on the pool was new in 4.10. You were almost certainly over pool memory in 4.9 and earlier too, you just have too many large textures.

You can avoid the crash by putting the pool size back down to a reasonable value, from there you have to optimize your assets. Use stat streaming, stat streamingdetailed, listtextures, etc. Enable compression on uncompressed textures, make them smaller where it doesn’t matter, etc.

Hey ,

After carefully reading your answer I have to say that maybe I haven’t made clear what the problem is ,maybe i don’t understand what you are saying or you haven’t fully understood what the problem is.

In either case ,lets take it from the start.
Obviously it is a video memory issue. My tittle says Vram problems. I knew that.
Also I never said that I had changed the texture pool size in the .ini file other than a few times for testing. It is still the default 1000mb.The same as the 4.9 version. Just look at the crash log attached.

Why would I have to change anything (mind you that all textures are a maximum 2048x2048 size. Way below what a 980 can handle and within mobile restrictions ) in 4.10 when in 4.9 (and 4.8 and 4.7 and 4.6…) with the SAME settings I had ZERO problems and no vram issues whatsoever?

Logic says that if my textures were causing the trouble (and not 4.10) then I would have had crashes there(meaning 4.3-4.9) too with or without the red warning. The warning is nothing more than text on screen.

So in my humble opinion your reasoning about my crashes is not valid. There is something in 4.10 that causes these issues. If I had to guess is that the system does not release the textures from memory when not rendered or that it loads everything on startup even though they are not needed.

Thank you.

Hello ,

Following your advice i run some tests.
I deleted everything from my testing map and left only 1 sprite and 1 bp with my player. This is the result.

I am trying to read as much as possible about unreal and how the memory pool is used but i cant really understand what is going on.
And the picture that i am sending you is confusing me even more.

Shouldn’t the system only load what is needed for that level?
Does unreal put all my textures inside the pool even if they are not needed and thus the absurd amount of vram usage?
Why would it matter if i have a million textures on hard drive but i only use two in my level?

Is there a possibility that the settings i use for my textures cause these problems? Everything is bellow 2048x2048, Because i am a 2d game i do not use mipmaps.

I am uploading a picture with the settings i use for one of my biggest textures.[alt text][2]

Any advice is more than welcome.

Thank you.

I also discovered that if i disable texture streaming from the project settings or set a console command r.TextureStreaming 0 then everything goes back to normal in standalone window!!

Unfortunately it still crashes in standalone game or a compiled game.

There is something fishy going on with paper2d and texture management in Unreal…

This picture (map) has a few hundred sprites more than the previous one and still has the exact same texture consumption…!!

Hello ,

Any progress with this?

Thank you!

Not as of yet. I have been running some tests to see if the information regarding the texture pool size is being transferred from older projects to new ones. My theory is that if the pool size is exceeded in an old project it will give you a warning in 4.10. Because the pool size exceeds what UE4 wants to see then even if you reduce the size of what is drawn on screen the pool size remains the same.

Would you manually adjust the texture pool size and then gradually start to add assets to your viewport? Monitor the texture pool size and find out what and when the pool size is exceeded and you receive the warning.

Will try.

Is there a way for me to delete something in my engine folder or project folder in order to force unreal to “recalculate” all of my textures and materials?

I managed to replicate my issue into a brand new paper2d template project by adding a few gigs of textures. The problem was there for as long as i had that session open.But when i closed and re opened it (the editor) the problem wasn’t there anymore. I am still trying though

You can delete your Intermediate, Saved, and Derived Data cache directories from your project. This will force a recompile of your textures and materials. It might take a while to rebuild all of your shaders and please make a copy of your project before doing this.

I managed to replicate this on the standard Paper2D template.

It appears that Unreal adds all the textures that are placed inside each and every level and does not release them even when they are not needed!
For example lets say we have Level 1 and 2. Level 1 uses 10mb worth of textures and Level 2 uses 1000mb. If i run level 2 and then level 1 , then level 1’s texture consumption will be 1010mb!

That makes game development impossible.

Maybe i am missing a few pieces of the puzzle and something else is causing this, but in any case now you have proof and a project to play around that does this.

https://www.dropbox.com/s/b967h4lsnpjpoap/vRAM.7z?dl=0

Here are the stuff that I have tested on 4.11 so far with that project you provided;

  • Even if I delete everything in the streaming levels, I still get the error as if the textures are still used. But if I close and reopen the editor, the error goes away.

  • Even if I delete the maps themselves, the error is still there. Again closing and reopening the editor fixes it for me.

  • Deleting the half of the textures gets rid of the warning without closing and reopening the editor.

  • I DO NOT GET WARNINGS with “play as standalone game”. Everything seems to be working great. Even when I don’t make the streamed levels unload, I still do NOT get the warning.

  • I do NOT get crashes by any means.

  • Unused textures are still unused for me. As I mentioned before, having all levels empty does not cause the warning for me. I am sitting at 30mb max usage with your project. Ofcourse as mentioned before again, I had to close and reopen the editor.

— Personal Conclusion —

It seems the bug seems to be only related to Editor only. Raising the pool limit for the sake of being able to package might be a good solution. Though I do not know why it crashes for you. You might need to give your game to Epic eventually, regardless of it being large or small so they can see the crash themselves.

I was able to package the project, ofcourse 9000+ warnings of the sprites that it already gives when you open the project, but other than that, it seems fine.

Also I think the biggest reason why you get those warning is, there must be a bug with streaming levels, just a guess. A wild one.

Hello ,

Have you looked the project that i send you?

Hey ,

It has been determined by the developers this is not a bug, but a need for optimization. Myself as well as others have tested the project you have provided and have similar findings. As said, which forwarded to you.

"The crash you showed is a GPU out of memory crash. You can’t set the texture pool anywhere near as large as the amount of VRAM that a card has. If you have a 4GB card, and frame buffers are 400 MB then you can probably only go to between 2 and 3 GB for the texture pool, and setting it at 4 GB is going to make performance terrible as DX11 starts swapping textures and eventually crashes for being OOM.

Nothing changed or broke from 4.9 to 4.10, the on screen message about being over-committed on the pool was new in 4.10. You were almost certainly over pool memory in 4.9 and earlier too, you just have too many large textures.

You can avoid the crash by putting the pool size back down to a reasonable value, from there you have to optimize your assets. Use stat streaming, stat streamingdetailed, listtextures, etc. Enable compression on uncompressed textures, make them smaller where it doesn’t matter, etc."

Good game design practice dictates that unless you absolutely need a feature in an upcoming major engine version or release, that upgrading your entire project to a new version is almost always going to cause issues. It is suggested you remain on a single version until the completion of your project. Once you have finished and you find there are things you wish to add from other engine versions, it is suggested to download the source code and solely integrate that feature or block of code. Even this though can cause things to break, as new references are made and old ones can be lost. I know you have been working hard to get your project out and completed, but you will more than likely lose precious core game design time by fixing things that have been messed with after upgrading your version.

Thanks,