drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.03k stars 130 forks source link

(wild) feature request : Drawpile - the first truly collaborative animation software!! #180

Closed blurymind closed 9 years ago

blurymind commented 9 years ago

What if Drawpile had the ability to store animation frames, each animation frame contains a set of layers. This way multiple users could work on an image sequence together. Annotate frames and chat while animating. During a drawing session, each of the users can play the animated sequence so far and switch between frames.

The animation frames list window: A horizontal window that shows all current animation frames in thumbnails or shows a thumbnail of a hovered on frame by mouse.

The animation preview/export window could work in two possible ways -When playing the animation sequence, drawpile could make a temporary snapshot of all the frames and simply play them in a new window. Then when the animation preview window/mode is closed, drawpile could delete the temporary frame files (tmp folder?).

-Pause all activity for local user and just play the frames in the work area window.

Export options:

Possible technical problems:

Update 1- Initial design proposal:

I think that if you want to use the layers data to animate, you will have to create an alternative way to edit/manage the layers in Drawpile.

A new X-sheet dock is needed to address the animation workflow!

I put down some time to create a proposal design and a mockup. Please let me know what you think and if some stuff in there is unclear. :) Click for full screen.

xsheetindrawpile

Under the hood x-sheet dock is just managing the same layers that are in the layer's dock. It's just doing it in a radical new way!

key pose drawings can occupy frame ranges. So When you extend a drawing to occupy three frames instead of one, the x-sheet dock technically creates two new copies/clones of that layer above or bellow it (depending on which of the two arrows the user dragged) when playing from xsheet, mypaint can operate in solo layer view: like the "hide" feature, but hides all other layers except the selected one. Onion skin mode: hide all layers above the selection and show the ones below it with adjusted opacity

note for the mockup proposal: a frame that doesnt contain a drawing yet could be just the number of the frame, but color coded.. or it could be a symbol [-] or [0] or something. The +(add) MENU should say "add drawing" instead of "add frame". Replace the word "frame" with "Drawing" there. I will update it later if you like the proposal

The ability to scribble annotations is very very nice, but not a must have- considering it would be complicated to implement and sync between users.

Copying and pasting+insert drawings could be done with the right click menu. Deleting a drawing should move all the drawings bellow it upwards- filling its spot, so as not to have a missing drawing in its place. moving a drawing in the x-sheet could be done by just dragging it.

Layer tagging:

another idea for the implementation: If you add the ability to attach metadata to layers, you might be able to tell drawpile to treat some of the existing layers as animation frames, others - as a background element that is not affected by the x-sheet.

Taking it way further: -instead of duplicating a layer to hold a drawing longer, drawpile could have a variable for time length (for how many frames should I keep this layer drawing) attached to the layer. This would greatly increase how long the animations could be in it. A layer could contain the metadata of time range in which it exists - instead of being duplicated by the software a bazillion times.

-Another metadata attached to the layer could tell the x-sheet to treat it as a background element that is behind the animation.

-if variables in layers tell the x-sheet when to play layers and for how long, then managing your animation with the x-sheet doesnt have to move the layers around in the layer docker.

-best of all you can make both the layer and the x-sheet dockers useful for the animation pipeline. A tag attached to layers could tell the Layer docker to not show all of it's frames

path10320

Notes by callaa:

The features needed to support this kind of work flow would be:

Animation preview window that cycles through the layers (like Animation->Playback in GIMP) "Duplicate layer" button (been meaning to implement this anyway.) Export to animated GIF Export individual layers (this already exists in a way: ORA files are actually zip files containing the >layers in PNG format) Solo layer view: like the "hide" feature, but hides all other layers except the selected one. Onion skin mode: hide all layers above the selection and show the ones below it with adjusted opacity The simplified approach has the downside that it would only be usable for fairly short animations. >Currently, the maximum number of layers that can be created is limited to 255 per users (this is a >protocol limitation.) Although, even then I can image it might be very handy for low-FPS animated >storyboards!

schoerg commented 9 years ago

As a workaround you could use layers and combine the frames manually afterwards.

blurymind commented 9 years ago

