appleseed icon indicating copy to clipboard operation
appleseed copied to clipboard

Fix False Colors not being applied to all tiles

Open laurelkeys opened this issue 3 years ago • 2 comments

This PR addresses the same issue as https://github.com/appleseedhq/appleseed/pull/2880, namely, False Colors aren't correctly applied to all tiles in a final render when the frame has some post-processing stage.

For a further explanation of the problem, see: https://discord.com/channels/430063582777049089/707230180233707591/729948630668148766

laurelkeys avatar Oct 18 '20 19:10 laurelkeys

92df33e is an alternative solution to the bug "False Colors not being applied to all tiles".

The problem is the following:

  1. We emit a signal for the end of the render before applying post-process. The signal is emitted using renderer_controller.on_rendering_success() in MasterRenderer::do_render().
  2. Because of that, appleseed.studio apply False Colors before post-process.
  3. False Colors gets applied on a copy of the frame, to keep the original render.
  4. So if there is a post-process + False Colors, False Colors get replaced by the post-process.

One solution is to call on_rendering_success after applying post-process, which re-order correctly the effects:

  1. Post-process is applied first
  2. Then False Colors is applied on the post-processed frame
  3. It works !

The problem with that solution, is that we don't call on_rendering_success and on_rendering_abort from do_render anymore, but on_rendering_begin() still is. Triggering the signals from different places in the code make it less easy to maintain and understand.

I think we should keep the structure in do_render() to make sure interactive rendering + final rendering always work the same way.

Another solution, the one in this commit, is to apply the post-process right after render. Then, no matter when you emit the signal, the frame will always be ready and will never get modified after the signal is being emitted.

@laurelkeys What do you think about this approach ? If you agree, can you try to break it while testing it ?

oktomus avatar Oct 24 '20 14:10 oktomus

@laurelkeys What do you think about this approach ? If you agree, can you try to break it while testing it ?

LGTM! Just tested it and it's working as expected 🙂

laurelkeys avatar Oct 24 '20 21:10 laurelkeys