Skip to content
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 exposure controls to UsdGeomCamera #3085

Open
wants to merge 30 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
22437dc
Add exposure controls to UsdGeomCamera
anderslanglands May 14, 2024
8ae7ff8
feed calculated exposure scale to HdCamera::GetExposure() via UsdImag…
anderslanglands May 14, 2024
0dea7ef
add additional doc comments explaining the exposure attributes and th…
anderslanglands May 16, 2024
dc65e05
docs clarifications
anderslanglands May 28, 2024
c3ad145
rename f-number to f-stop
anderslanglands Jun 10, 2024
cdbe0c5
add definition of nits
anderslanglands Jun 11, 2024
f9a8c8c
add units for imaging ratio
anderslanglands Jun 11, 2024
29f6b34
fix dimensions and further clarify exposure scale
anderslanglands Jun 16, 2024
aa9e5f1
fix spelling on steradian
anderslanglands Jun 24, 2024
c75aea4
fix formatting to backticks and format fStop reference
anderslanglands Jun 24, 2024
50cea0a
convert exposure scale to logarithmic exposure in adapter.
anderslanglands Jul 26, 2024
1d5c60a
replace f-number with f-stop
anderslanglands Sep 6, 2024
4ab55da
add note pointing to physLight doc and explaning the form of the equa…
anderslanglands Sep 6, 2024
425382e
update generated schema
anderslanglands Sep 6, 2024
3749e6b
add initialization for exposure fields
anderslanglands Sep 6, 2024
21d8899
Pixar schema tweaks: rename 'GetExposureScale' to 'ComputeLinearExpos…
Nov 22, 2024
2f668a6
Add exposure parameters to hydra camera schema
Nov 22, 2024
a33a85a
Add UsdImaging 2.0 support for exposure, update UsdImaging usage of U…
Nov 22, 2024
92cd975
Merge pull request #1 from tcauchois/usdGeomCamera-exposure
pmolodo Dec 9, 2024
b5d9f08
add missing camera exposure documentation in usdGeom/generatedSchema.…
pmolodo Dec 9, 2024
f574fd4
rename 'GetExposureScale' to 'ComputeLinearExposureScale' - python wr…
pmolodo Dec 9, 2024
43b89cd
Merge remote-tracking branch 'origin/dev' into usdGeomCamera-exposure
pmolodo Dec 10, 2024
4a929d4
Exposure: simplify hydra-USD mapping
pmolodo Dec 10, 2024
e916b3e
testUsdGeomCamera.test_ComputeLinearExposureScale fixes
pmolodo Dec 10, 2024
0ae21ac
bugfix for UsdImagingCameraAdapter::Get(exposureScale)
pmolodo Dec 11, 2024
7e94c68
avoid copying TfToken in loop
pmolodo Dec 11, 2024
95e2cad
undo accidental cmake version bump
pmolodo Dec 11, 2024
36becba
fix initial value of HdCamera::_exposureScale (1.0, not 0.0)
pmolodo Dec 18, 2024
846dd7f
rename tokens from exposureScale to linearExposureScale
pmolodo Dec 18, 2024
07496b0
change all instances of "exposureScale" to "linearExposureScale"
pmolodo Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pxr/usdImaging/usdImaging/cameraAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ UsdImagingCameraAdapter::Get(UsdPrim const& prim,
return vExposureResponsivity;
} else if (key == HdCameraTokens->exposureScale) {
// The computed linear exposure multiplier ratio
return VtValue(log2(cam.ComputeLinearExposureScale(time)));
return VtValue(cam.ComputeLinearExposureScale(time));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had been log2 throughout, to match the encoding of "exposure". Is the loss of precision such that this is necessary for you all? If so: (1) let's make the hydra token "linearExposureScale" and (2) let's update dataSourceCamera.cpp correspondingly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just log2 so that it backdoored into the existing exposure field (since that's log2). Since we're not doing that hijack any more this wants to be linear. @pmolodo can you update the token per Tom's comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thinking behind linear wasn't avoiding precision loss, so much as simplicity and consistency:

  • the value is most easily expressed and calculated in linear space (since of the 5 component attributes, only 1 is in log2 space)
  • the value will generally be used programmatically in linear space (ie, as a pixel value multiplier)
  • as @anderslanglands points out, we formerly only converted to log2 where necessary for shoe-horning back into the exposure attribute. Now that we're making "exposure" and "exposureScale" completely separate attributes, and not worrying about existing implementations picking up the new behavior / attributes "for free", we have the opportunity to make ALL usages of exposureScale in linear space.

Regardless, I totally agree with you that the possibility for confusion is high - so, in addition to making a commit where the token names are changed to "linearExposureScale", I also added a commit where ALL references to "exposureScale" in the code are changed to "linearExposureScale", for clarity. (You can leave that commit out if you feel it's too verbose, though!)

}

VtValue v;
Expand Down