yeah, but its not easy to work that way :) No easy playback and onion skinning.

callaa commented 9 years ago

A fully featured animation editor might be bit out of scope for this project, but simple support for animations using layers as frames (like in the GIMP) would be possible to implement.

The features needed to support this kind of work flow would be:

The simplified approach has the downside that it would only be usable for fairly short animations. Currently, the maximum number of layers that can be created is limited to 255 per users (this is a protocol limitation.) Although, even then I can image it might be very handy for low-FPS animated storyboards! The upside is that these changes are relatively minor and could be done during the 0.9.x or 1.x development cycle, whereas a building a proper animation editor would warrant a major development cycle for itself.

blurymind commented 9 years ago

Some features to compliment layers as animation feature:

The approach noted by callaa is spot on and it might work great!! I want to add some complimenting features to it:

-in this case having "solo" layer mode have "onion skinning" would be a must have :) --colorizing in red previous and in blue next layers of onion skin (similar to pencil2d) --setting onion skin range (1-5) --setting onion skin forward,backward and both

-Having layer folders and cycling between layer folders and/or top of hierarchy layers - would allow the artists to at least separate sketch layer, ink and color layer of each frame. Working non destructively and not on a single layer per frame!

-setting playback speed- frames per second (framerate)- for playback and exporting

-gmic colorize plugin will greatly speed up frame coloring! (already requested) -line smoothing brush mode will help with inking greatly (already requested)

callaa commented 9 years ago

Good ideas. I just committed the implementation for the LayerCopy command, which is the only protocol change needed. I'll probably implement most of the features during the next release or two, but with LayerCopy out of the way, this feature can be worked on even during 1.x.

Layer hierarchy is something I'm going to leave for later, though, since it requires rather extensive protocol changes, which is something I don't want to do before the big refactoring I've planned for 2.0.

blurymind commented 9 years ago

I think that if you want to use the layers data to animate, you will have to create an alternative way to edit/manage the layers in Drawpile.

A new X-sheet dock is needed to address the animation workflow!

I put down some time to create a proposal design and a mockup. Please let me know what you think and if some stuff in there is unclear. :) Click for full screen.

xsheetindrawpile

key pose drawings can occupy frame ranges. So When you extend a drawing to occupy three frames instead of one, the x-sheet dock technically creates two new copies/clones of that layer above or bellow it (depending on which of the two arrows the user dragged)

note for the mockup proposal: a frame that doesnt contain a drawing yet could be just the number of the frame, but color coded.. or it could be a symbol [-] or [0] or something.

The ability to scribble annotations is very very nice, but not a must have- considering it would be complicated to implement and sync between users.

Copying and pasting+insert drawings could be done with the right click menu. Deleting a drawing should move all the drawings bellow it upwards- filling its spot, so as not to have a missing drawing in its place. moving a drawing in the x-sheet could be done by just dragging it.

On having this x-sheet layer manager in Drawpile: It would greatly extend your userbase for sure. Right now there is no stable/feature rich multiplatform open source animation software out there- for traditional animation. Not one! Pencil2d is a mess at the moment. Hard to compile, buggy, missing basic features mess. Not one of them has real time collaborative features either- even the professional ones.

So drawpile has a shot here to be truly a pioneer.

blurymind commented 9 years ago

A note on length of animation being limited:

In most cases of classic animation- it is being animated on twos (12 frames per second or even less). So 255 frames = 21 seconds of animation.

This is more than enough for a shot in a scene. When there is a collaboration on a shot between animators- this is more than enough. If you wanna work on another shot, just join another session.

An animated walk cycle requires 8 frames usually. so Drawpile could also be used for collaborative animation of sprites for games. :)

The only annoyance for me would be the inability to have a frame with multiple layers. and no way to set a layer to be independent (ignored by) the x-sheet - we need that to set a layer for the background/layout of the shot.

So for now I say- lets aim at the lowest hanging fruits - things drawpile could do:

blurymind commented 9 years ago

another idea for the implementation: If you add the ability to attach metadata to layers, you might be able to tell drawpile to treat some of the existing layers as animation frames, others - as a background element that is not affected by the x-sheet.

