Bug 407275 - Animations are rendering oddlu
Summary: Animations are rendering oddlu
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 4.1.7
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-06 19:17 UTC by HeyMay
Modified: 2019-05-09 15:29 UTC (History)
1 user (show)

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


Attachments
Background is supposed to be green transparent. First frame seems to repeat throughout even though it is not set up this way in my frames. (408.49 KB, image/gif)
2019-05-06 19:17 UTC, HeyMay
Details
target.gif (207.87 KB, image/gif)
2019-05-08 04:00 UTC, HeyMay
Details
Gif animation rendered with ffmpeg (183.88 KB, image/gif)
2019-05-08 05:36 UTC, vanyossi
Details
rendered gif in gimp (227.42 KB, image/gif)
2019-05-08 05:41 UTC, vanyossi
Details
attachment-2089-0.html (1.94 KB, text/html)
2019-05-08 13:25 UTC, HeyMay
Details
attachment-7337-0.html (1.92 KB, text/html)
2019-05-09 13:25 UTC, HeyMay
Details
giphy.gif (230.00 KB, image/gif)
2019-05-09 15:29 UTC, HeyMay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HeyMay 2019-05-06 19:17:36 UTC
Created attachment 119876 [details]
Background is supposed to be green transparent. First frame seems to repeat throughout even though it is not set up this way in my frames.

SUMMARY
Hello! I have been using Krita for months now and LOVE it. I've done many animations, but only recently have noticed an issue when I render them. The first frame seems to repeat throughout the animation and my backgrounds will not appear. I haven't changed the way I render my animations (gif)

STEPS TO REPRODUCE
1. File
2. Render animation
3. Save as video in a gif format

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 vanyossi 2019-05-08 03:47:03 UTC
Its hard to understand what is happening, it looks like some sort of rendering problem. The green to transparent background is not visible, but thatcould be something completely different.

Is it possible for you to share the file you are getting the problem with? If you cannot attach it to the report you can link using dropbox or a similar service.
Comment 2 HeyMay 2019-05-08 04:00:06 UTC
Created attachment 119905 [details]
target.gif

 target.png - Copy.kra
<https://drive.google.com/file/d/1Hz7tAEe5TGGizwa0r17RZ8cH_29obzgE/view?usp=drive_web>
 I have attached 2 files. 1 after rendering (the gif) and the file i
originally started. I have done multiple animations before, so my settings
haven't changed as far as how I render. I hope this helps!

On Tue, May 7, 2019 at 9:47 PM vanyossi <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=407275
>
> vanyossi <ghevan@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>          Resolution|---                         |WAITINGFORINFO
>              Status|REPORTED                    |NEEDSINFO
>                  CC|                            |ghevan@gmail.com
>
> --- Comment #1 from vanyossi <ghevan@gmail.com> ---
> Its hard to understand what is happening, it looks like some sort of
> rendering
> problem. The green to transparent background is not visible, but thatcould
> be
> something completely different.
>
> Is it possible for you to share the file you are getting the problem with?
> If
> you cannot attach it to the report you can link using dropbox or a similar
> service.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Bug Janitor Service 2019-05-08 04:33:17 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 4 vanyossi 2019-05-08 05:36:58 UTC
Created attachment 119906 [details]
Gif animation rendered with ffmpeg


Sadly this is a limitiation on gif, ffmpeg and krita at this moment.

GIF: does not support 8bit transparency, only 1bit, this means transparency on or off. The image you have uses a very light transparent green which is interpreted as off.

FFMEG: git implementation for ffmpeg is designed more on the idea of make gifs out of movies, I thought it maybe a problem on our ffmpeg command, but no matter what I did, working directly with ffmpeg I could not make the gif display correctly from the pngs exported. The correct rendering for your image would be to use a replace frame gif animation, but instead ffmpeg insists in using cumulative, which with a transparent channel makes the previous frames linger on. I was not able to make Dither on ffmpeg work on the transparency channel

The closest I was able to get was using this cmd
ffmpeg -r 12 -start_number 0 -i frame%04d.png -i palette.png -vcodec gif -lavfi [v][1:v]paletteuse=dither=bayer:bayer_scale=5 -gifflags -offsetting+transdiff -pix_fmt rgba -y render2.gif

Krita: AFAIK vanilla krita (no GMiC) has no option to make indexed 8bit images to dither transparency. which makes faking gradient transparency with 1bit alpha channel quite challenging.

I attach the gif I obtained (scaled image for faster rendering)
Comment 5 vanyossi 2019-05-08 05:41:15 UTC
Created attachment 119907 [details]
rendered gif in gimp

I believe of using the right tool for the right job. If you want to preserve as much as possible th ecurrent look, use gimp: you can dither transparency, and force frames to be in replace mode. Image speed is not as easy to tune.

Or, you can adjust your image to the limitations of gif rendering, and render correctly from krita.
Comment 6 vanyossi 2019-05-08 05:47:46 UTC
closing as this doesn't seem to be a bug in krita. (we could try to tweak the ffmpeg command to add extra options for gif dithering, transdiff and offsetting. but defaults are sane and currently cumulative mode is not possible to change)
Comment 7 HeyMay 2019-05-08 13:25:55 UTC
Created attachment 119912 [details]
attachment-2089-0.html

