Cycles: Implement denoising option for reducing noise in the rendered image
authorLukas Stockner <lukas.stockner@freenet.de>
Sun, 7 May 2017 12:40:58 +0000 (14:40 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Sun, 7 May 2017 12:40:58 +0000 (14:40 +0200)
commit43b374e8c5430488a302298b1026faa1c3a231e9
tree42e619a9fa08d02cef515b6315ce34dd7fd062b2
parentbca697834728fd12c84941aa2a428abfe2090b27
Cycles: Implement denoising option for reducing noise in the rendered image

This commit contains the first part of the new Cycles denoising option,
which filters the resulting image using information gathered during rendering
to get rid of noise while preserving visual features as well as possible.

To use the option, enable it in the render layer options. The default settings
fit a wide range of scenes, but the user can tweak individual settings to
control the tradeoff between a noise-free image, image details, and calculation
time.

Note that the denoiser may still change in the future and that some features
are not implemented yet. The most important missing feature is animation
denoising, which uses information from multiple frames at once to produce a
flicker-free and smoother result. These features will be added in the future.

Finally, thanks to all the people who supported this project:

- Google (through the GSoC) and Theory Studios for sponsoring the development
- The authors of the papers I used for implementing the denoiser (more details
  on them will be included in the technical docs)
- The other Cycles devs for feedback on the code, especially Sergey for
  mentoring the GSoC project and Brecht for the code review!
- And of course the users who helped with testing, reported bugs and things
  that could and/or should work better!
117 files changed:
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_session.h
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/device/CMakeLists.txt
intern/cycles/device/device.cpp
intern/cycles/device/device.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_denoising.cpp [new file with mode: 0644]
intern/cycles/device/device_denoising.h [new file with mode: 0644]
intern/cycles/device/device_memory.h
intern/cycles/device/device_multi.cpp
intern/cycles/device/device_split_kernel.cpp
intern/cycles/device/device_split_kernel.h
intern/cycles/device/device_task.cpp
intern/cycles/device/device_task.h
intern/cycles/device/opencl/opencl.h
intern/cycles/device/opencl/opencl_base.cpp
intern/cycles/device/opencl/opencl_mega.cpp
intern/cycles/device/opencl/opencl_split.cpp
intern/cycles/device/opencl/opencl_util.cpp
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/closure/bsdf.h
intern/cycles/kernel/closure/bsdf_ashikhmin_velvet.h
intern/cycles/kernel/closure/bsdf_diffuse.h
intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
intern/cycles/kernel/closure/bsdf_microfacet.h
intern/cycles/kernel/closure/bsdf_microfacet_multi.h
intern/cycles/kernel/closure/bsdf_oren_nayar.h
intern/cycles/kernel/closure/bsdf_phong_ramp.h
intern/cycles/kernel/closure/bsdf_principled_diffuse.h
intern/cycles/kernel/closure/bsdf_principled_sheen.h
intern/cycles/kernel/closure/bsdf_toon.h
intern/cycles/kernel/closure/bssrdf.h
intern/cycles/kernel/filter/filter.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_defines.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_features.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_features_sse.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_kernel.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_nlm_cpu.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_nlm_gpu.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_prefilter.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_reconstruction.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_transform.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_transform_gpu.h [new file with mode: 0644]
intern/cycles/kernel/filter/filter_transform_sse.h [new file with mode: 0644]
intern/cycles/kernel/geom/geom_triangle.h
intern/cycles/kernel/kernel.h
intern/cycles/kernel/kernel_accumulate.h
intern/cycles/kernel/kernel_compat_cpu.h
intern/cycles/kernel/kernel_compat_cuda.h
intern/cycles/kernel/kernel_compat_opencl.h
intern/cycles/kernel/kernel_light.h
intern/cycles/kernel/kernel_passes.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_path_branched.h
intern/cycles/kernel/kernel_path_state.h
intern/cycles/kernel/kernel_path_surface.h
intern/cycles/kernel/kernel_path_volume.h
intern/cycles/kernel/kernel_projection.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/kernels/cpu/filter.cpp [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_avx.cpp [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_avx2.cpp [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_cpu.h [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_sse2.cpp [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_sse3.cpp [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/filter_sse41.cpp [new file with mode: 0644]
intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp
intern/cycles/kernel/kernels/cpu/kernel_cpu.h
intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
intern/cycles/kernel/kernels/cpu/kernel_split_avx.cpp
intern/cycles/kernel/kernels/cpu/kernel_split_avx2.cpp
intern/cycles/kernel/kernels/cpu/kernel_split_sse2.cpp
intern/cycles/kernel/kernels/cpu/kernel_split_sse3.cpp
intern/cycles/kernel/kernels/cpu/kernel_split_sse41.cpp
intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp
intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp
intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp
intern/cycles/kernel/kernels/cuda/filter.cu [new file with mode: 0644]
intern/cycles/kernel/kernels/opencl/filter.cl [new file with mode: 0644]
intern/cycles/kernel/split/kernel_branched.h
intern/cycles/kernel/split/kernel_buffer_update.h
intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
intern/cycles/kernel/split/kernel_shadow_blocked_dl.h
intern/cycles/kernel/svm/svm_closure.h
intern/cycles/kernel/svm/svm_displace.h
intern/cycles/kernel/svm/svm_geometry.h
intern/cycles/kernel/svm/svm_image.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/buffers.cpp
intern/cycles/render/buffers.h
intern/cycles/render/film.cpp
intern/cycles/render/film.h
intern/cycles/render/mesh.cpp
intern/cycles/render/session.cpp
intern/cycles/render/session.h
intern/cycles/render/tile.cpp
intern/cycles/render/tile.h
intern/cycles/util/CMakeLists.txt
intern/cycles/util/util_math.h
intern/cycles/util/util_math_float3.h
intern/cycles/util/util_math_int4.h
intern/cycles/util/util_math_matrix.h [new file with mode: 0644]
intern/cycles/util/util_simd.h
intern/cycles/util/util_types.h
source/blender/makesrna/intern/rna_render.c
source/blender/render/extern/include/RE_engine.h
source/blender/render/intern/source/external_engine.c
source/blenderplayer/bad_level_call_stubs/stubs.c