Description

This issue occurs when streaming levels including reflection captures are displayed with  delay.

When it finishes loading assets, reflection capture textures are uploaded to the GPU.
Then the level is displayed and it checks texture source again in FReflectionCaptureProxy constructor and displays this error message , even though the textures has already been loaded.

The following code fixes this issue.
 

FReflectionCaptureMapBuildData* UReflectionCaptureComponent::GetMapBuildData() const
{
	AActor* Owner = GetOwner();

	if (Owner)
	{
		ULevel* OwnerLevel = Owner->GetLevel();

		if (OwnerLevel && OwnerLevel->OwningWorld)
		{
			ULevel* ActiveLightingScenario = OwnerLevel->OwningWorld->GetActiveLightingScenario();
			UMapBuildDataRegistry* MapBuildData = NULL;

			if (ActiveLightingScenario && ActiveLightingScenario->MapBuildData)
			{
				MapBuildData = ActiveLightingScenario->MapBuildData;
			}
			else if (OwnerLevel->MapBuildData)
			{
				MapBuildData = OwnerLevel->MapBuildData;
			}
			 
			if (MapBuildData)
			{
				FReflectionCaptureMapBuildData* ReflectionBuildData = MapBuildData->GetReflectionCaptureBuildData(MapBuildDataId);
#if 1
				if (ReflectionBuildData && ( ReflectionBuildData->CubemapSize == UReflectionCaptureComponent::GetReflectionCaptureSize() || ReflectionBuildData->HasBeenUploadedFinal() ) )
#else
				if (ReflectionBuildData && ReflectionBuildData->CubemapSize == UReflectionCaptureComponent::GetReflectionCaptureSize() )
#endif
				{
					return ReflectionBuildData;
				}
			}
		}
	}
	return NULL;
}

 

Steps to Reproduce
  1. Open attached project [Link Removed]
  2. Make sure there is no lighting error in editor viewport
  3. Click File > Package Project > Windows(64bit) on editor menu
  4. Launch the cooked game on windows

Result

The level becomes visible after a few seconds and displays "REFLECTION CAPTURES NEEDED TO BE REBUILT".

[Link Removed]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-96068 in the post.

1
Login to Vote

Fixed
ComponentUE - Graphics Features - Lumen
Affects Versions4.25
Target Fix4.26
Fix Commit14644825
Release Commit14644825
CreatedJul 29, 2020
ResolvedNov 3, 2020
UpdatedSep 19, 2021
View Jira Issue