A plugin that helps you to make pixel-art quicker. This uses
uses Krita's Python API
, PyQt5
and Python's built-in
modules
to make borders for your pixel-art characters.
Pixel Borders
performs several operations to make this task easier, and it works on paint layers and group layers, even if these have key-frames on the timeline.
- Introduction
- How to Use it
- Get the plugin!
- Enable it on Krita!
- System Requirements
- Social Media
- License
Sometimes, when I'm drawing a pixel-art animation, I try to add borders to the characters in the scene to get a nice videogame style. These look very nice but They're hard to do when There's a lot of key-frames and layers linked to a single character.
It takes over 3 hours to complete this effect manually on a small-sized animation. That's boring and error prone: I remember I had to make the effect from start when I forgot a single step on the frame 50 of an animation with 200 key frames on its timeline!
That was one of many reasons why I started this project. It was a simple
script at begining, but I wasn't satisfied with it: it was slow and
didn't work very well on animated layers, so I keep working on it,
fixing its flaws at first glance. Then I added a GUI
to use it in a
more comfortable way, also its core
was improved and...
The rest of this tale is on the commits of this repository.
- I just took that idea and made it comfortable to use. -
With Pixel Borders
you can add borders of 1px width, or make
a smoother one adding more steps into the border recipe. Maybe, you
could Add colors to the corners of a character or even make a kind
of fractal as a border.
Pixel Borders
has been developed among several months in my free time and now, It's finally available here!
No Borders | Borders | Recipe |
---|---|---|
any-neighbor:1 + corners:1 + any-neighbor:1 |
-
This plugin uses
Krita's Python API
and some facilities provided byPyQt5
package to perform its tasks, so there's no need to install anotherpython
package for Krita. -
Also, it's compatible with dark and light themes.
-
Undo actions are supported since
Krita 4.4.x
-
It includes some methods to make recipes for the new borders which can be used on the
quick mode
andcustom mode
:-
any-neighbor: The pixel becomes opaque when there's at least one opaque pixel next to it.
-
corners: The pixel becomes opaque if it has one vertical and one horizontal opaque neighbor.
-
force: same as
any-neighbor
but faster. -
not-corners: Complement of
corners
method. Useful to make rough borders. -
strict-horizontal: The pixel becomes opaque if it has only horizontal opaque neighbors.
-
strict-vertical: The pixel becomes opaque if it has only vertical opaque neighbors.
-
Method | Result |
---|---|
None |
|
any-neighbor |
|
corners |
|
not-corners |
|
strict-horizontal |
|
strict-vertical |
Play with the different results that can be obtained using
Pixel Borders
. See how quick this will be achieved with it.
Click the Use Previous recipe
button to repeat the last recipe used.
Yes, it works with them. Select the Group layer, and use this plugin just like a normal filter being used on a paint layer.
Yes, it works on regular animated layers and on group layers with animated layers inside.
Unfortunely, this doesn't work well with:
- Filter masks that modify the bounding box of their
parent layer
.
That's because these special layers doesn't provide any updated values
of their parent's bounding box. It will be necessary scan the whole canvas
to known exactly how that bound is, and it drops down the efficiency reached
by using the current pixel_borders.core
.
If the filter mask doesn't modify the bounds of its parent layer,
Pixel Border
will work fine with it.
In Krita:
- Click on
tools > Scripting > Pixel Borders
. - Write a name for the new Border.
- Choose the Foreground or the Background color currently used.
- Choose between the quick mode and the custom mode.
- Fill out the remaining information.
- Wait until The new border is done.
- Press Ok.
Select the method this plugin will use, then press the number next to it and set the width of the new border.
There will be a single method, click on it to select another and then press the number next to it and set the width.
Buttons | Description |
---|---|
Add |
Press to add a new method at bottom. |
Remove |
Press to remove the method at bottom. |
Clear |
Press to delete all the methods except the first one. |
It repeats the previous recipe, applying it on the current selected Layer. If that Layer has key-frames, it will make animated borders.
Name | How to do it |
---|---|
Classic Borders | Quick mode + any-neighbor:1 |
Smooth Borders | Custom mode + any-neighbor:1 + corners:1 + any-neighbor:1 |
Rough borders | Custom mode + any-neighbor:1 + not-corners:1 |
Fuzzy | Quick mode + not-corners:5 or greater |
Vertical explosion | Quick mode + strict-vertical:10 or greater |
Horizontal explosion | Quick mode + strict-horizontal:10 or greater |
Krita uses a specific folder to load its Plugins. It is
pykrita/
and it's in the folder~/.local/share/krita/
on Linux, and%appdata%\krita\
on Windows.
- Open a terminal.
- Go to your
pykrita/
folder. - Clone this repository (I recommend to use the lastest release).
git clone https://github.com/sGaps/pixel-borders.git pixel-borders/
- Copy the
.desktop
file frompykrita/pixel-borders/
topykrita/
.
cp pixel-borders/pixel-borders.desktop pixel-borders.desktop
- Go to the release snippet of this repository.
- Download the lastest compressed file (
.tar.gz
, or.zip
) - Extract the folder inside the
zip
(named pixel-borders*) to yourpykrita/
folder. - Rename the new folder as
pixel-borders
. - Copy the file
pixel-border.desktop
frompykrita/pixel-borders/
topykrita/
.
After following the previous steps, the folder hierarchy should look like this:
After Get the Plugin:
- Open Krita.
- Go to
Settings > Configure Krita > Python Plugin Manager
- Search the row
Pixel Borders by Gaps
on the list at right. - Check its box and restart Krita.
Minimum (tested) | Recomended |
---|---|
Krita 4.3.0 | Krita 4.4.x |
Python 3.6 | Python 3.9 |
PyQt5 5.12.x | PyQt5 5.15.x |
CPU RAM Krita HDD Speed Pentium IV + 1.7 GiB 4.3.0, 4.4.2 7200 RPM i3 * 2.0 GiB 4.4.2 5200 RPM
Detailed CPU Info + Intel Pentium IV 630 HT (3.0 Ghz) * Intel i3 380M (2.53 Ghz)
Gaps | sGaps | ArtGaps