mriale / PyDPainter

A usable pixel art paint program written in Python
GNU General Public License v3.0
544 stars 26 forks source link

Add layer functionality #107

Open mriale opened 8 months ago

mriale commented 8 months ago

Add functionality for multiple layers. This could be implemented as multiple spare pages or animation frames that could be composited on top of each other. Maybe to save these images the layers could be written as a GIF animation. That would make it compatible with GIMP's loading of animated GIFs as multiple layers. Also, the frame delays could be made zero so that the GIF renders in a viewer as composited.

WayneAshworth commented 8 months ago

I have never posted on Github before, so I am unsure of etiquette. Please forgive any faux pas

The layer function would be incredible. It would help me enormously (not a primary concern I know!). I currently have a work around by using around 10/20 animation frames as extra pages to work on. I'm so excited I can't type hah :) Aseprite handles it very well and I think you could use that for inspiration for sure, I have attached a screenshot. I never got on with Aseprite (or any of the other programs out there). Building it into PyDPainter would be a dream come true.

Currently I have several programs that I use for pixel art, mainly Deluxepaint but there's only so much it can do. If you're somehow able to include layers (with some extra functionality in there too like perhaps colour overlay as in Photoshop) then I think PyDPainter has the potential to be my one-stop shop for pixel art.

I think if you were able to do some of the colour reduction techniques as found in Retro Image Tool (I made a video on that here: https://www.youtube.com/watch?v=97Z2ByHaSbY&ab_channel=WayneAshworth) that would be an enormous help for people to create custom wallpapers for Workbench also.

The potential in this program of yours is enormous and I am so excited. :D :D

aseprite

mriale commented 8 months ago

@WayneAshworth I welcome any comments here. I'll take a look at your video when I have time. I want to add an onionskin preview for backgrounds and animation (mentioned in #84) and that could be used for layers if I made the onionskin render at 100%. But the problem would be if people wanted both animation and layers. Do you need or want layers with animation?

WayneAshworth commented 8 months ago

That's an excellent point. I seem to remember the creator of Aseprite having the same dilemma. I have to be honest, I personally would love layers...

mriale commented 8 months ago

@WayneAshworth After watching your video about color reduction with Retro Image Tool, I'm not sure I want to take PyDPainter there for now. It does a simple color reduction and no dithering currently. A new project that does some amazing pixel art conversion is RetroPaint.

WayneAshworth commented 8 months ago

Ahh, understandable :)

Thanks for the heads up on Retropaint! I haven't heard of that one! :D

WayneAshworth commented 8 months ago

I have been thinking about this whole layers/anim balance thing. I was wondering, could layers only be active/edited on the Spare screen whilst anim is active on the main screen? Without knowing programming I am not sure if that would even be possible, but I was thinking about it a lot and thought I would suggest it.

mriale commented 8 months ago

That's a good idea, and I might generalize it a bit more: I could make multiple spare screens, any of which could be either an animation or a stack of layers. I could handle it as multiple projects open at once. We'll have to see where this goes after the animation features are nailed down.

mriale commented 1 month ago

Layer GUI prototype: image.png

Sleuthgame commented 1 month ago

That's a lot of toobars ! Toolbars everywhere. Drawing became difficult. F10 hiding bar cycles is not enough. So now, you need to put them OUTSIDE the drawing zone.

And have to think how to SAVE all this, as a project ?

WayneAshworth commented 1 month ago

Layer GUI prototype: image.png

That looks amazing!

Will there be a keyboard shortcut to help that toolbar disappear? I am loving the progress made on this! Keep up the fantastic work!

mriale commented 1 month ago

Issue #116 is to move the toolbars outside the drawing area.

I think it's technically feasible for layers to be saved individually in a GIF and even be animated. It should show properly in any GIF viewer as well. I have some ideas about how to make that work.