Joshua Lamusga

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 I'm Changing

  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. Allow brush size to go past 500 up to about a half-second delay during drawing (max size to be determined).
  5. Brushes should be lazily-loaded and non-blocking. Load thumbnails in the background, load a brush when selected.
  6. Image drawing should repeat at intervals with a fraction of original size to mitigate visible lag.
  7. Possible feature to draw more smoothly, snap to grid, etc. time permitting and as desired.
  8. Hopefully zooming in/out based on mouse position instead of zooming to the center of the image.
  9. Maybe display brushes by folder with preceding names in bold and alternating background colors per section.
  10. Adjust keyboard shortcuts to use brackets. User shouldn't have to hold Ctrl, but can to make size/rot/alpha change faster.

 

Things I'm Adding

  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.
  8. Maybe, just maybe, vector-based brushes. Would be after everything else, if so.

 

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
Added note about considering vector-based brushes one day
  • Like 1

Share this post


Link to post
Share on other sites

This might sound a little silly but...sometimes I select a color in the main color wheel, then go into Brush Factory and have to repeat the process. I don't know if I'm doing something wrong, or if there's a way to keep the selected Primary Color active in Brush Factory.

Share this post


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 :)

Share this post


Link to post
Share on other sites

Maybe this is possible now and I haven't worked it out ... but say you've got 5 folders of custom brushes - the choice/ ability to just delete one of them instead of clearing them all (when for me PDN becomes unresponsive for a while)  

 

Having a larger brush size than 500 would be brilliant for larger images especially as some of the brushes I download can be for example 1500 x 1500 or bigger

But maybe PDN set up doesn't allow for larger brushes ?

 

The 3 things you want to change sound really good additions/ features

Share this post


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

Share this post


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

Share this post


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.

Share this post


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.

Share this post


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

Share this post


Link to post
Share on other sites

Another thought that may not even be possible

 

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.

The ability to click on a folder and it opens the brushes in that folder would be a time saver and help with work flow.

 

But not being a coder maybe I'm reaching for the stars on a step-ladder

 

Something like this

 

BF-example.jpg

 

... nice collab' guys

Share this post


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.

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

@Joshua Lamusga

 

After a bit of detective work ... mainly checking all brushes in the folders are pngs?  They are.

 

With 2 folders added:

 

bf.jpg

 

With 3 folders added:

 

bf-1.jpg

 

... it seems only the bottom one on the lists are loading (ie.  Powder and Disidegration respectively)

 

Also I just noticed - Other >>> Clear Custom Brushes >>> Controls >>> Custom Brushes are still loaded in the drop down/ All 3 Folders still located in the Custom Brush Location

 

Close and restart PDN all folders still there,  as are the custom brushes in the drop down.

 

RE: Any changes to how brushes/ folders are displayed in the drop down would be invaluable to people who do a lot of brush work but if only 1 person thinks it's a good idea ... then is it really worth the extra work ?

Share this post


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.

Share this post


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

Share this post


Link to post
Share on other sites
3 hours ago, null54 said:

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.

 

Thanks for that.  Worked like a charm. 

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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now