Flickering artifacts in (animated) DOF areas
Open, ConfirmedPublic


System Information
Win10 (1803) AMD Threadripper GTX 1080Ti
Nvidia Driver 397.64

Blender Version
Broken: 2.79.6 9a674a749b1
Worked: n/a

Short description of error
Flickering artifacts in (animated) DOF areas.

Exact steps for others to reproduce the error
Please investigate the attached scene.



Seems like Denoiser artifacts (which can have a hard time in animated DOF/MBlur scenarios), so I wasnt sure if there is a bug involved here...
But as these are also apparent in 'in focus' areas I started rendering (still doing) and I'm actually having a hard time reproducing these (linux, 2.79 master build from buildbot, GPU rendering, 970m, 396.45 drivers, cuda 9.2)...
(will post the cropped border render sequence [kitchen sink area] in a bit)

But before adding too much uneducated blathering: @Lukas Stockner (lukasstockner97), mind having a look?

here is what I get with the file from the report

Of course it has artifacts, but I don't see those very prominent bright blocks as in the video in that area

I gave it a closer look and my initial thought also was that the denoiser freaks out. When you disable the denoiser you can see that there's a lot of noise in the rendered image (where it would be a miracle if any denoiser could properly resolve that BTW). But: it's not the denoiser's fault because the flickering artifacts are already present in the "raw" render!
I could reduce the whole scene to only 3 Lego bricks (around the sink) which still gave me the error. The artifacts don't appear if I override all materials with a simple Principled shader. So it looks like the (quite complex) materials (or at least one of them) is faulty or maybe some bump or normal shader doesn't play nicely with a scaling of 0.001 the whole scene is at. Plus I think that setting the render camera limits to 1mm - 2km doesn't help numerical precision either.
It might also be a combination of things that cause this, but the Denoiser is innocent.

Yes, it's not a Denoiser issue. My above rendering isn't using the Denoiser and a sampling rate of 1024. I have an older video of the same scenes without artifacts but I can't say what build I used for it.

Maybe an issue by the AMD Threadripper and/or GTX 1080Ti?

It also happens on my XPS with GTX 1050. I will test now CPU and GPU separately.

Here's again the scene I used for the above video with the settings (1024 samples). The former upload was an older scene with different settings. Just to get sure.

Also happens under Linux Mint with a GTX 780 and with a Xeon / GTX 1080ti.

If I override all materials with a simple Principled all is fine. If I use the "mb:315:::" (mb_pearlescent) material from the sink to override all, the artifacts are back.

It seems to be a GPU issue. Here's the CPU result. No artifacts.

Philipp Oeser (lichtwerk) triaged this task as Confirmed priority.Tue, Oct 9, 3:07 PM

OK, my bad.
Now I also noticed the difference CPU/GPU (no denoiser) Here is what I get [not getting the blocky stuff though...]:

In a 2.8 Debug build it asserts:

1   raise                                                                                                                                                         0x7ffff1737eab 
2   abort                                                                                                                                                         0x7ffff17225b9 
3   __assert_fail_base.cold.0                                                                                                                                     0x7ffff1722491 
4   __assert_fail                                                                                                                                                 0x7ffff1730612 
5   ccl::mf_sample_vndf                                                                                                          bsdf_microfacet_multi.h      90  0x47a6f03      
6   ccl::mf_eval_glossy                                                                                                          bsdf_microfacet_multi_impl.h 110 0x47a6f03      
7   ccl::bsdf_microfacet_multi_ggx_eval_reflect                                                                                  bsdf_microfacet_multi.h      437 0x47a6f03      
8   ccl::bsdf_eval                                                                                                               bsdf.h                       268 0x47e298d      
9   ccl::_shader_bsdf_multi_eval                                                                                                 kernel_shader.h              542 0x4881b9d      
10  ccl::shader_bsdf_eval                                                                                                        kernel_shader.h              603 0x4881b9d      
11  ccl::direct_emission                                                                                                         kernel_emission.h            119 0x48c537d      
12  ccl::kernel_path_surface_connect_light                                                                                       kernel_path_surface.h        253 0x494120d      
13  ccl::kernel_path_integrate                                                                                                   kernel_path.h                688 0x494120d      
14  ccl::kernel_path_trace                                                                                                       kernel_path.h                751 0x494120d      
15  ccl::kernel_cpu_avx2_path_trace                                                                                              kernel_cpu_impl.h            98  0x499535b      
16  ccl::CPUDevice::path_trace                                                                                                   device_cpu.cpp               694 0x3286e63      
17  ccl::CPUDevice::thread_render                                                                                                device_cpu.cpp               758 0x328770f      
18  ccl::CPUDevice::thread_run                                                                                                   device_cpu.cpp               445 0x3285a80      
19  std::__invoke_impl<void, void (ccl::CPUDevice:: *&)(ccl::DeviceTask *), ccl::CPUDevice *&, ccl::CPUDevice::CPUDeviceTask *&> invoke.h                     73  0x3294b15      
20  std::__invoke<void (ccl::CPUDevice:: *&)(ccl::DeviceTask *), ccl::CPUDevice *&, ccl::CPUDevice::CPUDeviceTask *&>            invoke.h                     95  0x3293973      
... <More>

gcc version 8.1.1 20180712 [if that is of interest...]

Maybe @Brecht Van Lommel (brecht) can have a look, too (also confirming this as there is definitely something going on)?

CPU and GPU are rendering different results. Here's the comparison.

Left: CPU
Middle: GPU
Right: Hybrid

ahh, hybrid is the blocky stuff :)

I can also confirm the problem.

I've attached an extremely reduced version of the scene - just one brick, a simpler shader and no DoF. Setting subsurface to zero gets rid of the issue (while any weight above the threshold shows it), as does disconnecting the normal input. In the original scene, disabling subsurface does not fix the problem.

Also, as I expected once I saw the bump node, the issue is gone by commenting out the ensure_valid_reflection calls. @Brecht Van Lommel (brecht), at this point I'd really suggest just reverting that commit until I can finally fix it properly.

Interestingly enough there are some differences left between CPU and CUDA in the full scene, but they look more like noise differences. Still, something to look into.