Jump to content

What's next for brush factory?


Recommended Posts

Hi everyone,

 

I've been thinking about the brush factory plugin and decided it's time for a rewrite. I want to focus on ease of use, improvements and new features. Please recommend changes to the layout or behavior of the application, and make requests so I can organize the important changes up-front and get them handled early on. I'm rewriting the app mainly to make these changes:

  1. Switching the main drawing algorithm so I can support blend modes and channel locking.
  2. Saving, changing, and deleting brush profiles so you don't have to constantly redefine the settings.
  3. Using a more extensive dynamics system that lets you set constraints on values on and during a brush stroke.

 

The dynamics system will have settings like this; the last is a constraint on distance:

Start stroke: vary alpha -10 Every brush stroke is up to 10% more transparent than current brush transparency.

During stroke: vary horizontal spray 5% As you draw, the brush is sprinkled horizontally across 5% of the image in either direction from the mouse.

During stroke: loop add hue 2 As you draw, the hue shifts by 2. When it reaches the max value of 360, it loops to 0 and starts again.

During stroke: subtract alpha 100 distance 50 The brush stroke becomes lighter as you draw.

 

Things To Change

  1. Smoothing only needs to be on or off. No need for high, higher, highest.
  2. Symmetry needs a movable origin. Right now it's fixed in the center, but should be a dot you can drag with right mouse button.
  3. Embed a color wheel instead of using a button to select the color.
  4. Possible feature to draw more smoothly, snap to grid, etc. time permitting and as desired.
  5. Queue about 3 most recent mouse positions and compute mouse direction between oldest and newest for more accurate mouse direction computation.
  6. If it doesn't slow things down, always compute mouse direction so we can apply brush on first click in rotate with mouse mode.

 

Things To Add

  1. A button to reset the color back to the user's primary color.
  2. A way to pick colors in the canvas.
  3. Blending modes and if possible, channel locks.
  4. These dynamic constraints: distance from stroke origin, total distance, tablet pressure, mouse speed, mouse direction.
  5. Probably a toolbar for main brush properties since keyboard shortcuts aren't always used / usable.
  6. Maybe brush outline via edge detection from 0% alpha pixels and nearby pixels with non-zero alpha.
  7. Support for tablet pressure-based drawing in dynamic constraints.

 

What features do you want? What do you want to change? What don't you actually use, and where do you want to put features in the user interface?

Edited by Joshua Lamusga
Removed finished features from queue.
  • Like 1

Untitled.png.28dedeebdce78c42589f24716981923f.png

Link to post
Share on other sites

@Joshua Lamusga I have to admit to not using it much these days - due to not painting much at the moment - but when I do I've been very happy with it and, besides perhaps having a chalk brush, can't think of anything more I'd like to change :)

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to post
Share on other sites

@LionsDragon Brush Factory initializes with whatever settings were last used, but if you use it for the first time since opening paint.net, there are no settings in memory and it uses the user's primary color. I'm thinking maybe toggling between setting a color and using the primary color.

 

@welshblue Last button on Other tab (custom brush locations) will open a dialog when you click it. The textbox in the dialog is totally editable. There's no limit to brush size except memory and lag, but lag gets fairly noticeable after 500x500 images. The algorithm in Brush Filter is better than the one in Brush Factory, but I don't know how much faster I can make it. I think if lag is less than 1/2 second on my machine it's probably fair enough to at least let the user try it.

 

New Points

- User should be able to choose between primary color, previous settings' color, and it's probably time for a color picker.

- Allow brush sizes past 500x500 as long as they don't lag too much

- Brushes should load in the background without pausing the user

Edited by Joshua Lamusga
  • Like 3

Untitled.png.28dedeebdce78c42589f24716981923f.png

Link to post
Share on other sites

@Joshua Lamusga, I love using the Brush Factory, and @welshblue beat me to the request to increase the maximum radius size from 500.  I would greatly appreciate that.

 

Two features I would like to see implemented if they are possible, and I acknowledge right now that it may not be possible.

 

1) I would like to see the square brush be replaced with an outline geometry of the brush file.  It would make it easier for me to see where I am painting, especially when performing pre-masking paint for my photo manipulations.

 

