Required CLs for using LODBias_VT in UE5.4

(This is a translation of a [Japanese [Content removed] by Tsubasa Shibata.)

Thank you for your continued support.

Based on the research into the LODBias_VT feature available in UE5.6, I tried to use it in UE5.4 as well by merging CL 40870803, but unfortunately it did not work as expected.

I’d appreciate it if you could let me know if there are any additional CLs that need to be merged to use this feature properly.

Also, if the scope of required modifications is supposed to be quite broad, please let me know. Such information would be very helpful, as well.

Thank you.

[Attachment Removed]

Hello,

Thank you for reaching out.

Can you please describe the issue you are seeing when integrating the CL? Does it affect all virtual textures or a specific set of virtual textures?

If the issue is specific to UDIMs, this issue might be relevant to you:

[Content removed]

[Attachment Removed]

[mention removed]​

(This is a translation of a Japanese post by .)

Thank you for your reply.

The issue I’m seeing is as follows:

After merging the CL, I built DevelopmentEditor/Win64, and then opened Tools → Platforms → Device Profiles from the editor menu. Under the Windows settings, I set the LOD Bias VT values for World, Character, and Effect to 4, saved the settings, and and created a Win64 package after confirming that the following entries had been added to the [Windows DeviceProfile] section of UE/Config/DefaultDeviceProfiles.ini.” Then, however, I did not observe any effect on any virtual textures.

Also, since the textures used in this case are not UDIMs, it seems that the issue you mentioned is related to this behavior.

+TextureLODGroups=(Group=TEXTUREGROUP_World,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,LODBias_VT=4,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=16384,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default,CookPlatformTilingDisabled=False,MaxAniso=0)
+TextureLODGroups=(Group=TEXTUREGROUP_Character,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,LODBias_VT=4,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=16384,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="aniso",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default,CookPlatformTilingDisabled=False,MaxAniso=0)
+TextureLODGroups=(Group=TEXTUREGROUP_Effects,LODBias=0,LODBias_Smaller=-1,LODBias_Smallest=-1,LODBias_VT=4,NumStreamedMips=-1,MipGenSettings=TMGS_SimpleAverage,MinLODSize=1,MaxLODSize=16384,MaxLODSize_Smaller=-1,MaxLODSize_Smallest=-1,MaxLODSize_VT=0,OptionalLODBias=0,OptionalMaxLODSize=4096,MinMagFilter="linear",MipFilter="point",MipLoadOptions=AllMips,HighPriorityLoad=False,DuplicateNonOptionalMips=False,Downscale=1.000000,DownscaleOptions=SimpleAverage,VirtualTextureTileCountBias=0,VirtualTextureTileSizeBias=0,LossyCompressionAmount=TLCA_Default,CookPlatformTilingDisabled=False,MaxAniso=0)

[Attachment Removed]

Hello,

You could debug the cook process to determine what behavior is not occurring.

We recommend starting with a breakpoint in “UTextureLODSettings::CalculateLODBias(int32 Width, …)” from TextureLODSettings.cpp. With a condition of “LODGroupInfo.LODBias_VT > 0”, it should break when a texture in one of the reduced groups is processed. The following would be a possible call stack (this is taken from Unreal Engine 5.6):

UnrealEditor-Engine.dll!UTextureLODSettings::CalculateLODBias(int Width, int Height, int MaxSize, int LODGroup, int LODBias, int NumCinematicMipLevels, TextureMipGenSettings InMipGenSetting, bool bVirtualTexture) Line 196	C++
UnrealEditor-Engine.dll!GetTextureBuildSettings(const UTexture & Texture, const UTextureLODSettings & TextureLODSettings, const ITargetPlatform & TargetPlatform, ETextureEncodeSpeed InEncodeSpeed, FTextureBuildSettings & OutBuildSettings, FTexturePlatformData::FTextureEncodeResultMetadata * OutBuildResultMetadata) Line 1326	C++
UnrealEditor-Engine.dll!UTexture::BeginCacheForCookedPlatformData(const ITargetPlatform * TargetPlatform) Line 3785	C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::RouteBeginCacheForCookedPlatformData(UE::Cook::FPackageData & PackageData, UObject * Obj, const ITargetPlatform * TargetPlatform, UE::Cook::ECachedCookedPlatformDataEvent * ExistingEvent) Line 12614	C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::CallBeginCacheOnObjects(UE::Cook::FPackageData & PackageData, UPackage * Package, TArray<UE::Cook::FCachedObjectInOuter,TSizedDefaultAllocator<32>> & Objects, int & NextIndex, UE::Cook::FCookerTimer & Timer) Line 4377	C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::PrepareSaveInternal(UE::Cook::FPackageData & PackageData, UE::Cook::FCookerTimer & Timer, bool bPrecaching, UE::Cook::ESuppressCookReason & OutDemotionRequestedReason) Line 4131	C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::PrepareSave(UE::Cook::FPackageData & PackageData, UE::Cook::FCookerTimer & Timer, bool bPrecaching, UE::Cook::ESuppressCookReason & OutDemotionRequestedReason) Line 4039	C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::PumpRuntimeSaves(UE::Cook::FTickStackData & StackData, unsigned int DesiredQueueLength, int & OutNumPushed, bool & bOutBusy) Line 4951	C++
[Inline Frame] UnrealEditor-UnrealEd.dll!IsEngineExitRequested() Line 404	C++
UnrealEditor-UnrealEd.dll!UCookOnTheFlyServer::TickMainCookLoop(UE::Cook::FTickStackData & StackData) Line 1528	C++

Comparing call stacks and debug step-through between your backported 5.4 implementation and 5.6 might highlight further differences.

If you have not tested this feature in a minimal test project in 5.6, we recommend doing that first, as a baseline to compare your backport with.

Please let us know if this helps.

[Attachment Removed]

(This is a translation of a Japanese post by Tsubasa Shibata.)

Thank you for your continued support.

After investigation, I found a merge mistake in one location. When correcting this, everything seems to be working as expected.

Sorry for the trouble, and thank you very much for your suppport.

Please close this thread.

[Attachment Removed]