Cycles_path_guiding tests

Rly looking forward to the glossy

2 Likes

I don’t know what this means, but it sounds ominous…

I am vaguely referencing an old Klingon proverb…
…vaguely, to make it sound more ominious.

1 Like

I did not know that saying was popularized by the klingons, wild!

I always thought Klingons stole it to Númenóreans…

For clarification:
“Revenge is a dish that is best served cold” is a line from Kahn from Star Trek 2: The Wrath of Kahn.
He says that it is a old Klingon proverb.
I always suspected that it is a real saying that is much older…

Good call. It is much older, though not precisely in that form. https://www.phrases.org.uk/meanings/revenge-is-a-dish-best-served-cold.html

1 Like

@moony @Metin_Seven @Ace_Dragon @LemonBranny
After some delay, I finally got time to work on support for glossy materials.
The build bot is cooking a version right now.

there is now an additional parameter, “Directional Sampling Type”:

  • Diffuse Product (old version for diffuse only)
  • Re-sampled Importance Sampling (Version 1 for glossy support)
  • Roughness-based (Version 2 for glossy support)

Atm, these new versions are not optimized for speed, so please test equal sample counts for now and give feedback about all three types.
Note: guiding is currently only available for fully-opaque surfaces.

14 Likes

That’s great, thanks Sebastian!

Two questions up front:

  1. Do the glossy samplers also include diffuse path guiding?
  2. Which of the glossy methods works best / is the most efficient, Re-sampled Importance Sampling or Roughness-based?
  1. the two new methods are not glossy only. They are not bound to diffuse only anymore.
  2. I have my preference, but I would like to get feedback from you all on your thoughts and experiments.

The plan is to remove the other two and then focus on the best-working one.

I am also interested if there are any situations where it gets worse or breaks.

2 Likes

I will post some of my test results tomorrow as well :wink:

1 Like

Constructed a basic test scene real quick, is the build already up?

2 Likes

Should be in here:

5 Likes

Ok, looks like this is perhaps too simple a scene to yield anything really interesting. But as a first test:

All of these are 256 samples. I turned off everything that may stop paths early. Filter Glossy is set to 0.1 and max bounces are set to 1024 across the board.

No Guiding: 5:40.97

Diffuse Product: 9:27.56

RIS: 11:09.08

Roughness-based: 9:51.49

The later two, and especially RIS, are slightly darker, in particular on the very rough side of the torus.

The materials here are a 0.8-grey purely diffuse room enclosing a 0.8-grey purely glossy torus using the Multiscatter GGX shader and going from 0 roughness to 1 roughness based on the angle. from its center, so straight in front is the seam where roughnesses 0 and 1 meet.

In the center of the room there also is a cylindrical mesh emitter (no other shaders on it) emitting at strength 1

And the camera is panoramic, giving a 360° view

EDIT: A second try with a slightly modified scene: The torus is now a half pipe. Once again, not a whole lot to note, except that the RIS and Roughness-based methods are both notably darker on the highly rough glossy material than the diffuse product version, and that they, and especially RIS, introduce much more fireflies.

No Guiding:


Diffuse Product:

RIS:

Roughness-based:

2 Likes

Thats great.

Been looking forward to this. I’ll try to conduct some more tests tomorrow - but this is a quick and dirty test:

Simple glossy prism (roughness 0). No clamping, filter glossy = 0, samples = 50

Original PG (diffuse)

New (re-sampled importance sampling)

6 Likes

Not too different in general, will try another scene here shortly.

4096 samples (no adaptive sampling), 256 training, filter-glossy 0.05. Bounces: diffuse 32, transparent 19, gloss 180, max 180


Setup:
Non-guided base:
scene2-notguided

Diffuse guided:
scene2-pg-diffuse

RIS guided:
scene2-pg-ris

Roughness guided:
scene2-pg-diffuse

Setup - Pure white, 0% rough, Glossy BSDF (GGX) for the outer “ellipse”. 100% diffuse and rough for the floor.

1 Like

A second scene, again not much of a difference. Are these scenes too artificial or is the guiding “under trained” with my settings? I may be hitting the non-determinism issue making back to back comparisons more difficult as well.

4096 samples (no adaptive sampling), 256 training, filter-glossy 0.10. Bounces: diffuse 10, transparent 19, gloss 100, max 180


Non-guided base:

Diffuse guided:

RIS guided:

Roughness guided:

1 Like

Interesting test. I should have probably clarified that guiding on glossy materials means that the glossy ness has to have a roughness (>0.05 or even >0.1) to show an effect. On pure glossy materials with a lower roughness value, you are close to a perfect mirror and there is only this narrow, glossy cone light is reflected from, and for that, directional sampling is already optimal.

Here is an example of a material with a rougher glossy component (scene by @moony )

No path guiding:


Path guiding (diffuse product):

Path guiding (RIS):

Path guiding (roughness-based):

9 Likes

It seems to me RIS has the biggest effect out of all of them.
In your scene, RIS causes the lowest noise overall as far as I can tell
In my scene, very rough objects (roughhness >~ 0.8) go darker with RIS than diffuse-only methods though.

Mix of glossy materials of different roughness values and diffuse materials - with a light being cast through a refractive medium.

128 samples (all training samples)

Diffuse Only PG

Resampled Importance

Roughness Based

The new techniques make a dramatic difference on glossy materials with high roughness values (Red monkey which has a roughness of 0.5). Also on the floor which is a mix of diffuse and glossy with a layer weight driving the falloff - which shows much better and clearer reflections.

I’d say the resampled technique is the best.

12 Likes