Indirect lighting samples were not made correctly when building lighting with umap duplicated via the content browser and registering both source and destination as sublevels in one map.

Steps to Reproduce

Reported by developer:

■ Reproduction procedure
1. Expand the following zip and open the LevelBuildDataId.uproject in it

2. On the viewport, click "View" -> "Visualize" -> "Volume Lighting Samples" so that the lighting sample is displayed

3. Lighting build with NewMap 1 or NewMap 2 sub-level invisible makes the same look as "Expected Result"
[Link Removed]

4. When making a lighting build with all sublevels visible, it looks the same as "result obtained"
[Link Removed]

■ Supplement
The problem has been solved by creating a new sublevel, moving all the contents of NewMap 2 and making a lighting build.
I think that duplication of ULevel :: LevelBuildDataId is the cause, but I do not know exactly.

We made the following correction to avoid problems


 void ULevel::PostDuplicate(bool bDuplicateForPIE)
         bWasDuplicatedForPIE = bDuplicateForPIE;
         ★↓Add 3 lines below
         if (!bDuplicateForPIE)
                 LevelBuildDataId = FGuid::NewGuid();


static void RestoreLevelBuildDataIds(UWorld* InWorld)
         if (!InWorld)
         UE_LOG(LogWorld, Log, TEXT("--- Restore duplicated LevelBuildDataIds ---"));
         TSet<FGuid> LevelBuildDataIds;
         UE_LOG(LogWorld, Log, TEXT("  Levels:"));
         for(ULevel* Level : InWorld->GetLevels())
                 const FGuid LevelBuildDataId = Level->LevelBuildDataId;
                 if (!LevelBuildDataIds.Contains(LevelBuildDataId))
                         UE_LOG(LogWorld, Log, TEXT("    %s : %s"), *GetFullNameSafe(Level), *(LevelBuildDataId.ToString()));
                         Level->LevelBuildDataId = FGuid::NewGuid();
                         UE_LOG(LogWorld, Warning, TEXT("    Fixed %s : %s -> %s"), *GetFullNameSafe(Level), *(LevelBuildDataId.ToString()), *(Level->LevelBuildDataId.ToString()));
 static FAutoConsoleCommandWithWorld RestoreLevelBuildDataIdsCmd(
         TEXT("Restore levels' duplicated BuildDataId in the current world."),

Have Comments or More Details?

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

Login to Vote

Won't Fix
ComponentUE - Graphics Features
Affects Versions4.
CreatedAug 29, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue