Procreate brush import plugin prototype

Hi!
Realized that it would be best to post this here. I haven’t done any python in forever, so bare with me lol
I have this little research doc about procreate’s brush engine functions and all of the specifics needed to read the brush.archive files;
basically, Procreate’s .brushset/.brush files are archive files. Within them rests a png file of the: preview, brushtip, texture, author picture, author’s signature. Then, each brush is a bunch of data written to a bplist file named Brush.archive, nested within the separate brush’s folder.

The brush.archive file is not that hard to read, and I’ve roughly written down everything in a doc. I’m confident enough in it to start working on the plugin, while I finish writing down all the needed data.
The research was done on free Procreate brushpacks available on Gumroad and Procreate forums, and packs bought solely by me. There’s no data shared in the doc that would compromise the original licensing they were sold to me with.

To sum it up, I think it’s fully possible to import .brushsets to Krita, making new folk moving from iPads have an easier time moving! The problem is, I don’t know how I should go about writing the plugin :melting_face:.

The first rough draft will be uploaded here when I stop having such a horrid fever.

Please let me know if you have any feedback, especially when it comes to a better experience of porting, like a more intuitive GUI or any other changes. If you’d like to take a peek at the doc, I can send it as an attachment, but it’s all only on Notion at the moment. However, I can export it as a pdf / MD / html!

I also know this is a pretty fast pace from my last post about this, but ever since yet another Apple Pencil of mine broke, I’ve had it and I’m no longer gonna spend money on Apple :face_holding_back_tears:

Posting this in development since this is for now still more of a concept, rather than something I’d feel comfortable releasing out into the open for people to use at this time.
Sorry for the super long post! I want to condense as much info as I can here.

13 Likes

Really, this is one of the things that I’m waiting to see in Krita. :grinning:
I will wait for the plugin to be completed.

Tnx a lot for your doing hard work on it my prayer is always with you. :innocent:


K.A.B.H.

1 Like

Let me understand this Brush import only extracts the Brushtip right?

1 Like

Extracts the brushtip & texture, and then reads & applies options to be as close to the original as possible in Krita’s pixel brush engine.
I know how to read the options contained in Procreate’s brushes.

I wonder if the brush engines are even similar enough to get the same results with the same settings in both programs. This is one of the things that prevents PS brush presets to be imported in a useful way.

I’ve tested things a little bit and will have to do a bit more testing on brushes that have eg. moving textures, or textures that scale with the brush size. The effect isn’t completely 100% the same, of course, but I’ve tested some pencils (while my AP2 was still working) with no texture scale differences/no moving textures, and things were looking quite neat.

My only problem is that since my Apple Pencil died, I can’t really preview the strokes as you usually would: just the finger. However, I’ll re-check some free packs from Gumroad, link them and their strokes in Procreate, and then show how they behave in Krita. It’s probably the best way to preview differences at the moment.

No preview for now just cause I’m genuinely too sick, but I want to start a discussion about this nonetheless! :purple_heart: Through the years I’ve become a big Krita shill so I’ll do everything in my power to make new artists trasferring to Krita as comfy as possible :sunglasses:

1 Like

I did some research into this myself a few months ago, and made some prototype Python scripts to convert the Procreate .brush and .brushset files into Krita .kpp files, but they’re extremely unfinished/broken. If it’s useful I could clean them up a bit and share them even in that state.
I don’t mean to be vague on details, I just don’t remember right now, I have to go back and check.

2 Likes

@freyalupen oh Gosh, that would be great actually! It’s always good to already have a base to work off of, so as long as you’re willing to share, I’d be super glad to check em out!

So this Plugin can be used for any brush, but the format would be ideal into KPP or Bundle files.
Because his idea of being converted into Kpp files would be interesting to see if both can work at the same time.

Because no many have Procreate app for triying to get the most closes brushes. If anyone wants to do that by Pc. Wich i am worried.

I was aiming for making .bundle files actually, so you’ll just have 1 Procreate brushset per 1 bundle; so you wouldn’t get lost in the .kpp’s and have to tag/bundle everything yourself.
I’m reading up a bit on Krita’s bundle format first, though, because I think it would work best if you could just drag&drop a folder (since .brushsets are zips) and output the bundle.

I’m mostly struggling with how would I work around duplicating the same brushtip/texture a bilion times, since Procreate doesn’t have management like that and every brush is completely separate from one another; and there’s no like, pattern library that you can put things into to reuse them in other brushes.

I’d prefer if there was as little manual work involved as possible, so no stuff like eg. renaming all the grain.png files on your own. It might be unavoidable but man, that sucks.

So far, the easiest part to get has been the simple real number sliders, so that’s something I suppose!

small edit: the UID graphs have also been pretty easy. Initially I had no idea what they’re referring to and was utterly confused to be honest, but now I kinda get it and things are starting to click into place. Writing everything down has not been 100% fun though, lol. The texture blend mode numbers for example don’t make any sense in my brain and I just have to go brush by brush to write down all the possibilities. It’s tedious as all hell but I sincerely hope this will keep pushing the project forward, one way or another.

1 Like

I don’t have much experience with coding, but I’ve completed many programming tasks involving AI.
Here is a similar project related to this topic that I created with Claude. It’s not a plugin but a simple Python script.
And please be kind that I didn’t test it yet due to my shortage of time.


K.A.B.H.

1 Like

Okay, so I know I said I’d share my scripts “as-is”, but I ended up working on them some more, so that’s why it took a few days. But now I’ve released them here: Freya Lupen / Procreate to Krita Brush Converter · GitLab

