Cycles_path_guiding tests

Hm. will try that. However even with defaults regular rendering had good GI distribution. Anyways will try to experiment more with it…

We had already this disscusion about glossy filter earlyer in this thread.
The filter at 1 blurs the glossy bounces as if your glossy material has full roughness then.This helps to reduce noise but the lightransport can not happen like it should at 0,especially for caustics.

Indirect light clamping is related to PG too, since it helps to transport the indirect light.For this reason the clamping should be at 0 or very high.

e.G.The prism scene from @Eary_Chow you can download in this thread,has a glossy filter 0,1 and iirc indirect clamping at 80.

Yep - both were set to zero.

Hm,have you set MNEE off?

This is all strongly depending on settings and the lighting and scene/material conditions of course.

Not all scenes benefit the same from the PGL feature.

One hint here.
If you want caustics and make it easier for pg to find them you can use
filter glossy at around 0.1.
lower values will sharpen the caustics, but also make it harder for pg to find them.

3 Likes

@lacilaci86 it would be interesting to see some of these scenes you mentioned:

Here are some advice:

    1. for the moment pg only guides sampling decisions on materials with at least one diffuse component
    1. clamping indirect and direct light WILL change the look of your image. This if not a fault of pg but because clamping light will result in an incorrect image. The error is just different with pg
    1. filter glossy can help pg to quicker find caustics, but already small values are helpful (e.g., 0.1)
    1. make sure that you do not disable any ray visibility on your object (e.g., Diffuse, Glossy, Shadow) these settings as well lead to incorrect renderings to begin with and a different sampling strategy (like pg or the upcoming many light sampling) changes the look of the incorrectness
  • 5 to aggressive Russian Roulette (e.g., min light bounce = 0) might neglect the advantage of pg because rays are still killed before they reach a light source
7 Likes

i add the advice to the start post

about point 1.

What does that mean,one diffuse component?
Like a diffuse shader? Then a glossy shader don’t work? Or does it mean at least one reflecting bounce?

1 Like

Could there be a way to, like, progressively reduce filter glossy throughout the rendering process somehow? I’m imagining some procedure where it at least can figure out roughly where to look, and eventually just go for full sharpness.

I know for a fact that there is some algorithm like that (though I forgot how it’s called), which always starts out assuming every surface is diffuse, but as it refines, reflections become sharper and sharper. IRC it was even unbiased. So at least in principle it ought to be possible. Not sure if it were possible for PG though
The technique is from years ago at this point and I don’t think it saw a whole lot of usage, so it probably had some issues I’m not aware of. Perhaps the fact that you can’t just stop a render at any time, since it’d gradually get sharper, so your initial results would still look really blurry or something like that.
But if a Filter Glossy of 0.1 is enough to seriously help it along, it might be more reasonable. Starting from slightly blurry reflections, rather than completely blurry ones…

I wonder whether a glossy with roughness > 0 will work. But if not, presumably it means somewhere in the material there needs to be a Diffuse, Translucent, or SSS shader?

1 Like

In some situations it’s night and day - take this ‘stained glass window’ type scenario. regular path tracing can’t handle this at all - yet path guiding can easily.

This is just the straight glass shader with voronoi driving the colour. Zero roughness, clamping and filter glossy both zero too. 500 samples.

In this case - I found PAVMM to be much better than Directional Quad Tree or VMM

15 Likes

It handles overlapping flat glass panels quite well too. MNEE caustics would start to fall down in this scenario as it can only handle 3 transparent levels currently.

15 Likes

MNEE works better in some situations.

Take an opaque object embedded in glass (50 samples) - of course, regular path tracing fails entirely in this situation

MNEE:

Path Guiding:

4 Likes

I think this is a very promising tech and wonder how much it will improve.
Currently the speed of guided rendering slows down to about one third of plain path tracing when using 0.75 guided samples.
I guess the “online-learning” is taking it’s toll.

Now on nVidia’s RTX cards as well as Apple’s ARM-SOCs there are lots of “tensor / neural” cores currently not utilized in 3D-rendering.
With CUDA-, RTX-, tensor-cores and video-RAM on the same chip (on ARM even CPU-cores included) it should be possible to speed up the build-up of the guiding structure with some “neural-guiding-sampler” or something?

In the original papers about path guiding some of the authors are listed as nVidia affiliates, let’s hope they will come up with some improvements utilizing their tensor cores :wink:

2 Likes

These three tests make me excited for when PG and MNEE can hopefully work together properly

3 Likes

I see that most people here are testing scenes with glass or glass-like materials that are impossible in standard Cycles. What is the expected performance for more simple scenes?

I tried the build on a few of my scenes and it took me quite a bit of effort to find one where pathguiding performed (marginally) better for the same samplecount (but longer render time). Usually it was worse for the same spp and definitely worse for the same render time.

The scenes generally contain no (or very little) transmission materials, all principled shaders and a mix of environment light and a few area lights.

The only scene where I got slightly better performance for the same sample count was a simple tiny room with a few objects and environment light coming through a hole in the wall (no other lights). When the room was sealed (no light from outside) and lit by a single area light, the result of path guiding was worse.

The scene follows the guides cited in the first post, IF the first point means that it can be a principled shader material and not a literal mix of the basic diffuse shader with something. Otherwise this is probably the reason for bad results.

Pathguiding on, 40spp, 2m 12s:

Pathguiding off, 40spp, 1m 12s:

The no pathguiding version is slightly noisier with more prominent patterns in the noise, but even here the difference isn’t huge.

I’m finding little to no benefit at the moment with scenes like yours. Whether this will change as the build is improved I don’t know - it’s still very early days in it’s development, but very exciting all the same.

Worse perfomance should be expected for “normal” scenes.
Cycles does Next Event Estimation: When a light source is visible in the scene, rays hitting diffuse surfaces can be connected directly with substantial speed-up in rendering.
Path guiding does not help with this, instead building up the guiding structure slows things down.

It is meant for scenes where no direct light is visible but trough a hole, behind a shade, glass or else: When Next Event Estimation is impossible, diffuse bounces will be performed randomly regardless where the bright places are. Path Guiding will find those and replace random bounces with guided ones and thus speed up the render.

Thank you, that helps a lot!

I expected it would be something like this, but I was a bit confused because there are a few interior scenes in this thread that obviously work better, but it seems like they all had windows with glass or other subtleties that made them work.

I was eager to test this scene, but it doesn’t work with it…

Error report:

Illegal address in CUDA queue synchronize (shader_eval_background)Illegal address in cuMemFree_v2(mem.device_pointer) (C:\Users\blender\git\blender-vexp\blender.git\intern\cycles\device\cuda\device_impl.cpp:798)

:face_with_diagonal_mouth:
PS
& it does just fine w/ 3.3.alpha

Path Guiding is CPU only for now, GPU support is planned for a future version of OpenPGL.

3 Likes

Renders fine with CPU - default path guiding settings (PAVMM).

glass

And this is using Directional Quad Tree path guiding

tree

As a point of comparison - this is the same scene rendered with MNEE/Shadow Caustics instead of path guiding (I had to replace the mesh light with an area light to get it to work).

MNEE

Bear in mind all of these are denoised. The raw images have a bit of noise in them and quite a few fireflies.

6 Likes