Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

...

Too bright

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

Code Block
languagecpp
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:

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

...

Combined example

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

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

...

Learn more in our forum post.