USD: improve light units conversion #109795
- Use pi factor to convert between radiant flux and intensity
- Mark lights as normalized on export
- Add spot light export support
- Add treatAsPoint support for import and export
- Empirically match normalized distant light
- Fix wrong unnormalized point/sphere/disk light unit in Cycles
Overall it should be much closer now for all light types. Point and distant
light units are inconsistent between renderers, so not possible to match
Use pi factor to convert from radiant flux to intensity, and fix wrong unnormalized point/sphere light unit in Cycles. Overall it should be much closer now for all lights. But point and distant lights are still off and seemingly without a consistent convention in other Hydra renderers. Ref #109404
@brecht The changes look consistent to me, so I'm approving this PR. Just so I understand the motivation behind this, the goal appears to be to better match Karma lighting, is that right?
I'm trying to match all Hydra renderers, but unfortunately there is no documented convention and there are inconsistencies in implementations.
- For sphere, spot, area and disk lights, PRMan and Karma are the same and we match them. Storm can not accurately render these so difficult to compare to, but the old factor of 100 makes no sense and the new one seems okay-ish.
- For distant lights, the PRMan unit is weird (see #109404). So I matched it to Karma. Storm doesn't support distant lights.
- For zero radius points lights, I will have another look to see if we can do better. PRMan doesn't support them, Karma for some reason normalizes them differently than sphere lights with very small radius.
I did various fixes for zero radius point lights, they match Storm now. For Karma it's off by a factor of 4, and the same inconsistency exists in Houdini when switching Karma and Storm. So no hope of matching both and I think matching a sphere light with small radius makes most sense.
Hello @brecht, I want to draw attention to the current ongoing effort to streamline light handling in USD/Hydra-supporting renderers over at the ASWF slack (usd-lux-discussion channel).
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?