@@ -123,8 +123,8 @@ class _CameraExposureScaleDataSource
123
123
, _usdCamera(usdCamera)
124
124
, _stageGlobals(stageGlobals)
125
125
{
126
- static const HdDataSourceLocator exposureLocator =
127
- HdCameraSchema::GetExposureLocator ();
126
+ static const HdDataSourceLocator exposureScaleLocator =
127
+ HdCameraSchema::exposureScaleLocator ();
128
128
129
129
static const std::vector<TfToken> inputNames = {
130
130
UsdGeomTokens->exposure ,
@@ -141,7 +141,7 @@ class _CameraExposureScaleDataSource
141
141
prim.GetAttribute (inputName),
142
142
_stageGlobals,
143
143
_sceneIndexPath,
144
- exposureLocator ));
144
+ exposureScaleLocator ));
145
145
}
146
146
}
147
147
@@ -156,11 +156,7 @@ class _CameraExposureScaleDataSource
156
156
if (time .IsNumeric ()) {
157
157
time = UsdTimeCode (time .GetValue () + shutterOffset);
158
158
}
159
- // existing clients will be expecting it as logarithmic exposure,
160
- // so we need to convert from a scalar multiplier to logarithmic
161
- // exposure here. To get the original exposure attribute value,
162
- // see "exposureCompensation" below.
163
- return log2f (_usdCamera.ComputeLinearExposureScale (time ));
159
+ return _usdCamera.ComputeLinearExposureScale (time );
164
160
}
165
161
166
162
bool GetContributingSampleTimesForInterval (
@@ -207,9 +203,7 @@ UsdImagingDataSourceCamera::GetNames()
207
203
HdDataSourceBaseHandle
208
204
UsdImagingDataSourceCamera::Get (const TfToken &name)
209
205
{
210
- if (name == HdCameraSchemaTokens->exposure ) {
211
- // we hijack the "exposure" token here in order to pass through the
212
- // calculated exposure and make it backwards-compatible.
206
+ if (name == HdCameraSchemaTokens->exposureScale ) {
213
207
return _CameraExposureScaleDataSource::New (
214
208
_sceneIndexPath, _usdCamera, _stageGlobals);
215
209
}
@@ -336,38 +330,37 @@ UsdImagingDataSourceCameraPrim::Invalidate(
336
330
locators.insert (
337
331
HdCameraSchema::GetShutterCloseLocator ());
338
332
} else if (usdName == UsdGeomTokens->exposure ) {
339
- // The USD "exposure" attr is mapped to hydra as
340
- // "exposureCompensation", but is also an input to the
341
- // computed value stored at "exposure".
342
- locators.insert (
343
- HdCameraSchema::GetExposureCompensationLocator ());
333
+ // "exposure" maps unchanged to "exposure", and is an
334
+ // input to the computed value stored at "exposureScale"
344
335
locators.insert (
345
336
HdCameraSchema::GetExposureLocator ());
337
+ locators.insert (
338
+ HdCameraSchema::GetExposureScaleLocator ());
346
339
} else if (usdName == UsdGeomTokens->exposureTime ) {
347
340
// "exposure:time" maps to "exposureTime", and is an
348
- // input to "exposure "
341
+ // input to the computed value stored at "exposureScale "
349
342
locators.insert (
350
343
HdCameraSchema::GetExposureTimeLocator ());
351
344
locators.insert (
352
- HdCameraSchema::GetExposureLocator ());
345
+ HdCameraSchema::GetExposureScaleLocator ());
353
346
} else if (usdName == UsdGeomTokens->exposureIso ) {
354
347
// similar to exposureTime
355
348
locators.insert (
356
349
HdCameraSchema::GetExposureIsoLocator ());
357
350
locators.insert (
358
- HdCameraSchema::GetExposureLocator ());
351
+ HdCameraSchema::GetExposureScaleLocator ());
359
352
} else if (usdName == UsdGeomTokens->exposureFStop ) {
360
353
// similar to exposureTime
361
354
locators.insert (
362
355
HdCameraSchema::GetExposureFStopLocator ());
363
356
locators.insert (
364
- HdCameraSchema::GetExposureLocator ());
357
+ HdCameraSchema::GetExposureScaleLocator ());
365
358
} else if (usdName == UsdGeomTokens->exposureResponsivity ) {
366
359
// similar to exposureTime
367
360
locators.insert (
368
361
HdCameraSchema::GetExposureResponsivityLocator ());
369
362
locators.insert (
370
- HdCameraSchema::GetExposureLocator ());
363
+ HdCameraSchema::GetExposureScaleLocator ());
371
364
} else {
372
365
locators.insert (
373
366
HdCameraSchema::GetDefaultLocator ().Append (
0 commit comments