====== Arnold, Sampling and Denoising ====== {{ :3d:arnold:maya_arnold_sampling.png?400|}} Best practice in regards of finding the right sampling values is to keep them low in the overall building process. Like shown in the image the Camera Adaptive Anti-aliasing (AA) is the parameter to control the overall sampling. It controls the pixel supersampling rate or the number of rays per pixel that will be traced from the camera. The Camera (AA) samples multiply diffuse, specular, and light samples after being squared. This setting is related to controlling the quality of the rendered images by adjusting the anti-aliasing and sampling rates for different aspects of the scene. ===== Manual adjustments for rendering ===== To render a sequence it is vital to probe on static renderings, if the sampling is equally good. It doesn't mean to be perfect for the cost of extreme high rendering times. The aim would be that all areas of the image share a similar noise pattern, especially the indirect lit ones (Diffuse, Specular, Transmission, SSS and Volume [Indirect]). ===== Comparison Series ===== Like seen in the image above, the Camera (AA) and the Diffuse value have been animated. By that one can create results that can be compared against the best sampling of the same series. ===== Adaptive Sampling ===== {{ :3d:arnold:anim_rendnersettings_adaptiv.png?50|}}{{ :3d:arnold:anim_rendnersettings.png?50|}} If a good configuration of the base sampling has been found, the resulting quality of that can be controlled by the Camera (AA) sampling, which also can be done adaptive based on actual geometric/feature demands at that part of the image. Using adaptive sampling with an identical high Max.-value will speed up the rendering time with close to the same quality. The following render times are in m.s and from different workstations of a farm, but nonetheless it is quite obvious, that rendering with a sampling starting at 4 and ending at 20 (AA) is much faster adaptive than having a static value all along (see. first row of table below). ^ 1 ^ 2 ^ 3 ^ 4 ^ 5 ^ 6 ^ 7 ^ 8 ^ 9 ^ 10 ^ 11 ^ 12 ^ 13 ^ 14 ^ 15 ^ 16 ^ 17 ^ 18 ^ 19 ^ 20 ^ | 1.0 | 1.19 | 1.38 | 1.36 | 1.58 | 2.50 | 3.08 | 5.21 | 9.54 | 8.42 | 10.51 | 11.37 | 15 | 24 | 19 | 21 | 21 | 24 | 24 | 26 | | 1.49 | 1.40 | 1.59 | 1.46 | 2.33 | 3.19 | 3.49 | 4.30 | 5.44 | 6.08 | 9.24 | 7.59 | 8.20 | 11.57 | 8.53 | 9.21 | 9.06 | 9.18 | 9.32 | 9.29 | //Column names = frames, first row = render time for constant sampling, second row = render time for adaptive sampling// ===== Sampling Saturation ===== Being forced to apply some denoising based on the rendering of [[https://en.wikipedia.org/wiki/Physically_based_rendering|PBS-Renderer]] like Arnold it is interesting to see, that there comes a phase based on the sampling, where the denoising isn't that drastically improving anymore.\\ For the same [[https://en.wikipedia.org/wiki/Cornell_box|Cornell-Box]] here are metrics-plots using [[https://en.wikipedia.org/wiki/Structural_similarity|SSIM]] and [[https://github.com/msu-video-group/ERQA|ERQA]] to see the curves converging and becoming flat around the middle region.\\ The measurement was always done against the highest sampled rendering of that series, which can be seen at the last image resulting in the result of 1 (perfect match). {{ :3d:arnold:arnold_sampling-qualitymetrics-denoising.png?600 |}} The image above shows a noticeable horizontal line starting around image ~10, which indicates that there is no further gain in image quality by just raising the sampling settings, on which basis a denoising will be applied. This is explicitly true for the **adaptive sampling**. ==== Questions ==== * Does the **Adaptive Threshold**-Property apply a higher sampling binary (yes/no) or is there a smooth transition later between regions of higher and lower sampling? --- //[[r.engel@mediadesign.de|Rainer M. Engel]] 2024/01/23 18:12//