Animation: Add hold frames based on image sequence number

Right now when importing an image sequence, you can add a steady number of hold frames or import an image sequence with no holds. If possible, an option to add hold frames depending on the image sequence# would be really helpful (maybe an option you can toggle in the import animation frames dialogue box?) This would allow imported animation sequences with frame holds to keep their timing.

5 Likes

I understand what you’d like to have and it would be very useful.

As a nitpicklng observation, in the image above, it looks like frame001.png goes into frame-0 and frame005.png goes into frame-5.

1 Like

Thanks, good catch. I went ahead and fixed it.

Sounds easy, so I added it here: Beginner coding tasks in Krita: easy and short feature requests, ready to implement

1 Like

Maybe 0001 could go from 0 to 1? Duplicating it in zero becaus it is the lowest number one.

Animation can go from frame by frame “animating in 1s” or “animating in 2s” that has a hold key in between each keyframe. All this d pends on the frame rate of the project. Ussualy is 24fps and animated in 2 which makes a 12fps for the animation.

There should be a zero key frame though to be right no timeline starts at zero. Seems like a user error to me more than anything. And I am not even sure if my suggestion to hold it in zero would create wrong ideas to the user and if should not just the same start where it is marked to be by the ####. Maybe it needs the background for the zero and not the image sequence.

The timeline in krita starts at 0 and if you examine the .png image sequence that is rendered out, it goes frame0000.png, frame0001.png, etc.
There are various arguments for not using 0 as an index number (depending on the function and purpose) but this is what we have.

1 Like

We might need to have it (* loading/importing from 1) as an option, since other programs might number it from 1.

1 Like

no it should always start at zero the timeline. where you put the keyframes is another story.

I have made animations where the character would enter in the scene after zero so the sequence on the start had a bunch of empty frames on the start but that is project dependant.

I misunderstood the point you were making.
The proposal by @squirrel seems to take care of various situations and would automatically put empty keyframes from frame-0 onwards if the .png image sequence started at a larger number.

As @tiar pointed out, some applications may export sequences starting at 1.

but that case it might be because it is frame 1, and frame 1 means from time=0xfps to time=1xfps.
and that time frame information is dependent on the correct frame rate to be displayed with proper timing. since it is images it relays on the user to input it correctly too.

but the thing is the time should be able to display seconds and frames alike and time cant start at 1 seconds, it starts at zero some accept a zero input others don’t but it all starts from zero regardless.

honestly personal opinion here now I think it should be zero because if you can input a zero input and curves become relevant with interpolation later on you can start the first frame with a interpolation straight away. I kinda had hopes for a vector engine to help calculate interpolations for animation.

Hi,

Basically, if I have files:

  • img0005.png
  • img0015.png
  • img0031.png

I’m expecting to have this:

File Keyframe
img0005.png 5
img0015.png 15
img0031.png 31

Frame 0 is defined with empty keyframe

After, if export has been made from a software on which first frame is 1, user can do “Remove Frame and Pull” to keyframe 0

Adding an option as evoked by @tiar could be a solution to automatically remove one frame, but in this case option label should be clear.
Currently a label like “loading/importing from 1” could be confusing for user (type of question I’m able to ask to myseld: if my first image is img005, is it imported at frame 1 or?)

Another thing with this option: what if first image is img000.png and option is checked?

Grum999

As it stands you can easily choose “Only Unique Frames” when rendering out an image sequence, so I’m mainly just asking for the import equivalent of that (especially since I tend to occasionally export out frames just so I don’t lose work if the file corrupts). Krita already natively numbers from 0000 when rendering image sequences in this manner. Having the option to offset numbering based on the first frame seems useful, but given the “remove frame and pull” option, it’s really not asking too much more from the user to adjust one frame difference when most of the gruntwork is putting 100 or so frames in the right spacing. That’s just my two cents.

I’d love to work on this. Is it okay if I take it?

1 Like

That would be awesome. Thank you so much!

2 Likes

This should already be implemented:
MR: Auto add hold frames (!757) · Merge requests · Graphics / Krita · GitLab
commit: https://invent.kde.org/graphics/krita/commit/1b0ce32ce07c3ad2201776b6954e9704171bfdbd (+ fix in Fix kis_animation_importer_test (015f970c) · Commits · Graphics / Krita · GitLab)

2 Likes