In a basic level the intensity of a directional light by default is in LUX. However if you reference that directional light in a blueprint and try and change the intensity there, with set intensity, a float is used. Is there any way to correlate the LUX value to relevant float value to return it to the original value after any changes made eg a fade?
Isn’t the intensity still in LUX?
From DirectionalLightComponentDetails.cpp:
void FDirectionalLightComponentDetails::CustomizeDetails( IDetailLayoutBuilder& DetailBuilder )
{
// Grab the Mobility property from SceneComponent
MobilityProperty = DetailBuilder.GetProperty("Mobility", USceneComponent::StaticClass());
// Get cascaded shadow map category
IDetailCategoryBuilder& ShadowMapCategory = DetailBuilder.EditCategory("CascadedShadowMaps", FText::GetEmpty(), ECategoryPriority::Default );
// Add DynamicShadowDistanceMovableLight
TSharedPtr<IPropertyHandle> MovableShadowRadiusProperty = DetailBuilder.GetProperty("DynamicShadowDistanceMovableLight");
ShadowMapCategory.AddProperty( MovableShadowRadiusProperty)
.IsEnabled( TAttribute<bool>( this, &FDirectionalLightComponentDetails::IsLightMovable ) );
// Add DynamicShadowDistanceStationaryLight
TSharedPtr<IPropertyHandle> StationaryShadowRadiusProperty = DetailBuilder.GetProperty("DynamicShadowDistanceStationaryLight");
ShadowMapCategory.AddProperty( StationaryShadowRadiusProperty)
.IsEnabled( TAttribute<bool>( this, &FDirectionalLightComponentDetails::IsLightStationary ) );
TSharedPtr<IPropertyHandle> LightIntensityProperty = DetailBuilder.GetProperty("Intensity", ULightComponentBase::StaticClass());
// Point lights need to override the ui min and max for units of lumens, so we have to undo that
LightIntensityProperty->SetInstanceMetaData("UIMin",TEXT("0.0f"));
LightIntensityProperty->SetInstanceMetaData("UIMax",TEXT("150.0f"));
LightIntensityProperty->SetInstanceMetaData("SliderExponent", TEXT("2.0f"));
LightIntensityProperty->SetInstanceMetaData("Units", TEXT("lux"));
LightIntensityProperty->SetToolTipText(LOCTEXT("DirectionalLightIntensityToolTipText", "Maximum illumination from the light in lux"));
}
Some light sources are Lumen, Directional Lights are LUX (1 lumen / m2) which is still the Intensity property.