BHoM / BHoM_Engine

Internal manipulation of the BHoM
GNU Lesser General Public License v3.0
26 stars 13 forks source link

Environment_Engine: Light Reflectance Query #970

Open FraserGreenroyd opened 5 years ago

FraserGreenroyd commented 5 years ago

Related to https://github.com/BHoM/BHoM/issues/484

If a user has provided a fragment for light reflectance by red/green/blue values, there should be a Query method for obtaining a single reflectance value from these.

tg359 commented 5 years ago

In order to get the overall reflectivity of a material we need to use the Specularity of that material also.

The formula for which (originally here) is:

CompositeReflectance(double ReflectanceRed, double ReflectanceGreen, double ReflectanceBlue, double Specularity){
    return (0.265 * ReflectanceRed+ 0.670 * ReflectanceGreen+ 0.065 * ReflectanceBlue) * (1 - Specularity) + Specularity;
}

So for RGB reflectances of 0.2, 0.3, and 0.4, and a specularity of 0.1 we'd get an overall reflectivity of 0.352.