How-To: Adjust scene light brightness

When using distant light in a HOOPS Visualize scene, you may want to adjust the brightness, and have a better contrast between darkest and brightest faces.

:blue_book: Instructions

Too bright

Change the Specular value of the model to Gray to decrease the brightness or to Black to remove the spark on faces:

ModelKey.GetMaterialMappingControl().SetFrontFaceColor(RGBAColor(0.0, 0.0, 0.0), Material::Color::Channel::Specular);

Too dark

Change the Ambient Light value of the model to Gray will light up the darkest faces:

ModelKey.GetMaterialMappingControl().SetAmbientLightColor(RGBAColor(0.5, 0.5, 0.5));

Combined example

Adjusting both color to balance the contrast between darkest and brightest faces:

ModelKey.GetMaterialMappingControl().SetFrontFaceColor(RGBAColor(0.1, 0.1, 0.1), Material::Color::Channel::Specular);
ModelKey.GetMaterialMappingControl().SetAmbientLightColor(RGBAColor(0.75, 0.75, 0.75));