I’m trying to implement light profiles but I’m having a hard time understanding what the coordinate space of a measured_edf is. The documentation references the “coordinate frame of the light distribution” but I haven’t been able to figure out what that frame is. I was guessing that MDL would emit light in the direction of the normal in the coordinate frame defined by the normal and tangent_u but using the native backend with the default resource handler I’m not able to get this to work.
Is my interpretation of the coordinate space correct? Can you provide more documentation of the various spaces involved? Thanks!
Lets take a step back and talk about what an ies light profile actually is, how it should be used and how its often used.
an ies profile is a “far field measurement” of the light emitted from a luminaire. Far-field meaning the measurement is taken from a distance that is large enough that the geometric shape and extent of the actual luminaire can be ignored.
In rendering, an ies will therefore only give realistic results when used on a pointlight or very small (compared to scene dimension) geometric light.
you can use ies profiles also with bigger geometry, but the bigger the geometry relative to the scene, the less the result will match the originally measured distribution.
In both cases, the ies profiles frame of reference should be aligned with the objects frame of reference, ie the ies z axis should align with the objects z axis and so forth.
This matches the defaults of the measured_edf in MDL with
uniform bool global_distribution = true,
uniform float3x3 global_frame = float3x3(1.0),
MDL also allows setting global_distribution to false and in this case the ies should be aligned with the tangent space formed by the normal and the tangent provided to the measured_edf, but the MDL SDK does not currently generate code for this since its an “off label use” of the ies profile.
Great, thank you for the details!