It’s an experimental set of command-line scripts written in standard Python that’s capable of converting some settings from Procreate .brush and .brushsets into Krita .kpp and .bundles. The scripts are quite unfinished and the resulting brush presets are quite broken, but it’s enough to go off of. There’s also functions to dump the raw brush settings of both the .brush and .kpp files into text files for examining them. More details are in the readme.

5 Likes

Bless your kind soul! I’ll get to work as soon as I am physically able to, and will share what I’ve found about the bplist settings with 100% certainty (meaning some integer values/etc. are not complete and are just rough notes I took while examining different brushes from my sets).

@freyalupen , I think I got two main things!
image
I’m slowly connecting the dots between which brushtips corelate to the data contained within, and I’ll try to recreate them. Perhaps it would be best if I later bundle them with the pyscripts, so they can get copied and bundled within krita’s bundles.

This is the doc with all the stuff I found so far. Apologies for all the typos and whatnot, I wan’t very lucid writing this :kiki_sweat_smile: I am only able to start cleaning this doc up now. I’m slowly getting to understanding the bundledGrain/ShapePath, since most likely I’ll have to do a bit of GMIC magic to get similar textures and brushtips. Straight up ripping them doesn’t seem like a good idea.
image
Like here, the names are right there so like I said – adding the Procreate “defaults” from some edited texture work and tests, then copying them to bundle with the right brush, might be the best course of action, since I can’t for the life of me find where they sourced them from.

DOUBLE EDIT:
On God, you’ve saved me hours upon hours of work. I can’t thank you enough. Gonna sit down and try to fix up the scripts, but I’m at loss of words I’m so happy :kiki_love:

So we have to wait until you add or giving the final details for the script for this Procreate plugin brush?, because i saw a good example wich set we can use for free.
In my opinion i would like to suggest this ones :pray:

CRISP Pencil Pack by COFE | Procreate
CRISP Pencil Pack by COFE

Its says in the post its a free set so they dont would be an issue at all.

It’s ok, I have some things in mind! Unfortunately I’m still very sick (but now on antibiotics, finally), so you’ll just have to wait a bit more. I’m trying to do a workaround for the missing brush tips/textures that are in Procreate’s default library, since I don’t think I can just rip them without legality issues. So I’m simply recreating them by hand and/or using CC-0 / CC-BY(-SA) materials available to me.

The scripts unfortunately don’t work on my end right out of the box, but I’m working around that too (so far I only tested Win11 so that might be a part of the problem). Freya has tremendously reduced the workload I would have to deal with by doing all of this myself, and I genuinely can’t express my thanks well enough.

All in all, the most cumbersome part is the default library recreation imho… it will take some time for me to re-build it.

Whoops, I forgot I wasn’t using Qt with its magic filepath handling where everything can use /. I pushed two commits which should fix it to work on Windows (as well as one to lower the Python version requirement so it works on 3.10). If there’s any other problems with my scripts let me know and I’d be happy to look into it.

About Procreate’s default Source Library, if I had to guess it’s probably in the application file itself. No idea if it’s possible to extract them or what kind of license they’re under. But Krita’s default resources may be an okay substitute for some of them, it would be possible to make a list of those and add an option to the script to redirect the embedded filename to those. (It would make testing the output brushes a lot easier.)

2 Likes

That’s kind of what I’m going for!
Some of the default resources I have to check the names of & just match them with the diy equivalent. The default papers are less troubling than the more specific tree bark/patterns/etc., same goes for the brush tips. The easier shapes I can easily make substitutes for, but the other ones are a mixed bag. I’m doing some tests on my end (without using scripts, just doing some basic tests in Procreate vs. Krita) and can safely say that about 5 brushtips + 3 textures have close enough vibes to the original while being… legally distinct enough :kiki_sweat_smile:

Thank you for the fix Freya!!! If I wasn’t poor as heck at the moment I’d give you a big fat tip for your work. Something to keep in mind for the future I suppose! :kiki_cool:

For the future I hope I can find some way to do the texture movement/zoom too… I have to say I miss these two greatly, much more so than the stabilization. Might be just me being a heavily textured workflow weirdo, but I still think it’d be useful to have — if not in the base, then maybe as a plugin, somehow. I’m so new to this that I have no idea but the very prospects are so exciting, I just can’t help but be hype!

To give a small update since it’s been a month and the repo’s still empty;
I’ve been sniffing around for a way to run the scripts with a gui [god bless pyqt, but coding on windows is heck and hell], and have to move to my arch laptop to do everything instead. For now I think it’s going to be best as a standalone instead of a plugin, so nothing ends up getting messed up.

Additionally, I’m almost done with porting the default resource library so I can release those under CC0 as an alternative. Found some other neat python scripts [ credited in the repo as of today! ] for bundling resources, which has also been absolutely wonderful & tremendously helped me to get back into python [ last time I did anything in python was when i was… 13? Maybe? ]

Tl;dr – this isn’t dead, I just want to make sure things run without throwing errors! :kiki_love: Or at least are stable enough where I can release them :kiki_sweat_smile:

4 Likes

I’ve updated my repo with a very basic GUI frontend for conversion, and Krita plugin functionality, for those who are allergic to the command line or don’t have Python installed or whatever, who want to test the scripts. It doesn’t have any of the testing features, like dumping settings or logging information from the conversion.

So it’s not all that useful, I just figured I might as well do it as a starting point.

6 Likes

I’ve never been more comforted by not knowing stuff and having someone help me out. I’m speechless [in the best way possible]

1 Like