## My little path tracer

### Re: My little path tracer

I think the jade Buddha is really amazing!

### Re: My little path tracer

Hi. Thank you both. Glad you like it.

Btw., I forgot to say, I rendered the media with "The Beam Radiance Estimate" by Jarosz (2008). I use Embree to do the beam-point query. This is possible since fairly recent support for ray-aligned-disc intersections! So, if you happen read this, Embree developer, I say thank you very much. This is a very cool feature. *thumbs*

Currently, I'm trying to implement Walter et al.'s "Microfacet Models for Refraction through Rough Surfaces" (2007). It proved to be much more difficult than I thought. Mostly, getting the expression for the density p(wo|wi) right, where wo and wi are given. I need it for BPT MIS. My renderer knows only a monolithic BSDF. It does not allocate component BxDF's like PBRT. Therefore p must include both reflection and transmission. Oh well, I think I finally got it ...

Btw., I forgot to say, I rendered the media with "The Beam Radiance Estimate" by Jarosz (2008). I use Embree to do the beam-point query. This is possible since fairly recent support for ray-aligned-disc intersections! So, if you happen read this, Embree developer, I say thank you very much. This is a very cool feature. *thumbs*

Currently, I'm trying to implement Walter et al.'s "Microfacet Models for Refraction through Rough Surfaces" (2007). It proved to be much more difficult than I thought. Mostly, getting the expression for the density p(wo|wi) right, where wo and wi are given. I need it for BPT MIS. My renderer knows only a monolithic BSDF. It does not allocate component BxDF's like PBRT. Therefore p must include both reflection and transmission. Oh well, I think I finally got it ...

### Re: My little path tracer

He dawelter,

can you say me, on which paper is the budda(Subsurface Scattering) based on? I want also to enter in this topic. If you have questens to walters microfacet, than ask me^^ I have implemented it in my Raytracer. For me was the big problem with numerical issues in the ggx-normaldistribution-function, if you use very little Roughness-Factors and a Theta-Angle, that goes nerly zero (Miconormal==Marconormal)

can you say me, on which paper is the budda(Subsurface Scattering) based on? I want also to enter in this topic. If you have questens to walters microfacet, than ask me^^ I have implemented it in my Raytracer. For me was the big problem with numerical issues in the ggx-normaldistribution-function, if you use very little Roughness-Factors and a Theta-Angle, that goes nerly zero (Miconormal==Marconormal)

### Re: My little path tracer

We know since VCM that photon mapping can be seen as a path sampling method. Therefore, I want to first refer to

Raab et al. (2008) "Unbiased Global Illumination with Participating Media"

for the concise path integral formulation of volume rendering.

I use the stochastic progressive variant of photon mapping with the global radius decay from

Knaus & Zwicker (2011) "Progressive Photon Mapping: A Probabilistic Approach"

To generate photon paths I use Woodcock tracking, essentially. In "Spectral and Decomposition Tracking for Rendering Heterogeneous

Volumes", Kutz et al. (2017) developed many extensions of this. I use the "spectral tracking" variant. I put a volume photon on every sampled interaction point.

When tracing eye paths, I obtain volume interaction points by the same tracking methods as used for photon mapping. At these points I look for nearby photons and add their contribution. That is, in the basic variant with Point-Point 3D estimators. In "The Beam Radiance Estimate for Volumetric Photon Mapping", Jarosz et al. (2008) developed a method to gather photons along a beam. I implemented this also. The three pics are rendered with it. It is good for thin media. Actually, I like this paper a lot. Not only presents it the beam thing, in Sec. 3.3 it also has a nice derivation of the photon weights.

In denser media I don't want to look for photons all the way to the next surface intersection. So I use a piecewise-constant stochastic estimate of the transmittance along the query beam. This essentially allows to cut off the query beam after a few mean free path lengths. Inspiration for this comes from Jarosz et al. (2011) "Progressive Photon Beams" Sec. 5.2.1 and Krivanek (2014) "Unifying Points, Beams, and Paths in Volumetric Light Transport Simulation" Sec. 4.2 "Long" and "short" beams.

