This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Opacity keyframe rendering error

Tags: None
(comma "," separated)
bemily
Registered Member
Posts
3
Karma
0

Opacity keyframe rendering error

Thu Nov 28, 2019 3:27 am
Hello Everyone,

I'm trying to render an animation that has opacity keyframes in it. I keep re-rendering the image sequence and the video, and these transparent blocks keep showing up and every time I re-render this animation, these blocks show up in different places.

Here's a few sample frames of what I'm talking about (it's supposed to be a blue overlay over the whole image and you can see some spots aren't rendered properly):

Image

Image

Please let me know if you can help and what I can do to fix this.

If you suggest getting the new ffmpeg thingy, I have no idea where to find the file (is it even ffmpeg.exe anymore? I tried using the search tool for it too) in the millions of folders it comes with to stick in the ffmpeg slot thingy in the rendering window in Krita. Right now I'm using the ffmpeg-20190718-ab4795a-win64-static.

Thank you in advance.
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
I assume you're using Windows 10. Which krita version are you using?
What size is your canvas? Are those block artifacts 512 x 512?

Do you still have the blocks if you remove the opacity keyframes?
Do you still have the blocks if you remove the blue overlay?
Do you have any artifacts on any other animations?

What exactly do you do to create the blue overlay?

Do you get the blocks if you add opacity keyframes to another animation?
Do you get the blocks if you add a blue overlay to another animation?

If you want the latest ffmpeg then you can get it from https://ffmpeg.zeranoe.com/builds/ and I'd recommend that you get the 4.2.1 (latest current build) static version.
You have a development build from mid-July of this year and there shouldn't be anything wrong with it but you never know. Having said that, I have a feeling that it's not an ffmpeg problem.
bemily
Registered Member
Posts
3
Karma
0
ahabgreybeard wrote:I assume you're using Windows 10. Which krita version are you using?
What size is your canvas? Are those block artifacts 512 x 512?


I'm using Krita 4.2.2 and I'm actually using Windows 8. My canvas is 1920 x 1080

Do you still have the blocks if you remove the opacity keyframes?
Do you still have the blocks if you remove the blue overlay?
Do you have any artifacts on any other animations?

It's all only having to do with the opacity keyframes. It was also happening to the owl's window exterior because I also used the opacity keyframes on that. The blocks only appear due to the opacity keyframes.


What exactly do you do to create the blue overlay?

I create a new layer and fill the entire image with a solid dark blue color, then turned the blending mode of the layer to "Overlay" and then lowered the opacity. I put in the keyframes for different frames for the endpoint percentages for the opacity (like 0 to 35 or something).


Do you get the blocks if you add opacity keyframes to another animation?
Do you get the blocks if you add a blue overlay to another animation?

It's just the opacity keyframes. Yes, I've tried this on other animations and the same thing happens.

If you want the latest ffmpeg then you can get it from https://ffmpeg.zeranoe.com/builds/ and I'd recommend that you get the 4.2.1 (latest current build) static version.
You have a development build from mid-July of this year and there shouldn't be anything wrong with it but you never know. Having said that, I have a feeling that it's not an ffmpeg problem.


I don't know where the file is to put into the ffmpeg slot in the rendering options. There are so many folders and I assume I'm looking for ffmpeg.exe but I can't find it, or perhaps I'm supposed to load up another one.
Thanks so much for your time.
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
Thank you for your clear and concise answers. I'll forget about the overlay.

Those blocks are 512 x 512 which seems to be a common size for rendering artifacts (for reasons that a developer could explain).

I've just made a very simple one layer animation using krita 4.2.8 running on Windows 10, with opacity keyframes/variation and there were no artifacts of any kind in the rendered image output sequence.