Taking it way further: -instead of duplicating a layer to hold a drawing longer, drawpile could have a variable for time length (for how many frames should I keep this layer drawing) attached to the layer. This would greatly increase how long the animations could be in it. A layer could contain the metadata of time range in which it exists - instead of being duplicated by the software a bazillion times.

-Another metadata attached to the layer could tell the x-sheet to treat it as a background element that is behind the animation.

-if variables in layers tell the x-sheet when to play layers and for how long, then managing your animation with the x-sheet doesnt have to move the layers around in the layer docker.

-best of all you can make both the layer and the x-sheet dockers useful for the animation pipeline. A tag attached to layers could tell the Layer docker to not show all of it's frames

path10320

callaa commented 9 years ago

I added a new wiki page documenting the upcoming animation features.

blurymind commented 9 years ago

This is an awesome start!! :) I really wish we could keep the current layer dialog design as it currently is - without cluttering it with animation features. Thus why I proposed a separate x-sheet dialog to manage layers in an animation mode. Layer tagging to show all the layers of a sequence as one entry in the layers dialog. Double clicking it cloud switch the layer dialog to the X-sheet dialog automatically.

I am still very happy that it is on the map- so whatever design you go with - being able to collaborate with others to do an animated sequence would be an amazing new feature. I dont know any other single animation software that does that at the moment. Or has done it ever.

it is also worth noting that there is no other open source flipbook style animation software with drawpile's drawing features. Pencil2d is unstable at the moment and hard to compile - its brush engine is super basic.

callaa commented 9 years ago

Yes, for complicated animations having the separate x-sheet feature would be better than jamming everything into the layer dock. But, since that would require protocol changes, I'm leaving it for until after 2.0, if its going to be implemented.

After the basic features are done, we'll see if Drawpile is suitable for animation work in practice and hopefully feedback from real world use will guide the development of the more advanced features.

blurymind commented 9 years ago

I do animation and know a few traditional animators that would be quite interested to try it. :) Cant wait.

Thank you so much for developing drawpile. It's such a gift to the community.

blurymind commented 9 years ago

In solo layer view mode - it would be good if we disable the checkerboard drawing for alpha channel. Its hard to see

callaa commented 9 years ago

I think I'll add a setting to choose between the checkerboard background or a solid color. Another option might be to always draw the bottom-most layer, even in Solo mode. (Perhaps Solo+Bg mode?)

blurymind commented 9 years ago

The second option would be more useful to animators :)

callaa commented 9 years ago

Some progress :) Onionskin view mode is now implemented (though the view depth is not yet configurable), as is the animation exporter. The same exporter is used for recordings and layer based animations, so future improvements will benefit both. Now the only major thing missing from the basics is the flipbook/animation preview window.

blurymind commented 9 years ago

You are made of awesome! :) Onion skin is a very very important part of the workflow. The basic foundations for flipbook style animation are almost there.

Its very cool that under the hood drawpile already has code that will be useful for animation as well.

callaa commented 9 years ago

The flipbook window is now implemented. Also, I added support for opening animated GIFs (or any animated image format supported by Qt) so each frame is loaded into a layer. GIF export still needs to be done though.

blurymind commented 9 years ago

I am getting tempted to grab it from github. Cant wait for the next release :D

blurymind commented 9 years ago

I grabbed a copy from github! :)

It is awesome!!! I know its not finished. here are some suggestions:

In onion skin mode or any of the other animation layer modes:

-it should reduce previous frame opacity depending on how far behind the currently active frame is. Right now it seems to be setting the same opacity to all previous frames. Perhaps more noticeable difference in opacity between frames can help figure out how far a frame is behind the current one. -it would be nice if it colored in a red tint previous frames and in a blue one frames after the active one.

example:

001onionskin

-GUI: hide layer modes (normal,multiply,etc) list, as it doesnt do anything when in animation modes -GUI: Hide layer opacity slider or re-purpose it to do something else -Add shortcut keyboard keys to flip between layers -Add shortcut to quickly toggle onion skin on/off when in solo mode. -Option to control how many previous and how many forward frames to show in onion skin. pencil2d has a fairly decent onion skin too in recent builds- but it tints the entire screen for some reason - not only the previous and foreward frames.