You can ask me about specifics. I'll try to answer

But to be honest, this is very much brute force. If you want to render SSS in such dense media as I took for the Buddha, you might be better off using a fast approximation!

Regarding Walter et al.'s rough transmittance model: I think I finally got it right. Here is a recreation of Figure 1

I "only" implemented the Beckmann NDF with V-Cavity masking & shadowing function. Looks fine and I don't have to implement VNDF sampling to keep the weights low. I also noticed numerical issues with low alpha. But IIRC I get it to 1e-3 with no issue. And at that point the material looks pretty much perfectly specular. I do shading calculations in double precision though.

Btw. Since you mention GGX: Heitz recently released a paper on how to sample the VNDF for GGX more easily.

http://jcgt.org/published/0007/04/01/paper.pdf

https://hal.archives-ouvertes.fr/hal-01509746/document

I thought about implementing it ... For you it is probably worthwhile if you don't have it already.

Raab et al. (2008) "Unbiased Global Illumination with Participating Media"

for the concise path integral formulation of volume rendering.

I use the stochastic progressive variant of photon mapping with the global radius decay from

Knaus & Zwicker (2011) "Progressive Photon Mapping: A Probabilistic Approach"

To generate photon paths I use Woodcock tracking, essentially. In "Spectral and Decomposition Tracking for Rendering Heterogeneous

Volumes", Kutz et al. (2017) developed many extensions of this. I use the "spectral tracking" variant. I put a volume photon on every sampled interaction point.

When tracing eye paths, I obtain volume interaction points by the same tracking methods as used for photon mapping. At these points I look for nearby photons and add their contribution. That is, in the basic variant with Point-Point 3D estimators. In "The Beam Radiance Estimate for Volumetric Photon Mapping", Jarosz et al. (2008) developed a method to gather photons along a beam. I implemented this also. The three pics are rendered with it. It is good for thin media. Actually, I like this paper a lot. Not only presents it the beam thing, in Sec. 3.3 it also has a nice derivation of the photon weights.

In denser media I don't want to look for photons all the way to the next surface intersection. So I use a piecewise-constant stochastic estimate of the transmittance along the query beam. This essentially allows to cut off the query beam after a few mean free path lengths. Inspiration for this comes from Jarosz et al. (2011) "Progressive Photon Beams" Sec. 5.2.1 and Krivanek (2014) "Unifying Points, Beams, and Paths in Volumetric Light Transport Simulation" Sec. 4.2 "Long" and "short" beams.

You can ask me about specifics. I'll try to answer

But to be honest, this is very much brute force. If you want to render SSS in such dense media as I took for the Buddha, you might be better off using a fast approximation!

Regarding Walter et al.'s rough transmittance model: I think I finally got it right. Here is a recreation of Figure 1

I "only" implemented the Beckmann NDF with V-Cavity masking & shadowing function. Looks fine and I don't have to implement VNDF sampling to keep the weights low. I also noticed numerical issues with low alpha. But IIRC I get it to 1e-3 with no issue. And at that point the material looks pretty much perfectly specular. I do shading calculations in double precision though.

Btw. Since you mention GGX: Heitz recently released a paper on how to sample the VNDF for GGX more easily.

http://jcgt.org/published/0007/04/01/paper.pdf

https://hal.archives-ouvertes.fr/hal-01509746/document

I thought about implementing it ... For you it is probably worthwhile if you don't have it already.

### Re: My little path tracer

Thanks alot for your detailed answer. This will help to get a good start.

At the moment I use the Sampling-Technik from Eric Heitz descripted in this paper:

https://hal.inria.fr/hal-00996995v1/document

The Paper from your link is then the next step. But at the moment I'm more interested in Subsurface Scattering.

At the moment I use the Sampling-Technik from Eric Heitz descripted in this paper:

https://hal.inria.fr/hal-00996995v1/document

The Paper from your link is then the next step. But at the moment I'm more interested in Subsurface Scattering.

### Who is online

Users browsing this forum: No registered users and 1 guest