We’ve been seeing some weird issues lately. We have a gas giant in the background of one of our scenes:
This gas giant is a static mesh component inside the sky sphere blueprint.
We find that once the frame rate slows down to around 65 FPS, we seem to get major LOD thrashing issues, where the texture on the gas giant will repeatedly swap back and forth between high and low LOD levels.
Alternatively, perhaps this might be a mip level issue?
We’re not seeing anything in our LOD settings that would cause this; the static mesh for the gas giant only has one LOD.
We’ve seen this on some of the other objects as well, such as rocks on the terrain.
How do we diagnose this? Also, is there a setting somewhere that lets us control the frame rate at which it swaps to a lower LOD? We’d rather keep the higher LOD until the frame rate gets a lot lower.
Thanks, Andrew – we’re looking at that, along with some other things.
We need it the gas giant to be circular so that we can properly animate the clouds that swirl around it.
It seems to be related to texture streaming; we’re finding that setting r.Streaming.PoolSize to 4000 (from 1000) seems to resolve the problem. We’re also investigating whether we can just turn texture streaming off entirely will resolve it – our game is a strategy game that only loads a single map once, so we shouldn’t really need to do any streaming at runtime.
Also, we noticed the following in ContentStreaming.cpp:
#define MAX_STREAMINGDISTANCE 10000.0f
that seems to be a bit of a small distance for us. A single tile on our game grid is 512 Unreal units across, so the streaming distance is only ~19.5 of our grid tiles.
You say you have added this Static Mesh to the sky_sphere_blueprint which could be causing issues with the scene lighting itself. Is there any particular reason for adding it to this blueprint?
Also, is there a reason you guys have created a large static mesh to represent the gas giant instead of using a large plane? I ask because this meshes scale, poly and vert count, and tessellation, could be causing a large performance hit to your scene.
As for the ‘texture thrashing’, you can force the static mesh to use a particular LOD within the details panel when you click on the actor. Look within the ‘Rendering’ section to locate settings that can affect the issue you are seeing.
Static Mesh - Details - Rendering
I still suggest the plane with a material animating the actual gas surface itself, as this will save you a lot of complications like the ones you are experiencing. You can disable texture streaming by opening your texture settings and checking the option to, ‘Never Stream’.
The option is highlighted in the image at the bottom.