This is an evolution of original Env. Light Visibility Cache described in this post. The code is available on "for_v2.4" branch (CPU already available, I have still to write the OpenCL code).
Results
An 1 samples/pixel without any cache (only importance sampling):
An 1 samples/pixel with old Env. Light Visibility Cache:
An 1 samples/pixel with new 2 levels Env. Light Visibility Cache:
Note: all 3 methods are unbiased and converge to the correct solution on the long run.
As you can see, the new version deliver a more uniform and slightly less noisy result (at a fraction of the pre-processing time). You can think at the new solution like a mix of the first two:
1) at first level, the map is used;
2) than each pixel map corresponds to a tile where importance sampling is used.
The main advantage is that using, for instance, 32x16 tiles size is a bit like accelerating the pre-processing time by 32*16 = 512 times (!).
Parameters
The old 3 parameters have now no effect (i.e. default settings will be used):
Code: Select all
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.width = 256
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.height = 128
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.samplecount = 4
Code: Select all
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.quality = "low" or "medium" or "high"
#
# Set any of the following to 0 to enable the automatic "quality" setting
#
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.tilewidth = 0
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.tileheight = 0
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.tilesamplecount = 0
Code: Select all
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.tilewidth = 32
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.tileheight = 16
scene.lights.__WORLD_BACKGROUND_LIGHT__.visibilitymapcache.map.tilesamplecount = 4
The new code reduce the pre-processing time by an order of magnitude but it is still a good investment to spend few seconds in pre-processing time.
This is a 1 sample/pixel render with low quality setting and few millisecond of pre-processing:
This is a 1 sample/pixel render with high quality setting and and about 10 seconds of pre-processing: