Controlling Visibility of a Physical Light Emitter

Depending of the usage of a physical light, one may want to make it invisible to the viewer. For example, rectangular physical lights can be used at interior scene windows to simulate light coming from the outside. However, the viewer still wants to see the garden through the windows rather than the light panels.

Here is how you can show/hide physical light emitters:

// "light" is a pointer to a HOOPS Luminate physical light instance.
// "visible" is a boolean set to true if the light should be visible, to false otherwise.
RED::ILightShape* ilight = light->As< RED::ILightShape >();
RC_TEST( ilight->SetRenderMode( RED::RM_VISIBLE_GEOMETRY, visible ? 1 : 0, iresmgr->GetState() ) );
../../../_images/controlling_visibility_of_a_physical_light_emitter.png

The same scene with the emitter visible on the left and hidden on the right