<p>I am implementing light tracing from <a href="http://rendering-memo.blogspot.co.uk/2016/03/bidirectional-path-tracing-6-implement.html" rel="nofollow noreferrer">this website</a>.</p>

<p>The right wall on the below image is perfect mirror(specular reflection). Its BRDF returns zero that's why it's been rendered black. But how is it to correctly simulate this type of light path in light tracing?</p>

<p><a href="https://i.sstatic.net/mKZLF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mKZLF.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-09-09T00:24:43.157Z
I hadn't heard the term light tracing before.  For other folks who haven't either, it seems to just be path tracing from the light towards the screen, vs the normal screen towards light.  Similar to photon mapping, but without the photon?
Alan Wolfe
CC BY-SA 3.0
2017-09-09T00:28:23.307Z
Yes it is forward ray tracing as opposed to backward ray tracing. It traces importance, rather than radiance, from the light source, bouncing it around the scene and connecting each vertex to camera.
ali
CC BY-SA 3.0
2017-09-09T00:36:18.123Z
Have you considered using fresnel to figure out how much light is reflected vs transmitted, then using that value as a percent chance to do diffuse or specular lighting?  If specular, since you are asking about mirror like specular only, you just reflect the vector against the surface normal.  If that is making sense, if wanting to go beyond mirror like specular reflection, you could use eg a microfacet specular BRDF instead later.
Alan Wolfe
CC BY-SA 3.0
2017-09-09T01:43:43.203Z
Thanks but I guess it's impossible to simulate this sort of path in forward ray tracing; since an incoming ray from light to a specular surface point it has zero probability of going out towards the camera as it has a delta function.
ali
CC BY-SA 3.0
2017-09-09T03:42:22.727Z
Darn, hrm. Maybe the problem is you can't have pure mirror specular reflection, but need a specular lobe that isn't a delta function spike.
Alan Wolfe
CC BY-SA 3.0
2017-09-11T06:30:36.190Z
This will only work if your camera is not a pinhole but simulates a non-zero sized aperture and a film. Then you can continue the reflect light path through the aperture and record it once it hits the film plane.
Stefan Werner
<pathtracing><brdf><global-illumination><specular>
How to simulate specular reflection in Light Tracing?
ali
# How to simulate specular reflection in Light Tracing?

(Asked by: username_0 on 2017-09-08)

I am implementing light tracing from [this website](http://rendering-memo.blogspot.co.uk/2016/03/bidirectional-path-tracing-6-implement.html).

The right wall on the below image is perfect mirror(specular reflection). Its BRDF returns zero that's why it's been rendered black. But how is it to correctly simulate this type of light path in light tracing?

[![enter image description here](https://i.sstatic.net/mKZLF.png)](https://i.sstatic.net/mKZLF.png)

**Tags:** pathtracing, brdf, global-illumination, specular

> **Comments:**
> **username_1**: I hadn't heard the term light tracing before.  For other folks who haven't either, it seems to just be path tracing from the light towards the screen, vs the normal screen towards light.  Similar to photon mapping, but without the photon?  
> **username_0**: Yes it is forward ray tracing as opposed to backward ray tracing. It traces importance, rather than radiance, from the light source, bouncing it around the scene and connecting each vertex to camera.  
> **username_1**: Have you considered using fresnel to figure out how much light is reflected vs transmitted, then using that value as a percent chance to do diffuse or specular lighting?  If specular, since you are asking about mirror like specular only, you just reflect the vector against the surface normal.  If that is making sense, if wanting to go beyond mirror like specular reflection, you could use eg a microfacet specular BRDF instead later.  
> **username_0**: Thanks but I guess it's impossible to simulate this sort of path in forward ray tracing; since an incoming ray from light to a specular surface point it has zero probability of going out towards the camera as it has a delta function.  
> **username_1**: Darn, hrm. Maybe the problem is you can't have pure mirror specular reflection, but need a specular lobe that isn't a delta function spike.  
> **username_2**: This will only work if your camera is not a pinhole but simulates a non-zero sized aperture and a film. Then you can continue the reflect light path through the aperture and record it once it hits the film plane.  

---

## 0 answers

