![]() Registered Member ![]()
|
Hello all. I'm working on an animation (1.5 mins long) which can't really be cut into smaller scenes, and performance and file size are starting to become a problem. (It now takes over a minute to save/load on a SSD, and I'm getting the longstanding audio sync bug when exporting animation.)
I try to minimise the project where I can by merging layers and frames, but it's difficult without knowing a little more about how Krita works. It would be useful to know: 1) Do layers use resources just by existing? Does a single layer with 300 frames in it use significantly less memory than 3 layers with 100 frames each? In other words, is there any benefit in merging layers if it doesn't reduce the total number of individual keyframes? (I prefer to keep different animation objects in separate layers where possible for flexibility.) 2) Does the complexity of a frame affect how much memory it uses? For instance, does a frame containing a single brushstroke take up the same memory as a complex picture filling the whole canvas? What about single colour vs multiple colours? 3) What's the most efficient way to handle repeated animations? One of my characters strums a guitar throughout the scene. Currently I've just manually copy-pasted the strumming animation dozens of times, which feels like a clunky way to work and chews up frames. Is there a better way I don't know about? (I'm thinking of something more like when you repeat an audio clip in a DAW - the repeats just point back to the original clip without adding to the memory footprint.) Any other memory-reduction tips would be welcome too. (I'm thinking mostly in terms of disk space, but reducing RAM use is always good too.) Thanks in advance for any help. |
![]() Registered Member ![]()
|
If you're desperate to reduce drive space then you really need a bigger or additional drive. That may be difficult to fit in your PC, for various reasons, but large capacity USB sticks are quite cheap nowadays and great for offloading data files as an 'archive/library' to free up space on your internal drive. If you want something a bit faster, you can get a cheap USB-SATA adapter cable that will let you connect an SSD drive to your PC USB connector.
It is possible to reduce RAM usage by separating a multi-layer animation into 'background' and 'foreground' layer files then working on them separately and then merging all the layers of (a copy of) the background file to give a single layer that you can bring in to the foreground working file. However, that would need additional intermediate files which would need extra drive storage space. All the other things you're considering really are minor factors and the main factor is the total number of keyframes, which are separate independent images. Krita doesn't have block reference/pointer facilities (as in your DAW example) but like tweening, that may come along in the future. |
![]() Registered Member ![]()
|
Thanks for the reply, ahab. Good to hear that block pointer facilities are being considered for the future. I look forward to that (and tweening).
I should have made it clear that it's not storage space itself that's the problem, but the save/load time that comes with a large project file. My .kra file is now around 300mb, and takes minutes to save to SSD, during which time Krita essentially freezes (for most of this time it's stuck at '60% saved', I assume that's not a bug?). This makes it hard to get a decent workflow going: I either save infrequently and risk losing work to a crash, or autosave forces me to stop work for a few minutes every x minutes. From what you say, it all comes down to the total number of keyframes, and I think I've minimised that as much as I can now. I'm getting near the end of this project so I'll just push on, and try to make my next project smaller and simpler. Your technique for working on layers in separate files sounds like a good idea for the future, but there's a lot of interaction between layers in this particular project. File size still seems a bit mysterious to me. I've noticed that I can merge down layers to remove a couple of hundred keyframes, but then adding just 50 new frames can return the file to the same size it was. Odd. Thanks again for the help. |
![]() Registered Member ![]()
|
From other posts I've read, I know that tweening is something that is being considered for the future. The block pointer thing was just my wishful 'one of many things that may happen if we're lucky'.
For reference and as a matter of interest, how many layers do you have and what is the frame size, colour depth and frame length of your animation? What sort of PC do you have and how much RAM does it have? There is something I forgot about and that is off-canvas content. The layers in krita are not limited to the canvas you can see, which is useful if you use sliding backgrounds for moving scenery etc. Also, you may have created off-canvas content with some editing you've done. As an experiment, can you make a copy of your working file and open it, then do Image -> Trim to Image Size ? This will remove all off-canvas content. It would also remove your ability to slide scenery backgrounds any more on all keyframes so bear that in mind. That may give you some image memory and file size reduction. If it does give you a significant memory/size reduction, you can go on from there and you could bring any sliding background layers back in later, from a backup copy of your original working file. |
![]() Registered Member ![]()
|
Cropping out off-canvas content is a good idea. Thanks, I'll try that tomorrow. I haven't done a huge amount of off-screen movement, but maybe I've left something lurking out there.
The project is a little over 2000 frames long and has about 40 layers, though many of them are for small touches like eyes blinking and don't have many keyframes. 1920 x 1080 canvas @ 100 ppi. (I should perhaps have gone lower res in retrospect.) 8 bit-depth colour. My PC is Windows 7, i7 processor, 8gb ram. Cheers! |
![]() Registered Member ![]()
|
That helped a bit. Thanks, ahab. Finally got the project finished and up on youtube. Krita's great, but I think I'll wait till the animation support's a bit more mature before trying anything too ambitious. It was a bit of a fight towards the end.
Also, beyond a certain size, the project started failing during the animation render. I managed to get around this by merging down to about 6 layers. This reduced the total number of frames a lot, but nearly doubled the file size, which seems counterintuitive to me. It did seem to make animation rendering more stable though, so might be worth trying if anyone else is having a similar problem. |
![]() Registered Member ![]()
|
It gets more complicated the more you look at it. I got a 50% reduction in file size by doing a Trim to Image Size on one old animation but that was because I'd done lots of full layer scaling for zooming in on a photograph so that was to be expected.
As for that file size increase you saw, it does seem counterintuitive so I did some experiments and it does happen. I can get 5x increase in file size by merging layers and thus reducing the number of keyframes, even with a simple test animation. I believe this is related to how krita encodes/stores images and depends not so much on image 'complexity' but on the 'extent' of the image content. You'd have to ask a developer about the details of that but it seems to be definitely a factor. |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]