Can you download the krita 4.2.8 Windows Portable 64-bit .zip package ( https://download.kde.org/stable/krita/4 ... -4.2.8.zip ) and run that, which will not affect your current 4.2.2 installation. Just right-click Extract it in your downloads folder then go into the resulting extracted folder and run the krita.lnk link file. Then see if you still have the problem.

You ought to use the latest formal release version anyway because it's had many bug fixes incorporated since version 4.2.2. When you're convinced that 4.2.8 is wonderful, you can download the standard 4.2.8 Windows installer package and run that to fully install 4.2.8.

If that doesn't fix things, can you produce a simple animation that has the problem, possibly by adding opacity keyframes to one of your old animations, then post a link to it via a file sharing service? If you do that, I can try it to see if it's the same on Windows 10.

As for ffmpeg, I'm puzzled as to how you know that you have ffmpeg-20190718-ab4795a-win64-static if you don't know where it is.
Leaving that aside, I'd recommend that you download the ffmpeg 4.2.1 Windows 64-bit static build from the zeranoe site and Extract the folder inside it then copy that folder to your C: folder (or anywhere that you could remember where it is) and then point to the ffmpgeg.exe which is in the bin folder inside that.
bemily
Registered Member
Posts
3
Karma
0
ahabgreybeard wrote:Thank you for your clear and concise answers. I'll forget about the overlay.

Those blocks are 512 x 512 which seems to be a common size for rendering artifacts (for reasons that a developer could explain).

I've just made a very simple one layer animation using krita 4.2.8 running on Windows 10, with opacity keyframes/variation and there were no artifacts of any kind in the rendered image output sequence.

Can you download the krita 4.2.8 Windows Portable 64-bit .zip package ( https://download.kde.org/stable/krita/4 ... -4.2.8.zip ) and run that, which will not affect your current 4.2.2 installation. Just right-click Extract it in your downloads folder then go into the resulting extracted folder and run the krita.lnk link file. Then see if you still have the problem.

You ought to use the latest formal release version anyway because it's had many bug fixes incorporated since version 4.2.2. When you're convinced that 4.2.8 is wonderful, you can download the standard 4.2.8 Windows installer package and run that to fully install 4.2.8.

If that doesn't fix things, can you produce a simple animation that has the problem, possibly by adding opacity keyframes to one of your old animations, then post a link to it via a file sharing service? If you do that, I can try it to see if it's the same on Windows 10.

As for ffmpeg, I'm puzzled as to how you know that you have ffmpeg-20190718-ab4795a-win64-static if you don't know where it is.
Leaving that aside, I'd recommend that you download the ffmpeg 4.2.1 Windows 64-bit static build from the zeranoe site and Extract the folder inside it then copy that folder to your C: folder (or anywhere that you could remember where it is) and then point to the ffmpgeg.exe which is in the bin folder inside that.


I already know where the folder of the ffmpeg thingy is, and I tried downloading the new one, the issue is I can't find the ffmpeg.exe file nor the bin folder in the new 4.2.1 one.
Image
Image

I just tried making a new file (after updating Krita) and there's at least one image that got rendered and had the artifact in it:

https://drive.google.com/open?id=15DZYl ... jNtkkMm0j6

When I preview it in Krita by hitting the play button, there's tons of artifacts appearing.

Here's my latest render of the animation I'm trying to fix:

https://drive.google.com/file/d/1Ik2xRa ... sp=sharing

I then tried adding a new layer using opacity keyframes at the very beginning and the same thing happened:

https://drive.google.com/file/d/1nPKVYw ... sp=sharing

Here's the raw file of the new file I tested with:

https://drive.google.com/open?id=173JFB ... 8XTjuD370V

What I ended up doing is just rolling the dice by re-rendering the thing and picking the rendered files with the least artifacts in them since every render is kind of a gamble for how much and where the artifacts end up. I really don't want to have to re-do this whole thing from scratch since I put in so many hours into it :'(

Thank you for your help.
User avatar
Snudl
Registered Member
Posts
63
Karma
2
OS
I also get those artifacts with the provided test file in Krita's animation cache and rendered to video (using master build on Linux). However, if setting the export option to Both (Image Sequence + Video) in File > Render Animation, the exported video seems to come out perfectly clean, and so do all the exported images. So please try that and see if it helps.

By the way, that is a great animation! Super detailed and adorable :) Consider posting it to https://krita-artists.org too, it's the brand new dedicated forum, endorsed by the Krita Foundation.
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
@Snudl:
The artifacts are reduced if I render with both Image Sequence and Video but they're not totally removed. Also, the artifacts are much worse on Windows than on Linux. (Another strange thing is that the .mp4 file is about three times as large if you render on Linux compared to a rendering on Windows but that's something else altogether.)
Given the almost random nature of this and different people's experience of it, there may be a hardware performance/timing related aspect to it all. Do you have a quite modern/poweful PC? I'd say mine is old and mid-range but not slow.

The .kra files that Bemily provided have a particular characteristic that lets me crash krita with one click :) and I'll be making a bug report about that soon.

