Page MenuHome

Cycles: Actually use PMJ02's jitter shuffling
AbandonedPublic

Authored by Jesse Yurkovich (deadpin) on Sep 22 2021, 7:19 AM.

Details

Summary

All of PMJ02_Generator was dead code and has been this way since the
initial Adaptive Sampling checkin rB409074aae56.

Attempt to actually use it now by hooking things up correctly.

[Scene tests TBD]

Diff Detail

Repository
rB Blender
Branch
dead-jitter (branched from master)
Build Status
Buildable 17219
Build 17219: arc lint + arc unit

Event Timeline

Jesse Yurkovich (deadpin) requested review of this revision.Sep 22 2021, 7:19 AM
Jesse Yurkovich (deadpin) created this revision.
William Leeson (leesonw) requested changes to this revision.Sep 27 2021, 11:21 AM

I looked this and agree with you that this just calls the regular PMJ code. However, as this is the case we should fix the code as the mark_occupied_strata should be different between PMJ and PMJ_02 and PMJ02 is a better sample set. I have attached a diff of what I think should fix the issue but it needs testing.

. The patch appears to produce a much better sample set.

This revision now requires changes to proceed.Sep 27 2021, 11:21 AM

@William Leeson (leesonw) Did you have a particular scene or method of measuring in mind that I could help test? Subjectively I tried the light_spread.blend and PMJ02 looked slightly worse at low samples but improved to about the same at higher (no difference in render time).

I forgot to add thank you for spotting this :-) I think maybe the flat or classroom, the monster and the bar scene are good. However, using your eye won't be sufficient. I use idiff from OIIO to generate the visual diffs from a reference image of about 131,072 samples per pixel. Then I make successive images at the powers of 2 upto to 8192 and plot a graph of the error values such as RMS and SN, output by idiff. This way you can see the convergence. It's a lengthy process though :-/

Switch directions. Instead of removing PMJ02, actually make use of it.

  • Integrate patch from William
Jesse Yurkovich (deadpin) retitled this revision from Cycles: Remove dead-code associated with PMJ's jitter shuffling to Cycles: Actually use PMJ02's jitter shuffling.Sep 29 2021, 11:29 AM
Jesse Yurkovich (deadpin) edited the summary of this revision. (Show Details)

We might need to generate the samples off-line as I have noticed that sometimes generating the samples can take a very long time. This is especially true if a bigger table is needed. I have also noticed that the rnd() method produces samples in the range [0 1] and not [0 1) which causes an assert then due to invalid index when checking for occupancy.

I did some quick convergence results of pmj02 vs the other methods in Blender


it's still not as good as in the paper but it looks like the results improve above 2048 samples per pixel.