Static light contained in a blueprint will need lighting rebuilt each time the project is reopened. This only seems to occur for a static light that is parented to a static mesh and then that static mesh is moved away from the BP origin in the viewport.

This is a regression:

Worked in 4.14.3-3249277

Not working in: 4.15.3-3450819

Licensee Description:

I was debugging the source of a persistent 'Lighting Needs to be Rebuilt' error message and determined it was related to how blueprint actors are initialized after a map load.

The lighting build and save is all fine, the problem is on load. What is happening behind the scenes:

On load, the light component and data is loaded from disk

The light component is assigned the saved location in - Construction script logic immediately kills the light component

Intrinsic construction script generates a replacement point light which also gets a new lightguid

The light is (temporarily) assigned a world location that does not factor in the fact its parent mesh has been had a relative translation applied.

Between the intrinsic and user construction script passes, the lighting component attempts to assign the saved lighting to the component but this fails due to the location check. This prevents the saved lighting guid from being assigned to the light and ultimately the build data for this light is lost. ULightComponent::ApplyComponentInstanceData

After the user construction script pass executes, and the light is repositioned into the correct location.

Steps to Reproduce

1. Open the attached test project

Go to Results

From scratch:

  1. Create a new blank project
  2. Make a actor class BP & open it
  3. Add a Static Mesh component > Set it to the engine content Cube
  4. Add a Point Light > Drag the light onto the Static Mesh component
  5. In the Details panel, set the Mobility of the light to Static
  6. Compile & save
  7. Back in the editor, add the BP to the level
  8. In the Details panel, select the Static Mesh component
  9. Use the translate tool to move it away from the BP origin a few units
  10. Build lighting > Save All > Close the project
  11. Reopen the project

Results: When the project is opened, the lighting will need to be rebuilt

Expected: For the lighting that was built before project close to be maintained and build lighting is not needed

Have Comments or More Details?

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

Login to Vote

Cannot Reproduce
ComponentUE - Gameplay
Affects Versions4.
CreatedJun 29, 2017
ResolvedJun 23, 2021
UpdatedJun 23, 2021
View Jira Issue