Texture streaming (and manual mipmap application) does not affect current memory loaded for textures
Hello everyone !
I'm a programmer in a little video game studio, we are developping a FPS game and we just changed our UE version from 4.17 to 4.19 this week. We didn't have a lot of trouble to do that, but with the 4.19 version, the texture streaming system doesn't work as expected.
We make our texture with a dimension of 4096 x 4096 and with 4.17, the texture was fully loaded in memory only when the player was close of the object mapped with the texture and the mipmap level was changed when the player went farther. So the texture was not fully loaded if the player was far away. In result our streaming pool was fine and the game looked nice.
Since we are working with the 4.19 version of UE, the texture streaming doesn't work as expected. All of our textures are fully loaded even if the player is far away from every object mapped with it. Even if we change manually the mipmap level, the memory loaded is not affected (i.e if we set manually the mipmap level at 1 of a texture where the maximum dimension is 4096 x 4096 with a memory size of ~11 MB, the current dimension stay at 4096 x 4096 and the current loaded memory is ~11MB, but the current dimension should be 2048 x 2048 and the current memory loaded should be ~6MB). The result is a texture streaming pool over error in machines with less VRAM than 6GB.
To reproduce this bug :
Expected result : The texture current dimension and current memory should decrease when the distance between player and the cube increase.
Obtained result : The texture dimension and current memory do not change.
You will see that the texture is always fully loaded and its current dimension is always the same than its maximal dimension.
Here you can see the texture properties :
And here you can see the result in the statistics window :
We would like to know if we are missing something or doing something wrong. If so, is there a way to apply texture streaming correctly and change the current dimension and memory of a texture depending of the distance between player and the objects mapped with this texture ? Increasing streaming pool size seems not to be an acceptable solution.
Thank you in advance for your answer.
asked Jun 21 '18 at 09:32 AM in Rendering
We've misunderestood the Texture Streaming workflow. What we reported is not a bug but the correct behaviour of the feature. In fact if you have enough VRAM to load all textures in the map at their maximal definition, they will be loaded at their maximal definition.
The problem we had was that the engine did not refresh the texture streaming data correctly because of an intern black magic and the result was that the used mips level were not consistent with the distance between meshes and the player point of view.
To solve this problem, we modified one of our oldest texture, rebuild the Texture Streaming data, revert the modification and build again. This should have forced the update of the Texture Streaming data.
We hope that solution will help someone else and we apologize for the wrong bug report.
answered Jul 06 '18 at 08:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here