Need to do the same light power as Cycles in Watts for Hydra RPR #34

Merged
Bogdan Nagirniak merged 12 commits from BLEN-386 into hydra-render 2023-05-05 08:42:35 +02:00
Showing only changes of commit dc140c9032 - Show all commits

View File

@ -44,13 +44,13 @@ void LightData::init()
case LA_SUN: case LA_SUN:
data_[pxr::HdLightTokens->angle] = light->sun_angle * 180.0 / M_PI; data_[pxr::HdLightTokens->angle] = light->sun_angle * 180.0 / M_PI;

This seems like a strange value. How was this found?

This seems like a strange value. How was this found?

Every value has been found empirically.

Every value has been found empirically.
break; break;
case LA_SPOT: case LA_SPOT:
data_[pxr::HdLightTokens->shapingConeAngle] = light->spotsize / 2; data_[pxr::UsdLuxTokens->inputsShapingConeAngle] = (float)(light->spotsize / 2.0f * 180.0f / M_PI);
data_[pxr::HdLightTokens->shapingConeSoftness] = light->spotblend; data_[pxr::UsdLuxTokens->inputsShapingConeSoftness] = light->spotblend;
data_[pxr::UsdLuxTokens->treatAsPoint] = true; data_[pxr::UsdLuxTokens->treatAsPoint] = true;
break; break;
case LA_AREA: case LA_AREA:
switch (light->area_shape) { switch (light->area_shape) {
case LA_AREA_SQUARE: case LA_AREA_SQUARE:
@ -83,7 +83,7 @@ void LightData::init()
prim_type_ = prim_type(light); prim_type_ = prim_type(light);
/* TODO: temporary value, it should be delivered through Python UI */ /* TODO: temporary value, it should be delivered through Python UI */
data_[pxr::HdLightTokens->exposure] = 1.0f; data_[pxr::HdLightTokens->exposure] = 0.0f;
write_transform(); write_transform();
} }