PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.48k stars 1.14k forks source link

Add exposure controls to UsdGeomCamera #3085

Open anderslanglands opened 2 weeks ago

anderslanglands commented 2 weeks ago

This PR adds exposure controls to UsdGeomCamera, allowing to specify brightness as with a physical camera. The calculated exposure value is fed to HdCamera::GetExposure() via UsdImagingCameraAdapter. This means that:

  1. Existing scenes that use the existing exposure attribute continue to work as before
  2. Renderers that already use HdCamera::GetExposure() get the exposure calculation automatically if the new exposure attibutes are changed from their defaults.

This is currently draft to start discussion as per @meshula

Description of Change(s)

Adds exposure:time, exposure:iso, exposure:fNumber, exposure:responsivity attributes and repurposes exposure attribute to be interpreted as exposure compensation. Adds UsdGeomCamera::GetExposureScale() method which allows users to calculate the imaging ratio (i.e. given a certain luminance on the sensor, what is the photometric exposure output) from these attributes.

Also adds a unit test to test the above.

Adds tokens exposureTime, exposureIso, exposureFNumber, exposureResponsivity, exposureCompensation to HdCamera. Modifies HdImagingCameraAdapter::Sync() to return UsdGeomCamera::GetExposureScale() for exposure, UsdGeomCamera::GetExposureAttr() for exposureCompensation and the corresponding attributes for the other tokens.

jesschimein commented 2 weeks ago

Filed as internal issue #USD-9673

jesschimein commented 2 weeks ago

/AzurePipelines run

azure-pipelines[bot] commented 2 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).