dalboris / vpaint

Experimental vector graphics and 2D animation editor
http://www.vpaint.org
Apache License 2.0
732 stars 54 forks source link

feature: sequential line drawing onion skin - draw lines in specific order to get a tween #40

Closed blurymind closed 8 years ago

blurymind commented 9 years ago

Both tweenmaker and Cacani have the ability to connect two frames and make inbetweens by showing you the order in which you need to draw the lines in the new empty frame. It takes the line order from the first frame.

here is how it looks like in cacani: https://www.youtube.com/watch?v=UQL8pyY9P2E&list=PL453xPZwguXLvaSvNuLBR3vc_lEunaQ0v&index=3

They call it stroke matching.

tweenmaker (see line recorder section) http://www.elecorn.com/tweenmaker//help/windows.html Tween maker calls it "lines recording"

cacani https://cacani.sg/product/cacani/

Right now to make a tween in vpain, one has to first draw the lines and then connect them one by one manually. Or be limited to pasting lines from the first frame and then altering them. Both are not ideal solutions. The first takes too many steps and is repetitive labor, the second is rigid and limited as to compared to drawing the lines manually.

dalboris commented 9 years ago

Automatic inbetweening is going to be my main research focus next year. I am optimistic that we'll have in VPaint something much better than what is available in Cacani. It wont require you to draw in a specific order, or even to have the same number of strokes :-)

scribblemaniac commented 9 years ago

I will be very impressed if you can do what you say you can. It seems to me like there would be significant challenges for a program to determine how the user expects it to behave and for it to deliver those expected results. Best of luck!

blurymind commented 9 years ago

I think that it is important that we have it as an option. When it is completely automated, then you dont get as much creative control over the tween.

blurymind commented 9 years ago

oh I missed to mention that the onion skinning in "Live" mode in those programmes also shows the user the direction in which the lines must be drawn as well. It is not just the order of drawing, but also the direction.

dalboris commented 9 years ago

@scribblemaniac I agree: a fully automatic method can never succeed in all cases. What I have in mind is a user-assisted semi-automatic method instead, where you indicate a few correspondences manually, and the software figures out the rest. If the user is happy with the result, he would just specify more correspondences manually until he's satisfied. In the most optimistic scenario, the algorithm would be good enough that in most cases, you wouldn't have to indicate any correspondences manually at all, but it is unclear yet whether I'd be able to achieve that. However, according to early research I've already done on this topic, I estimate that two or three manual correspondences should be enough in most cases. For more concrete examples, check the "Successful inbetweening" video clips in my master's thesis page. These are fully automatically generated from the first and last frame, expect the "dragon head", which required to manually specify two correspondences.

@blurymind Yes, adding some control over the "direction" of the tweens is planned too, but challenging because of the complexity of the data-structure. This is very related with the other "tween spacing" suggestion you just made: it's all about having key vertices/edges indicating not only a space-time position (i.e., where is the vertex/edge located, and at what frame), but also a space-time tangent (i.e., where is the vertex/edge going, and at what speed). Mathematically (for technical people around), this means adding user-specified constraints to the derivative of the trajectory.

There are two challenges to achieve this:

  1. How do the user specify these tangents?
  2. How do the interpolation algorithm (i.e., the algorithm generating the tweens) satisfy these tangents.

In other programs, these questions are much easier to answer than in VPaint since they don't allow the topology to change. In VPaint, it is much less clear how to do this, since objects can "merge" and "split", so the concept of derivative/tangents is ill-defined, as we explain in the future work section of the Siggraph paper:

The VAC opens up a number of exciting avenues for future work. Computing aesthetically pleasing interpolation between key cells is a rich and interesting problem. In conventional animation systems, animation curves are defined for any animation variable by keyframes that always have well-defined before and after keyframes. This allows for well-defined tangent vectors to be specified or inferred at keyframes (e.g., Catmull-Rom). However, the topological events allowed by the VAC means that a key cell can have multiple before and after key cells, e.g., two or more vertices that join or split at a given time t, or an entire edge or face that merges or spawns from a given vertex. Developing sound and practical methods for position interpolation or user-based tangency specification is significantly more complex as a result.

If we can solve all those challenges with elegant and intuitive solutions, then I'm not too worried about the future of VPaint ;-) But those are hard problems, it's going to take a long time before all this is solved and implemented.

blurymind commented 9 years ago

Ah I see. That is very interesting to see. :) Vpaint it seems is different than those applications in its core technology. I hope there is a way do this for the sake of a faster workflow in the future.

scribblemaniac commented 9 years ago

@dalboris There are indeed some difficult issues that arise from the design of VPaint, but you seem to have a firm grasp on them. It's obvious you have already done lots of reasearch in this area and have no doubt already put a great deal of thought into these things when initially creating VPaint. I'm sure if anyone can come up with solutions to these challenges, you can.

dalboris commented 9 years ago

Yes @blurymind, you are exactly right. The core technology of VPaint is what make it different from previous animation (or vector graphics) packages. The technology is more powerful in the sense that it allows to express more things than existing technology, as for instance "these faces are connected like this", or "this curve splits into two curves at this specific frame". However, this expressiveness is a double-edged sword: every tool is harder to implement since it has to take into account this information and preserve it in an intuitive way. However, once implemented, the hope is indeed that it would allow for faster workflow and better quality animation.

@scribblemaniac Thanks for the kind words :-) I'll try not to disappoint, but I'm a bit struggling to dedicate time to work on VPaint right now :-/