利用者:Lukasstockner97/GSoC 2016/Weekly Reports/Week 1

提供: wiki
移動先: 案内検索

Hi all!

So, my first weekly report for the Cycles Denoising implementation:

  • I initially tried to start from the Blender side and add custom passes there that the render engine can set and that aren't shown in the UI, but the whole source/blender/render/ code is still a bit confusing. So, I decided to do the Cycles side of things first (as planned in the schedule) and return to that area later as it's not that relevant for first denoising results anyways.
  • As explained in the proposal [1, "Avoiding tile-edge artifacts"], on the one hand, it's necessary to wait for neighbor tiles to be rendered before denoising. On the other hand, you want to keep as few tiles as possible in memory since they might need a significant amount of memory. Currently, Cycles just renders each tile, returns it to Blender and forgets about it. So, I had to redesign the tile management to allow multiple "stages" for a tile - rendering, denoising, freeing, all as soon as possible to avoid large amounts of memory usage. That's implemented in [2] and [3].
  • Then, of course, Cycles needs to store the additional data needed for denoising, so I implemented that in [4].
  • All of the above is useless if you can't enable it, so the next step obviously was to implement the user interface and Blender->Cycles syncing code, which I did in [5]. It also needs custom defaults, so those are in [6].
  • The next step is to actually produce the denoising data that is stored in the passes. That's a bit tricky because the passes (normal, color and depth) should be similar to the actual result, but noise-free. So, for a diffuse object you just use its normal and color. For a mirror, it works way better to use the normal and color of the second bounce since that's essentially what you see in the end. However, at which roughness do you stop using the second bounce? For Glass it's even harder, since you have to decide between using the first hit, the reflected path and the refracted one - mixing doesn't work since that adds noise again.

I've come up with a few heuristics that seem to produce decent results for most scenes, so I'll commit those pretty soon.

You can already try out the branch (soc-2016-cycles_denoising) and see the multi-stage tile system in action - when you enable denoising for the RenderLayer, the "denoiser" currently makes the processed tiles twice as bright to get some visual feedback until the proper one is in place.

So, the plan for next week is to:

  • Finish and commit the code that produces the denoiser data
  • Try to work out how to add the custom passes in Blender, most likely combined with poking people on IRC
  • Possibly start already with the clean implementation of the basic denoising code.


[1] https://wiki.blender.org/index.php/User:Lukasstockner97/GSoC_2016/Proposal

[2] https://developer.blender.org/rBb65836195418f2f9b4d744c45a387cb19bc4447c

[3] https://developer.blender.org/rB49018d273c6662ca9e679f7c21515577e848ff28

[4] https://developer.blender.org/rBe855dede3881106194cb8fdfdaced0dde0b4ac01

[5] https://developer.blender.org/rB2d0bfbd6f628cc80c777f81832f5011f419d870a

[6] https://developer.blender.org/rB079616159fcb1e84fc7b19a901087bd6f605919f