@Bemily:
There are two aspects to your problem/post: 1 - the ffmpeg thing, 2 - the block artifacts. It's not the ffmpeg that's the problem here.

1. ffmpeg:
I now understand the confusion. What you have there is the souce code package. This is for people who are developing ffmpeg or who want to learn about it in great detail. I suggest that you delete that entire folder and any similar folders you may have downloaded in the past. What you need is an executable package.

You must have an executable package somewhere and be pointing to it from the entry in your Render window or you wouldn't be able to produce .mp4 files. You might have downloaded the July 2019 development executable at some time in the past. It's obviously working for you but ideally you'd have the latest formal release executable package as a 'sensible and best practice' thing.

If you click this link: https://ffmpeg.zeranoe.com/builds/win64 ... static.zip that will give you a download of the current Windows release build executable package, which has all that you need as I described before. It's not strictly necessary that you do this and the decision is up to you.

2. Block Artifacts
These are caused by some kind of krita rendering problem during the opacity keyframe opacity transitions. This needs a formal bug report here: https://bugs.kde.org/ Can you do that please? You need to sign up and log in to make a bug report. It looks a bit technical but it's quite easy. You can write a short descriptive title for it and make a short and simple description of the problem. If you do that and post a link to the bug in here, I'll go in an confirm it and provide more details in the report.

This bug may take a while to fix because the small, mostly volunteer, team of developers have lots of things to do and other bugs to fix.

There is a way of having opacity variation on frames along the timeline without needing the opacity keyframes to be present in the final run for rendering. This was discovered/explained by a developer (Tymond) some time ago and I'd like to try that to see if it will work for this problem.

Your link https://drive.google.com/open?id=15DZYl ... jNtkkMm0j6 asks me to log in with a Google account whereas the other links just give me a download button that works. I've seen this before and it's confusing but I think it's because you're trying to share a folder instead of a file; this needs a Google login and permission granting. Can you try remaking/resharing that link in the same way that you made all the other links so that I can download the .kra file?
Another way is to use a public file sharing service like https://uploadfiles.io/ which is totally free with no registration requirement. (This has a 30-day maximum storage limit and a slow download but that won't be a problem for this situation.)

I should be able to try that technique without your original animation .kra file but it would be useful to have it if I can.

As Snudl said, please post your animation to the krita-artists forum when it's ready, and any other work you may have done. The animation section there is quite sparse at the moment.
ahabgreybeard
Registered Member
Posts
1269
Karma
11
OS
There's an unfixed bug related to opacity keyframes that's been around for a while. https://bugs.kde.org/show_bug.cgi?id=402841

In Comment 11 of that report, Tymond makes a suggestion for a workaround that gets rid of opacity keyframes while maintaininng the desired opacity variations. I haven't tried this but it sounds reasonable and believable. It may work fine in this case depending on the structure of the animation

Another method would be to animate a transparency mask and flood fill each frame with the required level of grey to give the desired transparency. That would be boring and fiddly for a long frame sequence. I have done this for fading text captions quickly in and out but it's not something you'd want to do on a large number of frames.

Here is the bug report for the crash situation that Bemily's example .kra file revealed: https://bugs.kde.org/show_bug.cgi?id=414668
User avatar
tymond
KDE Developer
Posts
240
Karma
5
Maybe it would be better to use my workaround and then convert it into a Transparency Mask?...

EDIT: and in general, the bug isn't fixed because it's not easy to fix :/ and we don't have an animation developer now, Dmitry is busy with other things, and I couldn't fix it and now I'm busy with resources.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]