forked from blender/blender
Need to do the same light power as Cycles in Watts for Hydra RPR #34
No reviewers
Labels
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: BogdanNagirniak/blender#34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "BLEN-386"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose
Adjust lights to match Cycles's results
Technical steps
@ -31,3 +31,3 @@
float intensity = light->energy;
if (scene_delegate_->engine_type == BlenderSceneDelegate::EngineType::PREVIEW) {
intensity *= 0.001;
intensity *= 0.001f;
Do we still need this multiplication?
@ -39,3 +38,3 @@
switch (light->type) {
case LA_LOCAL:
data_[pxr::HdLightTokens->radius] = light->area_size / 2;
data_[pxr::HdLightTokens->radius] = std::max(light->radius, 0.000001f);
if radius == 0, maybe
data_[pxr::UsdLuxTokens->treatAsPoint] = true;
?@ -83,3 +91,4 @@
prim_type_ = prim_type(light);
/* TODO: temporary value, it should be delivered through Python UI */
Remove this TODO
@ -121,6 +130,10 @@ void LightData::update()
write_transform();
bits = pxr::HdLight::DirtyTransform;
}
else if (id->recalc & ID_RECALC_COPY_ON_WRITE) {
Move this check to L125 and check
light->id.recalc & ID_RECALC_GEOMETRY
@ -25,30 +25,36 @@ void LightData::init()
{
ID_LOG(2, "");
const float round_tolerance = 0.00001f;
the name here is strange. Maybe "radius_threshold". And please add a comment why.
use FLT_EPSILON
Changed round_tolerance -> FLT_EPSILON. Added comment.
@ -42,0 +42,4 @@
else {
data_[pxr::UsdLuxTokens->treatAsPoint] = true;
}
intensity /= 40.0f;
This seems like a strange value. How was this found?
Every value has been found empirically.
Added some fixes. Tested - works good