TextureLODGroups and NumStreamedMips=0

We are trying to disable texture streaming on a per-TextureLODGroup basis in DeviceProfiles.ini and at runtime, by setting “NumStreamedMips=0” on specific texture groups, but this value seems to be ignored.

From our investigation, “FStreamingRenderAsset::UpdateDynamicData” is taking into account only positive values of “NumStreamedMips”, whereas all other cases (0 and -1) are considered in the same way by “if (NumStreamedMips[LODGroup] > 0)” statement. Should it be changed to this version to also include “==0” case?

if (NumStreamedMips[LODGroup] >= 0) { ... } else { ... }

Or maybe is it better to modify “UTexture::GetResourcePostInitState” in the following way?

bool bStreamingTextureLODGroup = (UDeviceProfileManager::Get().GetActiveProfile()->GetTextureLODSettings()->GetTextureLODGroup(LODGroup).NumStreamedMips!=0);
bTextureIsStreamable &= bStreamingTextureLODGroup;
bAllowStreaming &= bStreamingTextureLODGroup;

Regards

[Attachment Removed]

Steps to Reproduce
Repro steps

  • Get Lyra at //UE5/Release-5.7/…@48893968
  • Add “Windows DeviceProfile” section to Lyra\Config\DefaultDeviceProfiles.ini
  • Set “NumStreamedMips=0” in all TextureLODGroups entries
  • Create a Windows package
  • Set a breakpoint in “FStreamingRenderAsset::UpdateDynamicData” at the “if (NumStreamedMips[LODGroup] > 0)” line
  • Debug the game
  • See that “NumStreamedMips[LODGroup]==0” case is always managed in the same way as “NumStreamedMips[LODGroup]==-1” case when computing “MinAllowedMips”.

[Attachment Removed]

Hi,

thanks for reporting this. Searching UDN, I have found two similar cases where NumStreamedMips=0 did not have the expected result:

[Content removed]

[Content removed] (this case is in Japanese, but you can right-click in Chrome to translate it to English)

From the cases above and your findings, this seems to be a bug. As for your question about which solution would be best, I will pass this to Epic for someone with more knowledge about the texture streaming system to answer.

If you have further questions or comments, please let me know.

Thanks,

Sam

[Attachment Removed]

Hi Paolo,

You are correct; it appears there is no explicit option to turn off texture streaming per TextureLodGroup by setting NumStreamedMips to 0. I just wanted to let you know that your proposed workarounds are ok for now. I recommend using both of them for safety, but I have also filed a ticket with the development team to investigate implementing a proper fix. You can follow along the progress of the work on our public issue tracker here: https://issues.unrealengine.com/issue/UE-359907. If you have any further questions, please feel free to let me know.

[Attachment Removed]

Thank you very much for the additional investigation.

Consider that we’ll be OOO next weeks so it could take some time for replies from our side.

Regards

[Attachment Removed]

Hi,

I’ve passed on your question to Epic. Please keep in mind that Epic’s offices are currently on a winter break and will re-open on Jan 5.

Thanks,

Sam

[Attachment Removed]

Thank you Tim for confirming the NumStreamedMips behaviour.

As you suggested, we’ll keep both workarounds while waiting for your official fix.

Best regards

Paolo

[Attachment Removed]

You are welcome! If there are no further questions, I will go ahead and close out this ticket. Please let me know if that’s ok with you.

[Attachment Removed]