On the Flipbook player: It is awesome and works really well!! I found it a bit difficult to get to the play button when the canvas is too big - it was outside the screen. I couldnt resize its window. But I got to it by moving it when holding alt key. -I wish I could have the main canvas window play the animation, so its faster to test it out so far- but i guess that will need refactoring and is further down.

On the export animation window: instead of "Image series" it could say "Image sequence". It's how they tend to call it in other animation software.

blurymind commented 9 years ago

btw, here is a script to build it from github - for Arch linux users: https://aur.archlinux.org/packages/drawpile-git/

I made it for anyone who wants to test out the bleeding edge :)

callaa commented 9 years ago

Currently, the opacity falloff is linear. A cubic falloff might look better though. Here's a comparison:

onionskin_falloff

The picture on the left is how it works now: each layer's opacity is reduced by the same amount. On the right, the opacity of reduction increases the further the layer is from the selection.

I'll have to think about the color tinting mode. Unlike the opacity adjustment, there is no pre-existing functionality that could be adapted, so implementing it (in a non-hackish way) is a bit more work. I do have an idea how it might work under the hood, which might later be expanded into a general purpose layer effects feature.

I will not change the layer controls yet, since then I would have to create separate modes for animation and still image editing. If the animation use cases becomes popular enough to warrant the extra effort, I'll implement the x-sheet layer organizer.

blurymind commented 9 years ago

The cubic falloff (on the right) does look much much better. It is easier to work with.

blurymind commented 9 years ago

It would be great of there is a quick keyboard shortcut that opens the flipbook window and plays it automatically. Maybe by default when the flipbook window is opened, it starts playing the animation automatically!

Keep in mind that an animator with have to constantly check the stuff by playing it. The less steps to getting that preview running, the better.

blurymind commented 9 years ago

another suggestion - to make it easier to add inbetween frames: When creating a new layer (when in any of the animation view modes), create the new layer above the currently selected layer. You can alternatively do it via a new command called "insert new layer above current" if that is a better design for you.

Drawing inbetweens and breakdowns is very important for a walk cycle for example. Right now you have to create a new layer and drag it down in order to use it as an inbetween.

Also onion skinning of frames that are ahead of the currently active one will help a lot too .

This is getting extremely awesome so far. Thank you for adding these!!

blurymind commented 9 years ago

Tried the newest from github. Now you can resize the flipbook window, but the image gets squashed irregularly

screenshot_2015-04-16_09-31-42

callaa commented 9 years ago

Whoops! Looks like I forgot the aspect ratio flag. The onionskin above/below layer counts are now configurable and the color tint mode is implemented.

callaa commented 9 years ago

I added an "insert layer" action to the layer context menu. I also took the opportunity to do some refactoring here and merged the LayerCreate and LayerCopy commands into a single more versatile command, so layer insertion can now be done with just one command, rather than add layer + reorder. (This is, unfortunately, a protocol compatibility breaking change.)

blurymind commented 9 years ago

I am just playing with it as we speak!! This is absolutely fantastic :)

It's incredible how quickly you add these features. Other open source animation software developers take months. You whip them up in the matter of days!

The bit about the protocol is unfortunate, but I guess you have to break some eggs to make an amazing omelette :)

Ok, continuing with the suggestions:

One suggestion I could make on the without-BG modes is to add the ability to over ride the alpha checkerboard also to the animation settings (for the canvas window). You already have it at the export settings. screenshot_2015-04-17_14-48-31

blurymind commented 9 years ago
blurymind commented 9 years ago

On the "Onion skin + BG" and the "Solo+BG" view options, I can already disable the Visibility of the BG by toggling it's layer visibility off: screenshot_2015-04-17_15-06-52

So perhaps you dont need to have "Onion skin (without bg)" and "Solo (without bg)" options. Only the ability to tell Drawpile which is the starting layer and which is the ending layer at the flipbook window and the animation preferences window. From there on it could just treat layers bellow the starting layer as BG layers.

just an idea :)

