<p>This can be done in two ways - either use a sky with a sun in it as an cubemap-type light source outside your building, or use the windows as light sources. With BDPT, you could sort of do both, and consider the windows area light sources where the light differs depending upon the angle, using a sun and sky image/model, and then you could implement importance sampling so that you usually get light rays going from the sun instead of the darker sky. This way you get all the accuracy of a full sun and sky model, and it'll still look good at low sample rates.</p>

CC BY-SA 3.0
2017-03-08T01:35:32.813Z
2017-03-08T01:35:32.813Z
Sam
<p>How is distant directional light source(like sun) added in BDPT?
If this is an indoor scene that gets sunlight through windows, how is this handled in BDPT(other than to consider Sun as a big disc far away and to sample a position on it's area, as this probably wouldn't be efficient for points within the room)</p>

<p>Would it be valid instead to consider window polylines as area sources that emits light in one direction(directional source)? The light samplePosition would be same as sampling a point on the window area (with pdf 1/A ?) and sampleDirection with pdf=1? How about connecting s=1 and t and MIS weights? are they need to be modified or same codes can be used?</p>

<p>Any help/hint is appreciated, Thanks.</p>

<raytracing><lighting><pathtracing><physically-based><global-illumination>
How Sunlight is added in Bidirectional Path tracing?
ali
# How Sunlight is added in Bidirectional Path tracing?

(Asked by: username_0 on 2017-03-05)

How is distant directional light source(like sun) added in BDPT?
If this is an indoor scene that gets sunlight through windows, how is this handled in BDPT(other than to consider Sun as a big disc far away and to sample a position on it's area, as this probably wouldn't be efficient for points within the room)

Would it be valid instead to consider window polylines as area sources that emits light in one direction(directional source)? The light samplePosition would be same as sampling a point on the window area (with pdf 1/A ?) and sampleDirection with pdf=1? How about connecting s=1 and t and MIS weights? are they need to be modified or same codes can be used?

Any help/hint is appreciated, Thanks.

**Tags:** raytracing, lighting, pathtracing, physically-based, global-illumination


---

## 1 answers

### Answer by username_1 on 2017-03-08. Score: 3 | Accepted answer

This can be done in two ways - either use a sky with a sun in it as an cubemap-type light source outside your building, or use the windows as light sources. With BDPT, you could sort of do both, and consider the windows area light sources where the light differs depending upon the angle, using a sun and sky image/model, and then you could implement importance sampling so that you usually get light rays going from the sun instead of the darker sky. This way you get all the accuracy of a full sun and sky model, and it'll still look good at low sample rates.


---

