Transparency for imported bitmaps (ie png)

workflow

#1

hi all

First time on here. I’ve been putting Pencil2D through the paces on my Linux Mint box the last 24 hours or so; there are a lot of good features and potential here and I’m excited to get down to using it, but there’s one feature that I’ve wracked my mind over with no success…for some reason, Pencil2D does not seem to recognize any form of transparency in black and white (ie not grayscale) imported images or image sequences. I’ve tried everything I can think of–different image formats (png at least loads, P2D doesn’t seem to like tifs and bmps), converting so as to explicitly save transparency, exporting an P2D image sequence as png image sequence with transparency checked…I can’t believe it could be that difficult to import images so as to behave like traditional animation cels, you know, black lines on a clear background. It seems like if not for that ugly white background, P2D would make for a fine simple ink & paint workflow on scanned drawings. Is there something I’m missing or is this a no-go? I apprecite any help you all can provide.

cheers

Billy S.


#2

@moogyboy041017 Hi William, welcome to the forum! Hmm After having read your explanation I’m afraid to say I might not be understanding what the problem is exactly.

I’ve repeatedly attempted to import a PNG image with both pure black and pure white text over a transparent background and so far Pencil2D respected the alpha channel on the latest version of the software.

So i’ll have to make the obligatory question. Which version of Pencil2D are you using? You can learn about this by going to Help > About (if it doesn’t say anything then it’s really old)

If you, by any chance, are using debian repositories please do try the Appimages we have of the latest development version which you can find here:

https://drive.google.com/drive/folders/0BxdcdOiOmg-CcU1WOFpCOFBvVXc

It’s importnat to organize by modification date and get pencil2d-linux-2017-09-23.AppImage

On the other hand, it is true that Pencil2D Import and Export formats is somewhat limited since there’s but a few volunteers helping with the development, so right now PNG is you best bet for preserving alpha transparency.

If after getting the latest dev version you still experience this issue please let us know as this may be a Linux related bug.

On a last note, please bear in mind that Pencil2D always has a transparent background activated. The white canvas you might see is actually a color model representation, this means you can change the background to a “transparent” representation to accurately see your alpha channel whenever needed. You can change this by going to Edit > Preferences > General > Background > first checker option.

Also note that there is a system at play that I call “relative layer transparency” which makes any layer you select opaque while the rest of layers become slightly transparent to allow for easier work (as if you had semi-translucent animation paper). The only way to preview correct transparency of the canvas contents is by selecting the “camera layer”


#3

Hi Jose

Thanks for your reply. As it turns out the issue is not with P2D as such, but rather that I needed an extra bit of software to add a transparency to my scans. After digging around I found a batch converter called Phatch to do the job. Will keep at it and post back with my results.

It would be a very nice feature to be able to add the transparency alpha channel directly within P2D itself but I understand that you guys haver limited time and resources, so just putting that out there.

To answer your obligatory question, yes I’m using the most current nightly build, running on Linux Mint 18.2.

cheers

Billy S.


#4

Here are the links to Phatch, btw:

http://photobatch.wikidot.com/
https://pkgs.org/download/phatch
https://pkgs.org/download/phatch-cli (required to install above)

cheers

Billy S.


#5

@moogyboy041017 Interesting. I see now, so you’re trying to batch scan. For my tests I used GIMP to create the transparent picture inside the program first. I know GIMP has scan features as well, although I’m not sure if it supports batches (maybe with scriptFU /pyplugs /plug-ins ?)

External device capture would be indeed a very interesting and needed feature, even if we could use it as a pencil test device. I’ll add that to the feature list here https://github.com/pencil2d/pencil/issues/540.

For now i’m afraid that since capturing from an external device and scanning with an alpha channel matte wasn’t even in the plans it might take a while to sort it out in the priorities, but hopefully it can be implemented in the future.

Also thank you for the links! Hopefully someone else find them as useful as you certainly did. Have a happy weekend :slight_smile:


#6

hiya Jose

I think I’ve figured out and assembled a workflow that tentatively does what I want it to for the time being. I’ve made up a simple test animation which I’ve also posted to the appropriate forum, but here it is for your amusement. :slight_smile: I’ve included details in the video description.

cheers

Billy S.


#7

@moogyboy041017 Hey that’s nice! Has a nice timing and believable weight :slight_smile: Hope to see more, and we hope that P2D can improve for the better to help out on these tasks!