Thank you for your response. I feel like normally that would answer my
question, but I guess I am still confused in regards to the transparent
background. I removed the green color and left the transparent layer: still
no use. So I ended up removing the transparent layer and it works fine.
However, all my previous animations have been rendered as gifs *with*
transparent backgrounds (no color) without any issue. So, I guess my
question is, why is this now an issue where it wasn't before?

On Tue, May 7, 2019, 11:47 PM vanyossi <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=407275
>
> vanyossi <ghevan@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|REPORTED                    |RESOLVED
>          Resolution|---                         |NOT A BUG
>
> --- Comment #6 from vanyossi <ghevan@gmail.com> ---
> closing as this doesn't seem to be a bug in krita. (we could try to tweak
> the
> ffmpeg command to add extra options for gif dithering, transdiff and
> offsetting. but defaults are sane and currently cumulative mode is not
> possible
> to change)
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 8 HeyMay 2019-05-08 13:29:36 UTC
This is one i rendered last month. Transparent background and no issues.

On Wed, May 8, 2019 at 7:25 AM hey may <heymayj1@gmail.com> wrote:

> Thank you for your response. I feel like normally that would answer my
> question, but I guess I am still confused in regards to the transparent
> background. I removed the green color and left the transparent layer: still
> no use. So I ended up removing the transparent layer and it works fine.
> However, all my previous animations have been rendered as gifs *with*
> transparent backgrounds (no color) without any issue. So, I guess my
> question is, why is this now an issue where it wasn't before?
>
> On Tue, May 7, 2019, 11:47 PM vanyossi <bugzilla_noreply@kde.org> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=407275
>>
>> vanyossi <ghevan@gmail.com> changed:
>>
>>            What    |Removed                     |Added
>>
>> ----------------------------------------------------------------------------
>>              Status|REPORTED                    |RESOLVED
>>          Resolution|---                         |NOT A BUG
>>
>> --- Comment #6 from vanyossi <ghevan@gmail.com> ---
>> closing as this doesn't seem to be a bug in krita. (we could try to tweak
>> the
>> ffmpeg command to add extra options for gif dithering, transdiff and
>> offsetting. but defaults are sane and currently cumulative mode is not
>> possible
>> to change)
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>
Comment 9 vanyossi 2019-05-08 18:52:38 UTC
Could you share the gif you made last month again? it shows the attachment as just text
Comment 10 HeyMay 2019-05-09 02:25:56 UTC
The person I made this for verified it is transparent and works properly
for her. Please let me know if this one doesn't work. I'll have to send a
different one from my home computer. Thanks!!

On Wed, May 8, 2019, 12:52 PM vanyossi <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=407275
>
> --- Comment #9 from vanyossi <ghevan@gmail.com> ---
> Could you share the gif you made last month again? it shows the attachment
> as
> just text
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 11 vanyossi 2019-05-09 05:20:56 UTC
Sorry to bother again, but it seems that files attached trough mail don't get uploaded here. Could you try uploading it to google Drive as before and share the link?
Comment 12 HeyMay 2019-05-09 13:25:17 UTC
Created attachment 119928 [details]
attachment-7337-0.html

I uploaded this onto my drive to share it with you. I hope it works. If
not, then we can just leave it. I have found that I can render with a
transparent background if I make a duplicate file of an old animation and
just erase the work vs starting a new one from scratch. I guess a sort of
loop hole that seems to be working for now.
 diamondfinal.gif
<https://drive.google.com/file/d/1j4pal_MLIw6RiEJCyl4vC3JhVkADXrzr/view?usp=drive_web>


On Wed, May 8, 2019 at 11:21 PM vanyossi <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=407275
>
> --- Comment #11 from vanyossi <ghevan@gmail.com> ---
> Sorry to bother again, but it seems that files attached trough mail don't
> get
> uploaded here. Could you try uploading it to google Drive as before and
> share
> the link?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 13 HeyMay 2019-05-09 15:29:17 UTC
Created attachment 119935 [details]
giphy.gif

On Thu, May 9, 2019 at 7:25 AM hey may <heymayj1@gmail.com> wrote:

> I uploaded this onto my drive to share it with you. I hope it works. If
> not, then we can just leave it. I have found that I can render with a
> transparent background if I make a duplicate file of an old animation and
> just erase the work vs starting a new one from scratch. I guess a sort of
> loop hole that seems to be working for now.
>  diamondfinal.gif
> <https://drive.google.com/file/d/1j4pal_MLIw6RiEJCyl4vC3JhVkADXrzr/view?usp=drive_web>
>
>
> On Wed, May 8, 2019 at 11:21 PM vanyossi <bugzilla_noreply@kde.org> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=407275
>>
>> --- Comment #11 from vanyossi <ghevan@gmail.com> ---
>> Sorry to bother again, but it seems that files attached trough mail don't
>> get
>> uploaded here. Could you try uploading it to google Drive as before and
>> share
>> the link?
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>
>