-
Notifications
You must be signed in to change notification settings - Fork 8
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
Need better specification of light intensity vs power vs radiance #133
Comments
Yes, with "specified" we mean explicitly set. So you are right: default values for parameters that don't have precedence (which are overridden by others) do not make sense. |
K, makes sense. I still hate the concept of expressing the same functionality in different ways with different variables - that only increases the burden on the device deloper to implement both - but if we at least make it consistent we already make a huge step forward. |
First draft (for directional and point light) in #135. Extending the discussion: do we really want to keep both |
Currently spec allows to set light "intensity/radiance/whatever" through multiple different mechanisms, with some hand-wavy formulation of "takes precedence if also specified". The latter, however, leads to some abiguity of what "if also specified" means, because these values do actually ahve default values. Eg, Directional::irradiance has default value of '1', but if I consider this as 'specified', then 'radiance' would always be overridden - yet if i consider it as "it isn't specified unless explicitly set via a setParameter call" then having a default value doesn't make sense, because the default value can never apply (because the 'value' isn't active unless explicitly specified, at which point it's not longer the default value). This leads to mental gymnastic such as "if i want it to have the default value i have to set the value to the default value", which is very much different from how any other parameter in any other ospray object is being handled.
Note same ambiguity exists for 'radiance' in other light sources; 'point::radiance' is even worse because it says "intensity (or power) take precedence if also specified", so there' even two values that could override, each with their own priorities.
One optoin to make this clearer would be to say that the default value for irradiane is "not specified"; an arguably even cleaner specification would be to specify two differently-behaving lights as being two different classes. In that same vein, a "Sphere" light should really be its separate class, not simply be a point light with an optional added radius.
The text was updated successfully, but these errors were encountered: