A better frame-image optimisation

To put it simply: When I duplicate a frame, UNTIL I CHANGE IT AT ALL, the original image should be the image referenced. To clarify, I just want to move a background over a tiny bit without changing it, but each frame I “reuse” the image, it creates a new one in the file itself:

They’re all the same thing; is there a way to have it reuse images until I make a change to one of them?

As I made more of them the saving times became horrifying

@JoeyH Hey, thanks for taking the time to send your comments as always. Well I understand what you mean and why would you ask something like this. The thing is that changing the content of what the camera sees, constitutes as a different frame wherever you see.

What I’ll say next is just conceptually what I think could happen, but I don’t know if it’s possible technically.

Precedent

The only way to really do something like this would be to implement transforms tweening for layers, or even better for “drawing groups”.

To put into into perspective using existing software, when I speak about “drawing groups” it would be a mix between Adobe Animate’s “symbols” and “Drawing Objects”.

Symbols are mainly meant to create an embedded canvas / timeline for complex animation requirements (e.g drawing substitutions like eyes, mouths, hands, etc to speed up workflow), however drawing objects are modifiable in the main timeline / canvas whereas symbols need to enter an editing mode to manipulate layers and frames.

In Adobe Animate, this is what was kind of done with the new motion tweening. The classic tweens would only work from one drawing to the next (shown as an arrow), so the important drawings of a motion (“keys”) would need to be duplicated and modified to change the position of the drawing, but the new tweens would take a literal single “drawing” symbol and you would only need to create “diamond keyframes” to record the new position at a specific frame.

image

  • classic tween (blue) vs. motion tween (yellow)
  • key drawing container (circle shape icon) vs. keyframe (diamond shape icon)

“Motion tween” can only occur with symbols & “Shape tween” can only happen with “ungrouped” vector shapes. Using a single object per single layer would be needed to get consistent results.

This is not any better in Toonboom Harmony though the representation of elements is a bit more clear.

The “drawing containers” are represented like semi-transparent rectangles or “cels” which hold any kind of vector or bitmap drawing. Sometimes you can also see them with thumbnails too.

In Harmony the “frames” are better called drawings, which are “exposed” to the timeline (this is more in line with trad. animation) an “exposure” is basically repeating the drawing across time, until a new drawing is added to replace the previous one. Pencil2D already does this.

In the image you can distinctly see each drawing has a “division line” at either side, to signify it’s different from the other drawings.

In this other image you can see a normal frame exposure where there’s only a single drawing (no divider lines) and you can also see the motion tween representation, shown as little black and/or red squares on top of the drawings. In Harmony you can only motion tween layers which are the objects that hold the drawings (think of it like a transparent folder), so the limitations are pretty much the same as Animate.

Solution proposal

So knowing all of this, we could consider that a potential solution for such problem, even if we have a bitmap layer, is to get some kind of “smart group” construct in Pencil2D that could be created on the active layer either from a whole drawing (frame) or part of it (selection) and live as a sort of “sub layer” in the actual layer,

That makes more sense when using vectors since every “unconnected” thing you draw becomes it’s own object, and thus achieves z-ordering properties. FYI a single stroke is recognized as a partial shape with fill and outline colors in the vector world, it’s just showing a specific stroke but you can transform it and whatnot.

Anyway such “group” for bitmaps could always reference the same portion of an image in memory and disk and when it’s “broken” or the group state is removed it would then be “painted” back onto the canvas and create the actual image data to save. If we use the group, the only transform data applied to the virtual group would be needed.

Roadmap

Now believe it or not I’ve already requested this a long time ago. You should consider looking at the developer forum and checking the initial roadmap that was glued together from requests of several users back in the day.

It is a bit outdated because I haven’t had time to add more stuff (I have that in a separate personal document) but it’s not missing much since most people ask for the same things every few months.

At least this should help in case you want to propose things that people have already requested either to flesh them out more or simply to abstain because their requests were already clear.

Later on each one of those points become trackable issues on the forum, but well just so you know there are a lot of pending issues. Hope this helps to answer.

1 Like

I see! I did not know this sort of thing was suggested already by you- I have read the roadmap before, and that was a bit ago… I was sort of guessing how it worked above (I assumed each keyframe just references an image in the file). Layer tweening would honestly be a better fix for this issue I was having, but I was suggesting this as a temporary alternative, in case tweening was too difficult to implement at this point.

Thanks for the info!

@JoeyH Well If you know your BG is going to change somewhere. I’d recommend doing the BG in layers as well. Leave specific layers that won’t move alone and redraw only the elements that will move. That’s how most of us did it even in commercial apps when tweening was not an option.