If you want to further make use of the Layer visibility toggles - for simplifying the workflow- you can just tell drawpile not to use a background layer when exporting and when previewing when that background layer's visibility is toggled off by the user.

callaa commented 9 years ago

Some more changes:

blurymind commented 9 years ago

Nice work! It is now a much cleaner implementation! :)

blurymind commented 9 years ago

I think this is ready now to be used for simple animation loops (video game sprites) and also for pencil tests where there is no dialogue.

For acting type animation you would need to be able to attach a sound waveform to the layers dialog and have it play in the flipbook window. That sound waveform preview in the layers or x-sheet is required in order to see where to put keyframes with specific syllables/actions: layerswaveform One thing that adds complication to it is that it's vertical scale is being affected by the frames per second value.

Sites like 11 second club could potentially fall in love with drawpile if we had the sound feature. http://www.11secondclub.com/ Not sure how it would work with the network protocol though. The users could load the waveform locally themselves.

Maybe that could be added later on - in a future x-sheet dialog. You already have an incredible 1st animation version shaped up that is already pretty useful!

So congratulations on that. Beautiful work!

blurymind commented 9 years ago

Some nice extra features to have:

blurymind commented 9 years ago

One way to be able to sketch, clean up and ink a drawing without the need to use multiple layers: tvpaintrgbpanelsketch

I made a feature request here: https://github.com/callaa/Drawpile/issues/191 - clean up Pencil sketch layer command (moved it out to another issue entry)

This will be very beneficial to the one layer sketch animation design that drawpile will have for what I assume is a long time. We need a way to clean up the animation and this is the simplest solution. Its always a sketch at the start. :) If you want drawpile to be able to make more polished results this is the way to go imo.

blurymind commented 9 years ago

"select layer bellow" and "select layer above" should be renamed to "next frame" and "previous frame". Right now it is very hidden from the animators as a feature and it shouldnt. Make the command available somewhere in the menus, not only at the shortcuts - so as to communicate to the user of its existance.

Default keyboard shortcut to go to previous/next frame: Since the right hand is holding the stylus, and the animator tends to flip back and forth a lot between frames, it is best to have the flipping happen with the left hand. So keys on the left hand side of the keyboard are preferable.

I have mine set to shift+z = go to previous frame shift+x = go to next frame shift+space = open flipbook window space= play flipbook window

It would be better if the flipbook window could be set to start playing automatically when you open it and close automatically when you click on drawpile's drawing area. It must be super fast and easy to open,play and close when no longer needed.

Remember that when animating, you would be doing these things over and over again. Animators who try drawpile need to feel right at home. Right now go to next and previous frame commands are not easy to discover because of their name and because they are not available in the menus, and because they dont have any keys set to them by default.

blurymind commented 9 years ago

Another low hanging fruit usability improvement suggestion: When creating new layers in solo/onion skin mode, have drawpile automatically name them "Frame <# of the frame>" instead of "Layer <# of the layer>".

Currently the # (number) of the layer does not even correspond to the number of the frame that it represents when you open the flipbook.

The animation features are very hidden at the moment. I would put a play button somewhere that opens up the flipbook and plays the frames. Just so as to have people notice that drawpile can do that!

Right now if i have to list animation related features in terms of importance of having a basic workflow, these are the most important that are missing:

  1. A simple way to do passes/clean up drawings - #191
  2. A way to insert an empty layer above the currently selected one (insert inbetween) (could be automatically named to "frame <# of previous frame> / <# of next frame>")

3,4.. An amazing bucket tool - either via gmic https://github.com/callaa/Drawpile/issues/178 (which already has tvpaint's lazybrush) or something else https://github.com/callaa/Drawpile/issues/189 When you need to color many frames, having a really good bucket tool is essential. This can however be done in external software. It's just more beneficial to do in drawpile, because of drawpile's collaborative nature. That way you can have three or more people working on an animation. One cleaning up the rough pass, another drawing inbetweens and a third and even fourth coloring the frames! :D

callaa commented 9 years ago

