Subjects as light sources

Hello,
in OptiX scene i use the points as light sources. It works.
How to make the whole subject as light source, for example, the scene is the room with windows,
and the whole window should be a light source?

What kind of rendering algorithm are you using?
Do you want the window area to be the light or the environment outside the window?

In any case you would need to shoot multiple rays at the light and integrate the result properly. How to pick the sample points on that light area most efficiently and integrating the results is the topic of many research papers.

In a Monte Carlo progressive global illumination renderer, implementing rectangular light geometry is easily possible. The OptiX SDK path tracer example does that. (Arbitrary geometry meshes as area lights gets more difficult!)

You would need to sample the light area and accumulate the emission for the direct lighting calculations as well as the emission when randomly hitting the light geometry with the path, which normally terminates the path unless the light geometry has a BSDF itself.

If the window should be a hole in the wall and the environment outside is the light, things get trickier.
If there is glass in that window, all light inside the room would be caustics, means the shadow visibility test fails and the applied global illumination light transport algorithm takes care of the lighting.
Means with a forward path tracer (like the OptiX SDK example) you would only pick up the light when randomly penetrating the window glass and reaching the environment (miss program) and such indoor images remain noisy for a long time.

There are other global illumination algorithms which handle that more robustly, like bi-directional path tracing or photon mapping for example, which are more involved to implement.

If you search the internet for “Monte Carlo area light sampling” there will be hits of different methods how to implement area light sources.

Thank you very much for answer, Detlef,

i suppose, the first variant (window area is the light source) would be enough good for our purposes.
It is not easy for me to understand this topic (multiple rays) enough. So, i should more investigate this area.

Thank you.