-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add storm support for camera exposure controls #3464
base: dev
Are you sure you want to change the base?
Add storm support for camera exposure controls #3464
Conversation
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.
- move factor of 100 in exposure equation to tie it to ISO - clarify that the exposure equation also takes into account the lens system - clarify how shutter:open/close, exposure:time, fStop and exposure:fNumber are related
the intent of hijacking the current GetExposure() on the HdCamera was to automatically and transparently upgrade existing delegates to the extended behaviour provided by the new exposure controls. However, there was a bug in the implementation: existing delegates will be expecting the result of GetExposure() to be logarithmic, i.e. they use the result by raising 2^exposure, whereas the result of UsdGeomCamera::GetExposureScale() is a simple scalar multiplier. So, to keep backwards compatibility we need to take the log2() of the exposure scale before handing it off to Hydra
…tion we're using relative to that
Usd geom camera exposure
# Conflicts: # pxr/usd/usdGeom/wrapTokens.cpp
...by making exposure hydra attribute map to exposure USD attribute, and exposureScale map to ComputeLinearExposureScale. This means that existing render delegates that already query exposure will not get the more advanced behavior "for free", and will need to be updated to query exposureScale instead, but should lessen future confusion and potential bugs.
Filed as internal issue #USD-10512 (This is an automated message. See here for more information.) |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
...for both HdCameraTokens and HdCameraSchemaTokens
...to make it clear this value is a flat multiplier, not a log2 exponent
adb7ebb
to
1a69581
Compare
…amera-exposure-storm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments about the PR; not sure I can review this yet. I'm excited about it though!
@@ -14,6 +14,7 @@ | |||
#include "pxr/imaging/hdx/boundingBoxTask.h" | |||
#include "pxr/imaging/hdx/colorizeSelectionTask.h" | |||
#include "pxr/imaging/hdx/colorCorrectionTask.h" | |||
#include "pxr/imaging/hdx/linearExposureScaleTask.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this doesn't seem to be part of this CL; can you add it?
@@ -54,9 +54,6 @@ class HdxColorChannelTask : public HdxTask | |||
// Returns true if the values were updated. False if unchanged. | |||
bool _UpdateParameterBuffer(float screenSizeX, float screenSizeY); | |||
|
|||
/// Apply the color channel filtering. | |||
void _ApplyColorChannel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert the changes to colorChannelTask? They seem unrelated.
@@ -2297,6 +2297,42 @@ class Camera "Camera" ( | |||
However, it follows that if even one property is authored in the correct | |||
scene units, then they all must be. | |||
|
|||
\\section UsdGeom_CameraExposure Camera Exposure Model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to rebase this CL on top of dev; now that the exposure schema has landed, it would make the PR much smaller.
Description of Change(s)
This is a follow-up / add-on to the PR which adds camera exposure controls:
It adds
HdxExposureScaleTask
to allow visualization of the camera exposure controls in Storm.See here to just see the additional changes, vs #3085:
Checklist
[X] I have created this PR based on the dev branch
[X] I have followed the coding conventions
[ ] I have added unit tests that exercise this functionality (Reference:
testing guidelines)
[X] I have verified that all unit tests pass with the proposed changes
[X] I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)