I added the layer up/down shortcuts to the menu (tools->shortcuts submenu. Not really optimal, but it was the best place without creating new menus) The shortcuts actually do have default hotkeys: ctrl+up and down. Being able to operate them with just one hand is a good idea though, so I changed them to shift+z and shift+x, as you suggested.

Regarding the naming, since frames are not a first class concept in Drawpile, I don't want to call layers frames.

I changed the flipbook dialog to autoplay when shown. Space bar is already used for dragging and rotating, so I don't want to overload it any further by default. When the flipbook is open, the play button is highlighted by default, so there space bar will toggle play/pause.

Regarding the layer numbers, the numbers should match up with the frames as long as "Layer 1" is the name of the first frame. Of course, they will quickly go out of sync when layers are inserted or shuffled. When treating layers as frames, layer names don't really make much sense anyway, so perhaps an option to show the layer numbers instead would work better?

Layer insertion is already implemented: right click on a layer and there is a "Insert layer" command which adds a new one above it.

Bucket tool improvements will probably have to wait until after 2.0. Although technically since floodfill results are transmitted as a bitmap, it could be done during the protocol freeze stage of 1.x, but I have no idea how the algorithm in #189 works.

blurymind commented 9 years ago

Thank you for adding the changes :)

regarding layer naming - you are right. It would be a better solution if drawpile displayed the frame numbers next to their names, or only display numbers instead of names while in onion skin mode or as an option. It's just a nice usability tweak :)

On the bucket tool - the algorithm in #189 is not open source. We have a better chance of getting this feature from gmic, but thats probably not easy to implement.

callaa commented 9 years ago

I added an option to show layer numbers instead of titles. The number starts from zero, so assuming a background layer is used the first layer is number 1.

I think that's about all the features I'm going to implement before 2.0, so I'm closing this issue. New issues can of course be opened for specific animation related features :)

Also, here's something to keep an eye on: http://www.freedesktop.org/wiki/Specifications/OpenRaster/Draft/MultiplePages/ http://www.freedesktop.org/wiki/Specifications/OpenRaster/Draft/Animation/

One of Krita's kickstarter goals was animation features, so they will be extending the OpenRaster file format to add animation support. Multipage documents seem like the right way to implement frames and the x-sheet docker could be used to manage the pages.

blurymind commented 9 years ago

thank you for the work so far! :)

I will keep an eye on 2.0's progress and Krita as well.

But krita is not collaborative like drawpile. It is still at the moment the only collaborative software that can do animation!

blurymind commented 9 years ago

The "show numbers" feature does not seem to work for me. It's not acting as a tickbox (enable/disable) and its not showing numbers.

There might be a regression here: The layer names are gone for some reason. The only way to see the layer's name is to double clicking on it. screenshot_2015-06-25_21-56-34

I however found that deleting drawpile's old config file solves these issues above. The feature works as expected, but I think that it can be done more elegantly and usefully.

Why not just show the layer numbers next to their names - as a prefix. And only show them when the user is in solo or onion skin mode (thus animating). I dont think that you need to have it as toggle entry in the layer menu that changes name when 99% of the time you would want the numbers while animating.

That way you can name your drawings, while being able to also see at what frame they are. You also remove the need to manually do a mandatory step in the workflow - the software can automatically guess when you need to see frame numbers and shouldnt make you enable them manually. You also get one item less in the layers menu - less clutter.

callaa commented 9 years ago

Ah, you're right. Looks like the mode selection isn't restored correctly from saved settings.

Prefixing the layer names with the number might be a better way, indeed. I made it toggle between the title and number because I thought it might look confusing with the default naming scheme with the layer numbers at the end.

I prefer the explicit toggle, since some users might like to see the numbers even when not doing animations.

blurymind commented 9 years ago

Maybe add an "always show layer numbers" toggle in the "view" menu or in preferences? :)

I would love to have them both visible, number-name when animating. That would allow me to mark some of the drawings as key poses.

It makes more sense to me to show the number of layers (frames) only while animating. Drawpile already automatically names new layers to numbers.

callaa commented 9 years ago

I changed the command into a checkable menu item that toggles whether the titles are prefixed with the index numbers.

blurymind commented 9 years ago

sweet! Thank you :)