<p>I implemented a <a href="https://github.com/zwcloud/CSharpPathTracer" rel="nofollow noreferrer">path tracer</a> and got a similar result like <a href="https://computergraphics.stackexchange.com/questions/3972/is-it-expected-that-a-naive-path-tracer-takes-many-many-samples-to-converge">this one</a>.</p>

<p>Sample: 4096, time used: 537.05s<br>
<a href="https://i.sstatic.net/lu4IP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lu4IP.png" alt="enter image description here"></a></p>

<p>The algorithm is exactly the same as <a href="https://en.wikipedia.org/wiki/Path_tracing#Algorithm" rel="nofollow noreferrer">the one</a> in wikipedia, where only the <strong>Gathering Path</strong> is considered.</p>

<p>In <a href="https://computergraphics.stackexchange.com/a/3976/7114">this answer</a>, @Nathan Reed said that "Without explicit light sampling, I'd expect very slow convergence.".</p>

<p>What is <em>explicit light sampling</em>? How to implement it? Do it mean <em>Shooting rays</em> from <a href="https://en.wikipedia.org/wiki/Path_tracing#Bidirectional_path_tracing" rel="nofollow noreferrer">bidirectional path tracing</a>, namely the <strong>Shooting Path</strong>?</p>

<p>Nathan Reed also said that "Naive path tracing is more reasonable with e.g. a sky light, which almost every path can be expected to hit." So, BTW, what is a sky light? How to implement it?</p>

CC BY-SA 4.0
2019-02-15T13:22:07.933Z
Explicit light sampling aka Next Event Estimation. Basically at each bounce you shoot a ray towards light source and 1 ray elsewhere to compute direct and indirect illumination separately. Richie provided a very good answer here
https://computergraphics.stackexchange.com/questions/5152/progressive-path-tracing-with-explicit-light-sampling?noredirect=1&lq=1
gallickgunner
CC BY-SA 4.0
2019-02-15T19:50:55.433Z
@gallickgunner I didn't read the thread you linked in detail but what got my attention was that the advice on MIS is bad, if not outright wrong.
Also zwcloud: yes you can regard direct light sampling as an estimator from BDPT (in fact it is, an estimator with k bounces from the camera with a direct connection).
lightxbulb
<pathtracing>
How to implement explicit light sampling when implementing path tracing?
zwcloud
# How to implement explicit light sampling when implementing path tracing?

(Asked by: username_0 on 2019-02-15)

I implemented a [path tracer](https://github.com/username_0/CSharpPathTracer) and got a similar result like [this one](https://computergraphics.stackexchange.com/questions/3972/is-it-expected-that-a-naive-path-tracer-takes-many-many-samples-to-converge).

Sample: 4096, time used: 537.05s  
[![enter image description here](https://i.sstatic.net/lu4IP.png)](https://i.sstatic.net/lu4IP.png)

The algorithm is exactly the same as [the one](https://en.wikipedia.org/wiki/Path_tracing#Algorithm) in wikipedia, where only the **Gathering Path** is considered.

In [this answer](https://computergraphics.stackexchange.com/a/3976/7114), @Nathan Reed said that "Without explicit light sampling, I'd expect very slow convergence.".

What is *explicit light sampling*? How to implement it? Do it mean *Shooting rays* from [bidirectional path tracing](https://en.wikipedia.org/wiki/Path_tracing#Bidirectional_path_tracing), namely the **Shooting Path**?

Nathan Reed also said that "Naive path tracing is more reasonable with e.g. a sky light, which almost every path can be expected to hit." So, BTW, what is a sky light? How to implement it?

**Tags:** pathtracing

> **Comments:**
> **username_1**: Explicit light sampling aka Next Event Estimation. Basically at each bounce you shoot a ray towards light source and 1 ray elsewhere to compute direct and indirect illumination separately. Richie provided a very good answer here https://computergraphics.stackexchange.com/questions/5152/progressive-path-tracing-with-explicit-light-sampling?noredirect=1&lq=1  
> **username_2**: @username_1 I didn't read the thread you linked in detail but what got my attention was that the advice on MIS is bad, if not outright wrong. Also username_0: yes you can regard direct light sampling as an estimator from BDPT (in fact it is, an estimator with k bounces from the camera with a direct connection).  

---

## 0 answers

