I have a** 2.5d platformer** with the camera traveling linearly from left to right until end of level is reached. In this level I need to be able to load high res 4K sometimes 8K textures on backgrounds and objects.
Even though the level is not infinitely big I do run the risk of running out of video memory on lower end cards to keep all those high res textures all loaded at level start which in my case are the largest memory consuming part of the game.
I have been reading quite a bit about texture or object streaming and mipmapping, I suppose the only two methods currently available to assess and optimize (I am excluding the newly implemented virtual texturing for the time being). But i’m still a bit in the dark here as how the workflow logic behind them is working, how the hardware is communicating with the engine and how best to optimize all this.
I know this is a big topic to cover but I’ve been browsing around in forums and many new devs ask this question and end up with bits and pieces of information. I hope some of you can point out a good chunk of info in this post to have it less spread out perhaps for other people who might be interested other than myself.
I will lay out what I get out of the two methods so far and hope someone can clarify them further.
Mipmapping:
I understand that mipmapping is an autogenerated process by the engine to split your texture into different resolutions (512, 256 etc…) and switch between them for either better bandwidth or to avoid flicker problems on distant objects, here are my questions for this method:
1 - What if I don’t have any distant objects so the flicker question is out the window for me.
2 - The texture is supposedly already being loaded inside Vram and then split up? and by doing so according to some users this adds 33% more consumption on video card memory, how is this helping?
3 - What is bandwidth and how is it being used exactly?
4 - Mipmapping sometimes causes artifacts as it shows the textures being loaded from low res to high, which is undesirable.
5 - What If I don’t want to use mipmapping and would like to keep textures as they are since only one or two sections of the levels is viewed at one time.
Perhaps for a 2.5d platformer type games texture streaming is better since (correct me if I’m wrong) I don’t see how mipmapping helps in this case?
Texture streaming:
From my understanding Texture streaming loads textures similar to level or object streaming inside ue4. If the camera is not looking then it doesn’t need to be shown on that specific level section.
My questions:
1 - Are the textures stored inside Vram or are they being loaded from Hard drive onto Vram when called for? I suppose the latter?
2 - I read the docs, but can someone better explain to me how this whole thing is working?
3 - During object streaming in my levels I’ve been noticing a small glitch during gameplay during the trigger when loading them. Is this something I can also expect to happen when trying to stream textures?
4 - Any recommended good tutorials on the usage of this subject.
Object and level streaming during game play:
Ultimately is it not better to keep textures as they are without mip maps and texture streaming and instead simply load them with the object/level streaming instead, in a case of the type of game I am referring to? Since the objects already include the textures so why separate the loading process when in any case i may be streaming object load during gameplay?
But then again someone may be able to tell me the pros and cons of all this. One of which I already mentioned above there are glitches and game pauses happening on every object load/stream during gameplay, perhaps I need to spread out and make more micro loadings on a larger span of time?
How would you best approach optimizing levels for this type of game?
Thank you in advance!