Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Wrong return values from .getDiffuseColor in Photmetric mode

Anonymous

Wrong return values from .getDiffuseColor in Photmetric mode

Anonymous
Not applicable

If I try to get the Color of a Light via python like this:

node = findNode('Rectangular Light')

 

node.setDiffuseLightColor(1.000,0.690,0.051)

print node.getDiffuseLightColor()

 

it retuns this:

[1.0, 0.6899999976158142, 0.050999999046325684]

-> Those are normal values considering them floats

 

if "Enable Photometric Parameters" is enabled in the Rendersettings i get this:

[1.3979558944702148, 0.9645895957946777, 0.07129575312137604]

 

Why these strange values?

 

0 Likes
Reply
335 Views
1 Reply
Reply (1)

michael_nikelsky
Autodesk
Autodesk

Hi,

 

the values are not wrong. In physical mode the whole behavior of the light changes. In normal mode the intensity of a light is just a multiplier for the light color you set. This does not work in physical mode since you are setting explicit physical values like lumen. This requires to integrate the color spectrum you set and rescale it so when multiplied with the physical value you have set results in the correct result (note however that our default units are millimeter and not meter and the color and intensity values store the already adjusted values).

 

Kind regards

Michael  



Michael Nikelsky
Sr. Principal Engineer
0 Likes