2) This might be an impossible request, but I am just throwing it out there.  I would love to use ABR (Photoshop brush file) within the Brush Factory without having to go through the steps of converting ABR into individual PNG files to be used by the Brush Factory using converters like abrViewer or abrMate.

 

Edit: After taking another look at the Brush Factory, I think it's time to reconsider the custom brush file location.  It takes FOREVER for it to load, even inside a virtual machine called Parallel.  One feature I really liked from pyrochild's Smudge plug-in is the ability to load brush from the Smudge Brush folder, and that is something I would like to see in Brush Factory very much.

 

Edited by TrevorOutlaw
  • Like 1
Link to post
Share on other sites

@TrevorOutlaw Thanks for the input! Good brush outline idea; I remember seeing it first in Pixlr. I'll add it to my list and see if I can't get it done.

 

The ABR file format specification is unfortunately not publicly known. There's some speculation and older file formats are published, but with all the revisions it seems to have and the fact that I could only write swiss-cheese support for it, I don't think it's worth the effort on my part. 

 

Welshblue beat you to mentioning brush loading speed, so that's going to be accounted for. Possibly in the existing version too. Honestly I don't know how that ever slipped my mind (because, you know, I'm so good at remembering things). As for the folder, I want to just leave it blank and let the user decide where to load from. It should be pretty quick and they only have to do it once; the benefit being that I don't confuse the user with implicit behavior. Smudge does it because it doesn't offer loading from multiple places and whatnot.

 

New Points:

- Brush outline via edge detection from 0% alpha pixels and nearby pixels with non-zero alpha.

Untitled.png.28dedeebdce78c42589f24716981923f.png

Link to post
Share on other sites
11 hours ago, Joshua Lamusga said:

The ABR file format specification is unfortunately not publicly known. There's some speculation and older file formats are published, but with all the revisions it seems to have and the fact that I could only write swiss-cheese support for it, I don't think it's worth the effort on my part. 

 

Completely understood which was why I acknowledged it may be impossible for it to happen.

Link to post
Share on other sites
On 10/18/2018 at 6:15 PM, TrevorOutlaw said:

2) This might be an impossible request, but I am just throwing it out there.  I would love to use ABR (Photoshop brush file) within the Brush Factory without having to go through the steps of converting ABR into individual PNG files to be used by the Brush Factory using converters like abrViewer or abrMate. 

 

Here is a build that loads ABR files based on the code from my Photoshop Brush FileType plugin (which is on GitHub under the MIT license).

If @Joshua Lamusga agrees I will fork the project and submit a pull request with the code.

 

This build may also improve the speed when scanning the custom brush folders, I switched it to use Directory.EnumerateFiles instead of Directory.GetFiles.

 

Removed because Brush Factory can load ABR files as of version 1.6.

https://forums.getpaint.net/topic/110673-brush-factory-v16-oct-29th-2018/

 

  • Like 4
  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites
On 10/17/2018 at 2:53 AM, Joshua Lamusga said:

Probably a toolbar for main brush properties since keyboard shortcuts aren't always used / usable.

 

Actually, Joshua, I would like to have the PDN's control for increasing/decreasing brush radius by using the brackets.  I want to be able to paint on the canvas without leaving it to tweak with the Brush Size slider.  Use the bracket to increase/decrease by 1 pixel and when ctrl+bracket are used, increase/decrease by 5 pixel.

Link to post
Share on other sites
19 hours ago, TrevorOutlaw said:

Actually, Joshua, I would like to have the PDN's control for increasing/decreasing brush radius by using the brackets.  I want to be able to paint on the canvas without leaving it to tweak with the Brush Size slider.  Use the bracket to increase/decrease by 1 pixel and when ctrl+bracket are used, increase/decrease by 5 pixel.

 

Added to the version in my first post.

 

@Joshua Lamusga

 

A pull request for the brush size shortcuts: https://github.com/JoshuaLamusga/Brush-Factory/pull/2

 

I also noticed that the file extension and custom search path comparisons are case-sensitive.

This causes the plugin to not detect files with upper-case extensions and have duplicate custom search paths.

 

I will be submitting pull requests to fix that and change the folder searching to use Directory.EnumerateFiles soon.

  • Like 2

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites

