My little path tracer

Show-off, reference material & tools.
cignox1
Posts: 14
Joined: Mon Jan 30, 2012 10:11 am

Re: My little path tracer

Post by cignox1 » Wed Mar 13, 2019 1:55 pm

I think the jade Buddha is really amazing!

dawelter
Posts: 40
Joined: Sun Oct 29, 2017 3:15 pm
Location: Germany

Re: My little path tracer

Post by dawelter » Fri Mar 15, 2019 7:29 am

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 ...

XMAMan
Posts: 19
Joined: Tue Dec 01, 2015 7:52 am
Location: Germany, Dresden

Re: My little path tracer

Post by XMAMan » Mon Mar 18, 2019 2:44 pm

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)

dawelter
Posts: 40
Joined: Sun Oct 29, 2017 3:15 pm
Location: Germany

Re: My little path tracer

Post by dawelter » Tue Mar 19, 2019 9:02 am

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 :D
glossy_transmissive_globe.jpg
glossy_transmissive_globe.jpg (136.48 KiB) Viewed 580 times
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.

XMAMan
Posts: 19
Joined: Tue Dec 01, 2015 7:52 am
Location: Germany, Dresden

Re: My little path tracer

Post by XMAMan » Tue Mar 19, 2019 6:05 pm

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.

papaboo
Posts: 42
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Re: My little path tracer

Post by papaboo » Fri Mar 22, 2019 10:53 am

If you already have the VNDF sampling from the 2014 paper then implementing the new is trivial. It's the same set of samples with the same PDF, so you just have to copy paste the reference sample method and then you'll have faster GGX sampling :)

dawelter
Posts: 40
Joined: Sun Oct 29, 2017 3:15 pm
Location: Germany

Re: My little path tracer

Post by dawelter » Sun Mar 24, 2019 10:04 am

@XMAMan you're welcome.

Meanwhile, I rendered variations of the Buddha. This time with the new glossy transmissive material. I also added a switch in the material to force a path tracing step instead of getting Li from photons, essentially treating the BSDF as if it was a delta function. No NEE yet. I'm slightly concerned about the black rims, but I just attribute them to the lack of anything to reflect.
buddha_variations.jpg
buddha_variations.jpg (696.31 KiB) Viewed 435 times
So far so good. But my renders take awfully long. After reading through the Arnold and Manuka papers, I come to the conclusion to focus on some basics. Sane light selection, QMC sampling, path guiding, splitting and RR, are things I want to have.

knightcrawler25
Posts: 1
Joined: Mon Mar 25, 2019 10:15 am

Re: My little path tracer

Post by knightcrawler25 » Mon Mar 25, 2019 5:30 pm

dawelter wrote:
Sun Mar 24, 2019 10:04 am
@XMAMan you're welcome.

Meanwhile, I rendered variations of the Buddha. This time with the new glossy transmissive material. I also added a switch in the material to force a path tracing step instead of getting Li from photons, essentially treating the BSDF as if it was a delta function. No NEE yet. I'm slightly concerned about the black rims, but I just attribute them to the lack of anything to reflect.
buddha_variations.jpg
So far so good. But my renders take awfully long. After reading through the Arnold and Manuka papers, I come to the conclusion to focus on some basics. Sane light selection, QMC sampling, path guiding, splitting and RR, are things I want to have.
Very pretty indeed!

dawelter
Posts: 40
Joined: Sun Oct 29, 2017 3:15 pm
Location: Germany

Re: My little path tracer

Post by dawelter » Tue Apr 09, 2019 8:44 pm

Thanks, knightcrawler! :-)

Here is a another 24 h rendering. I had this fun idea to make a flat earth version of the globe figure. :lol:
glossytransmissiveflatearth.jpg
glossytransmissiveflatearth.jpg (210.29 KiB) Viewed 351 times
The dome is filled with a thin, scattering medium. This creates the glow effect around the sun. The image has other details which I like. Like the subtle shadows cast on the surrounding walls. But it proved difficult to render, i.e. it's still noisy.

Post Reply