Hi,
Our Android build only uses LQ lightmaps, not HQ ones. How can we avoid cooking these in order to reduce cook time, save disk space, and (possibly) reduce run-time memory usage?
If we need to modify C++ code, that’s OK, as long as we are given a hint.
Hi! Assuming you have different lightmap directories (LQ and HQ), you can set the HQ lightmaps directory to be excluded in the build by going to Project Settings → Packaging → Directories to Never Cook.
[Image Removed]
Thanks for the suggestion. However, lightmaps are not stored like regular texture assets are. They are stored in the <levelname>_BuiltData.uasset files that are generated by building lighting, and both LQ and HQ lightmaps are stored together in there.
Hi Dan,
Unfortunately, excluding HQ lightmaps from the single BuiltData asset is not supported. We will consider this for future Feature Requests.
Best regards.
Hi Dan,
A quick way to get these excluded would be :
`bool FAndroidTargetPlatformSettings::SupportsFeature(ETargetPlatformFeatures Feature) const
{
switch (Feature)
{
case ETargetPlatformFeatures::Packaging:
case ETargetPlatformFeatures::DeviceOutputLog:
return true;
case ETargetPlatformFeatures::ShowAggregateDevice:
return false;
case ETargetPlatformFeatures::LowQualityLightmaps:
case ETargetPlatformFeatures::MobileRendering:
return SupportsES31() || SupportsVulkan();
case ETargetPlatformFeatures::HighQualityLightmaps:
return false; // add this`In AndroidPlatformSettings.cpp.
Best regards.
Thanks. I tried this, although it made zero difference in the obb size. Do I need to delete any existing cooked content first before packaging?
Even after deleting Android cooked content under our Maps folder, the obb size remained unchanged.
Hi Dan,
It appears HQ lightmaps are only supported on Android if bSupportsVulkanSM5 (i.e. Support Vulkan Desktop [Experimental]) is enabled. If you didn’t have this setting enabled, then the HQ lightmaps were already excluded from the cooked data.
Best regards.