@TrevorOutlaw Looks like @null54 is adding support for the brush size shortcuts in a PR. I never knew about that shortcut.

 

@welshblue I'll consider displaying by folder such that the folder name in bold precedes each section and sections have alternating background colors for fast scrolling.

Quote

At the minute if I have say 3 different folders added to the custom brush folder ... for me only one of them loads in the brush menu.

If you can confirm that only the first folder of brushes loads, then either you've got unsupported files, so many brushes that you run out of memory (since they're all held in memory by the GUI right now...) or it's a bug. Can you confirm?

New points:

- Change path searches to be case-insensitive

- Add support for [ and ] brush size shortcuts, which is a current PR

- Maybe display brushes by folder with preceding names in bold and alternating background colors per section

Untitled.png.28dedeebdce78c42589f24716981923f.png

Link to post
Share on other sites

@Joshua Lamusga

 

A pull request for the case-insensitive path comparisons: https://github.com/JoshuaLamusga/Brush-Factory/pull/3

 

@welshblue What version of Windows are you using?

 

I noticed when debugging that all but the last of the saved brush paths have an "\r" appended to the end (Windows uses \r\n as a line terminator and the code only checks for \n).

This could cause the OS to look for a non-existent sub-directory named "r" in each folder.

 

While this does not appear to cause any issues on Windows 10 version 1803 it may cause issues for other Windows versions.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites
11 minutes ago, welshblue said:

Win 10 1803

 

Then it is strange that it does not work for you.

 

I updated the build in my first post to remove the extra "\r" from the saved brush paths, try it and see if the other folders now load.

 

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites
1 hour ago, welshblue said:

Thanks for that.  Worked like a charm.  

All folders load in the order they're placed in the custom folder location 

 

Glad that it works for you.

 

@Joshua Lamusga

 

Another pull request: https://github.com/JoshuaLamusga/Brush-Factory/pull/4

 

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites

Hey!! I'm pretty new to paint.net (I've played around with it quite a bit, but never downloaded a custom plugin).

 

I came across this post searching for tablet pen pressure. You mentioned in you post:

Quote

Support for tablet pressure-based drawing in dynamic constraints.

 

Under Things I'm Changing  and not under "Things I'm adding". So I have to ask; does the current version support pen pressure, or this will be a new feature in the up coming version??

 

Thanks

Link to post
Share on other sites
7 hours ago, Sormany said:

Does the current version support pen pressure, or this will be a new feature in the up coming version?

Thanks

Sorry, it doesn't. It'll be a new feature in the next version. I'll move that to the appropriate section to avoid confusing others. It's unfortunate I didn't have a pressure-sensitive device to experiment with when I wrote the plugin. By the way, it's very important that you brought this up because I was only anticipating demand for it, and now I know. Thanks.

 

@null54 Thanks for the additional PRs. It's interesting that \r can appear by itself. Glad you solved that problem because I've been running short on time again, which seems to be a chronic habit.

Edited by Joshua Lamusga

Untitled.png.28dedeebdce78c42589f24716981923f.png

Link to post
Share on other sites

@Joshua Lamusga, thanks for the clarification. Evidently I do have pressure sensitive device, so if you need me to test anything, I'm more than happy too. But I will give you this disclaimer: I'm no artist, and haven't used this pen a whole lot; so my testing will basically be limited to if it works; and not so much to how well it works. In any case, I willing to help :P

Link to post
Share on other sites

@Joshua Lamusga A pull request for the EnumerateFiles code:  https://github.com/JoshuaLamusga/Brush-Factory/pull/5

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites

Thanks, @Sormany. I have friends I can probably borrow from if I need to test it, but I'll keep you in mind in case that doesn't work.

 

Thanks again for completing those PRs, @null54. I think the only thing left is the .abr filetype support, which should probably be in a separate file. Seriously though, you're great.

Untitled.png.28dedeebdce78c42589f24716981923f.png

Link to post
Share on other sites

@Joshua Lamusga

 

Removed the PresentationCore dependency: https://github.com/JoshuaLamusga/Brush-Factory/pull/6

Added the ABR loading code: https://github.com/JoshuaLamusga/Brush-Factory/pull/7

 

 

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...