How does mypaint work?


#1

Heya.

I’m doing a little research into the inner workings of various art programs, and have found a general lack of resources… aside, from, y’know, the code itself… which is far too big a task for me atm. So, I was wondering–how does mypaint work? What makes it unique? (I’m interested more in higher-level abstractions that “…and then the computer pushes pixels into a buffer…”)

Or, alternatively, how can I improve my search-fu such that I get results?

Thanks for any insights!


#2

There are a few things that makes MyPaint special in my opinion.

  1. It’s free in every sense of the word.

  2. Its brush engine which is based on oval dabs. There are about 400 parameters you can change in each brush. Unfortunately I don’t think the parameters are documented anywhere, so it’s a bit of hit and miss if you want to make brushes of your own. For the most part the predefined brush sets will cover all you need.
    I think the brush engine is a lot faster than other graphics software out there.

  3. Infinite canvas. You will never run out of space to draw on.

  4. It’s bare bones. Opinions are divided on whether it’s clean or austere. Features are being added, but the pace is rather slow.


#3

Snazzy! Thank you!

Is there an academic (or technical) term for “oval dabs” I can look up?


#4

Not that I know of. But it’s just filled ovals. They can vary in a number of ways such as size, opacity, how fuzzy their edges are, how close they are, how random their position is etc etc.


#5

Thank you!

One last question for you, I think. How does MyPaint handle undoing?


#6

I don’t think there is any undo history panel, but you can undo about 20 steps or so.

Z to undo
Y to redo

These shortcuts are about to be changed in the near future. You can read that discussion here: Establish Default Keyboard Shortcuts


#7

I don’t know why, but mypaint have great performace. I remember that on windows 7 i could open big png only with mypaint within 1 min, when other programs forced me to reboot.


#8

The best way to see how MyPaint is different is to try it out for yourself. I have used various programs: Photoshop, Paint Tool Sai, Clip Studio, Krita, etc. and each has it’s own feel. What impressed me about MyPaint is the built in brushes. They mimic the texture and blending of traditional media which is something that a lack of programs lack from the get go. Depending on the type of art you do, different features and feelings will appeal to you.


#9

MyPaint handles undo the same as any other program, really. We store “Command” (memento pattern) objects in a stack in memory, and trim the length of the stack when it might be growing too big.

The trick is to only store changes, so the command representing a snippet of painting makes a snapshot of its target layer before and after, and only stores changed tiles.


#10

A big thing that makes MyPaint unique is the “strokemap”. Each layer stores the shape of each stroke that went into it along with the settings that made that stroke. You can pluck old brushstrokes off the canvas with the W key and continue painting with those old settings. :art:

One day we might lift that plucked stroke to the top and allow you to change its shape with the inking tool. But that’s going to require a lot of thought about how the repainting would work :thinking:

For now I still want to tailor MyPaint for flow, i.e. the in-the-moment experience of painting. Too many features for tweaking and twiddling your artwork can detract from that, so new features tend to be added fairly judiciously.


#11

Snazzy! Thank you. :slight_smile: