How do you create a brush and erase with a hard edge

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.
User avatar

2018-08-30 08:43:53

I am trying to create a brush similar to one that is in the original Pixelmator called pencil, which is not in the pro version.

It has to have hard edges so the brush is solid/pure one colour, no soft edge.

I also would like to have the same for the erase.

The reason is that when I colour select a area I want to include all the colour pixels in one go not leave pixels out that have a soft edge.

Also the same with the erase when I am cleaning a shape I don't want it to leave/ create a soft edge.

As it is when I'm fill in colours with patterns it leaves a ghost edge of what every the original colour was between the patterns.

I hope this makes sense.

Cheers
Rob
User avatar

2018-09-01 16:27:14

Hi Rob123.

Pixelmator Pro seems to make an effort to anti-alias its basic brushes and doesn't (as far as I can think) have any hard-edged brushes built-in (other than the Pixel Paint tool). So:

Option 1: Add your own brush.
1. Create a small (say 10px × 10px) image.
2. Make the whole thing white. (edit: Nope. Make it black. White will crash 1.1.3)
3. Export it as a .png file
4. With the brush tool open, pick a brush, right-click on it and duplicate it.
5. Edit the duplicate.
6. In General, import your exported .png file as the Shape and ensure that there is nothing set as Grain. (unfortunately Pixelmator Pro 1.1.3 crashed on me at this point (your milage may vary), but I tried it in 1.1.4beta2 and it worked fine so I'm not going to bother logging that as a bug right now).
7. Play with other settings. For example in Shape, you may want to set the Initial direction as Fixed. You might also want to rename it.

Option 2: Use Masks and the Pixel Paint tool.
You can't use the pixel paint tool as an eraser so let's use masks instead.
1. Right click on the layer you want to edit and select Add Mask. You'll get a white square on the right of the layer (I recommend viewing the layers in list mode). White on the mask means opaque on the layer, black means transparent and shades of grey... well... you get the idea.
2. Ensure that the mask is selected rather than the layer.
3. Using the Pixel Paint tool (hidden under the paint tool), set it to 1px, and paint in black on the mask. Your image will be transparent where you paint. If you make a mistake, just paint over it with white*.
4. Either keep the mask or, if you're finished and you don't want it hanging around, right click on the layer and select Merge. The transparency supplied by the mask will be committed to the layer.

Hope this helps.

- Stef.
* Keystrokes D to reset the colours to a default black and white and X to switch between them will be useful here.
User avatar

2018-09-03 08:08:23

Hi Stef,

Thanks again.

Cheers
Rob
User avatar

2018-09-05 19:30:30

No worries, Rob. I'd like to change my instructions for creating a brush, though. When you create the .png file, don't fill it with white. Black works fine, but white will crash Pixelmator Pro 1.1.3 (fixed in 1.1.4 beta 2, bug report here: viewtopic.php?f=16&t=15880). I don't the brush cares what colour you use so anything that is 100% opaque should work fine.
User avatar

2018-10-19 23:29:40

Turns out there is a way to do this - when using the Pixel Paint tool, there is an "Eraser Mode" checkbox in the Pixel Paint settings. Enabling this makes the pixel paint tool erase with hard edges.

I did notice a small bug with this checkbox sometimes having the opposite effect of its current setting, so click it until it does what you expect, for now .
User avatar

2018-10-22 11:32:40

Yep, the Eraser Mode was added in the most recent update — glad to hear you've spotted it! We'll also take a look to see if we can repro the bug.
User avatar

2019-11-25 20:23:03

Are there any other shape options for this Eraser Mode? I'm working on an image that's black and white ONLY, no grey. Every drawing tool creates grey pixels at the edges and the only tool that doesn't only has one shape, a square. How can I edit a curved line any other way than pixel by pixel when the only shape the tool can take is a square?

Is there really no way to just turn off the anti-aliasing on the paint tools to achieve a hard edge?

As for creating a shape tool of my own, making a circle in Pixelmator Pro has the same problem, can't seem to do it without anti-aliasing or soft edges.

Any ideas?
User avatar

2019-11-26 09:15:30

At the moment, there isn't a way to completely turn off edge smoothing for the painting tools. One setting that will help a little is Smooth Textures and if you create your own brush, make sure that is turned off in the brush's settings. That reduces the number of partially transparent pixels significantly.

Having said that, this should be addressed in some way in the future — we'll see what we can do!