Different conversion values between EV and the rest of intensity Units for lights USD Export

Is there a reason why we get a different conversion value on the intensity when exporting with EV as the intensity Unit? I would expect the example below to generate equal values:

  • Create a default spot light and set its intensity unit to EV
  • Then set the light intensity value to 10
  • Duplicate that light and change the intensity unit to LUMENS, this will change the light intensity to 1805.763062 lm
  • Export both lights to USD using File > Export Selected as USD
  • Checking both light intensity light 1 (EV Intensity Unit) intensity is 1024 while light 2 (LUMENS Intensity Unit) intensity is set to 10240001

It seems that the issue originates from the fact that the conversion that happens in the UI when we change from EV unit to any other unit, takes in account the implicit 1m2 surface area for conversion as mentioned in LocalLightComponent.cpp while the USD export conversion in UsdUtils::ConvertIntensityToNits does not take that in account, but I could be missing something here.

Hey there,

This does look to be the case, I am verifying with the USD team to make sure what the intended conversion should be. That said, you could modify UsdUtils::ConvertIntensityToNits to be

case ELightUnits::EV:
	// EV100 to luminance gives cd/m2, but UE uses an implicit 1m2 surface area
	// when converting EV (see LocalLightComponent.cpp GetUnitsConversionFactor),
	// so we need to account for that to stay consistent with the UI conversion path.
	// Nit = (luminance * 1m2_in_cm2) / (sr * area) = candela / area
	return EV100ToLuminance(Intensity) * (100.0f * 100.0f) / (Steradians * AreaInSqMeters);

to get a 1-1.

Dustin

Actually, we made a much more comprehensive change here on this changelist.

https://github.com/EpicGames/UnrealEngine/commit/3b39e97ffd4439e5e5637a00cc741c270735f00c

Awesome, thank you [mention removed]​, I’ll see if we can port this back while we wait for the official update.