Bug 435875 - onionskin sometimes doesn't appear after scrolling the timeline
Summary: onionskin sometimes doesn't appear after scrolling the timeline
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-18 13:27 UTC by animtim
Modified: 2021-04-21 22:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
onionskin bug (148.37 KB, image/png)
2021-04-18 13:27 UTC, animtim
Details
onionskin no bug (170.93 KB, image/png)
2021-04-18 13:27 UTC, animtim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description animtim 2021-04-18 13:27:23 UTC
Created attachment 137681 [details]
onionskin bug

Sometimes when scrolling through frames with click-drag on the timeline, on click release the onionskin doesn't appear.

I can reproduce this easily when making animation on twos.

Also it looks like it can happen even more when transparency mask with animation is added in the mix (it may be just an impression though, I first noticed it with transparency mask, and then managed to reproduce without too.)

See the attachments, first one showing when the issue happens, and second one how it should be when it doesn't happen.
Comment 1 animtim 2021-04-18 13:27:53 UTC
Created attachment 137682 [details]
onionskin no bug
Comment 2 Eoin O'Neill 2021-04-21 04:52:43 UTC
I've confirmed the bug; This issue seems to be caused from a frame regeneration optimization and is 100% reproducible when scrubbing between two frames that have the exact same contents.

My thought process for fixing this is that we should do it in two stages:
1) Make an exception to regeneration when any layer on the stack is currently in onion skin mode. This requires the least amount of work, but isn't the most optimized. It would be easy to get this ready for 5.0 immediately.
2) When we rewrite the compositing of onion skins to fix the other compositing problems, we will need to address this issue by changing when and how onion skins are composited. This is already something we need to do in order to fix color-space related issues.

For part 2, I will probably need to talk to dkazakov to get a better idea of how we should structure the compositing of onion skins to avoid issues like this in the future. Ideally, it would be done in a separate pass but still respect the layer stack's general compositing order.
Comment 3 Eoin O'Neill 2021-04-21 22:40:11 UTC
Git commit df37deb715b2e9cf85a1412d602c178067fadbbe by Eoin O'Neill.
Committed on 21/04/2021 at 22:39.
Pushed by eoinoneill into branch 'master'.

Update frame regeneration logic to prevent issues where onion skins would
sometimes not render properly.

M  +21   -9    libs/image/kis_image_animation_interface.cpp
M  +1    -1    libs/image/kis_image_animation_interface.h
M  +5    -2    libs/image/kis_onion_skin_cache.cpp
M  +0    -1    libs/image/kis_paint_layer.cc
M  +1    -6    plugins/dockers/animation/KisTimeBasedItemModel.cpp

https://invent.kde.org/graphics/krita/commit/df37deb715b2e9cf85a1412d602c178067fadbbe