Recommended Posts

This plugin lets you use dynamic brushes with custom shapes. It's good for drawing effects, textures, and redundant objects like grass. It can be used like a spray can or be used to draw symmetrically. Adapted from TechnoRobbo's Dodgeburn plugin, Pyrochild's context menu, and improved by Null54.

Interface

The plugin is full-screen when run and looks like this:

There are four tabs. The default one is on the left and you can click the names of the other tabs to switch to them. Each tab has its own settings. The first tab shows static brush settings (non-dynamic behavior). The second shows dynamic behavior settings. The third shows dynamic options related to color. The last includes options like rotating the brush with the mouse, enabling symmetry, setting the smoothing mode, or setting custom brush locations so you don't have to import all your brushes every time.

After downloading the zipped .dll file, you will have to extract the file somewhere, then move it to the Effects folder of your Paint.Net installation, which for me is at C:/Program Files/paint.net. Put it in the Effects folder, then restart Paint.Net. You will see it under the Tools submenu of your Effects menu:

Adding Brushes

If you want to have extra brushes available, consider making a dedicated folder for it, then adding that folder to the custom brush locations in the 'other' tab of brush factory. Some additional brushes (heart, lightning, leaf, etc.) are available here: Extra Brushes.zip

Link to post

Share on other sites

- A mouse speed controller, if I move the mouse too slow the brush will be recreated too many times.On the other hand, if I move the mouse too fast it will leave important gaps between the repeated images. Perhaps matching the "Minimum Draw Distance" with a "Maximum Draw Distance" could do it.

Share this post

Link to post

Share on other sites

@Eli I attempted it, but it was countered by lag. I think I'd have to rewrite this plugin to do something like that. I hope that's not a deal-breaker. Alternatively, you or another person can try to implement it.

@homebrew We make all of our plugins on an external canvas because it's the only way to hack in these kinds of features. PDN does not lend itself to canvas-type plugins; there is no way to make it native. Rick would have to modify the API to allow us to write tool plugins or something.

Share this post

Link to post

Share on other sites

You can find the changes in the changelog at the bottom, just above the download. I didn't get a big response for the initial release (but then, it had no publicity). Now that a few people have seen it, I would like some feedback if you have the time

@Eli I haven't given up on that idea. I might create an alternate way to draw. I was trying to draw as a percent of image size, but now I'm thinking of running a timer that every few ticks will look at the mouse position and add X images at some fixed distance (that might still be %-based). If I get it to work, I'll have it as an optional way to draw under the 'other' tab.

Share this post

Link to post

Share on other sites

Have you been able to investigate the possibility of using pyrochild's CanvasPanel UserControl?

I may want to use it in a future plugin of mine, so I'd be curious of your findings

I won't tear the two plugins apart to fuse a canvas for this plugin. They are both well-integrated into the rest of their respective application, so it would be begging for instability if I did that to Brush Factory. I have plans to implement the two things it does that I don't: use the clipboard image and mark the selected area.

Share this post

Link to post

Share on other sites

@toe_head2001 I added myself as a company and changed the functionality of lock alpha so it applies after each stroke instead of at the end of the image, which is a more useful method. I can't lock alpha & copy after every individual brush stroke without doing some crazy size calculations (esp. with a rotated brush) and other things like that, so I think doing it after a brush stroke is better. It might be plausibly useful, now.

Share this post

Link to post

Share on other sites

@AnthonyScoffler I keep my "brushes"in a folder inside the "Pictures folder" and every time I want to "add a new brush" the browser defaults to the "Desktop" . Can something be done so it will remember the last opened folder when adding brushes?

Share this post

Link to post

Share on other sites

I keep my "brushes" in a folder inside the "Pictures folder" and... can something be done so it will remember the last opened folder when adding brushes?

I was going to add an .ini file to the Effects folder as sort of a workaround, but using the registry is much better. I will add a preferences option under miscellaneous. It will open a little dialog for all that stuff. Rather than just remembering the location to load, I will definitely have auto-loading of locations (I was already planning that ).

Thanks for the great idea @Eli! I appreciate the feedback, and it helps me organize which issues to tackle next.

...I'd also like to thank everybody that gave me positive feedback! I like to know when I'm doing something right

Version 1.2 is released and it addresses some of the concerns @toe_head2001 had. User selections are now shown in the canvas, and you can right-click to set the background image if you'd like (courtesy of Pyrochild's open-source Liquify plugin). Keep the feedback coming

Look at the first image, when I draw a path using only one stroke around the planets, with Rotate with Mouse activated, the rocket looks like it is a little bit lost in space. Could an option be added so the tip of the rocket will always head in the right direction as in the second image?

One more thing. I do not know why but some of the rockets are smaller than what they should be.

Edited January 8, 2017 by Eli

2

Share this post

Link to post

Share on other sites

Look at the first image, when I draw a path using only one stroke around the planets, with Rotate with Mouse activated, the rocket looks like it is a little bit lost in space. Could an option be added so the tip of the rocket will always head in the right direction as in the second image?

The picture of the spaceship could point in any direction. When you use it as a brush, it could've been upside-down, pointing in a diagonal, etc. The computer doesn't know what direction it points to, so it assumes it points to the right. This is a standard practice with similar algorithms.

The fix is easy: go to the first tab and increase Brush Rotation by 90 degrees. It should point to the right when drawn, which means it will work.

You know what's cool? If you mentally rotate the spaceships in the first picture by 90 degrees, you'll have the second picture

If only that explanation could fit inside the tooltip!

Don't forget to check the tooltip at the bottom, though. It shows information for anything you hover the mouse over.

Quote

One more thing. I do not know why but some of the rockets are smaller than what they should be.

I've been fighting it for awhile. I need to resize the image to account for apparent shrinking based on rotation angle.

Width = w·|cos φ| + h·|sin φ|

Height = w·|sin φ| + h·|cos φ|

The problem is that rotating the image increases the image dimensions. I'm trying to draw the image with an absolute size. The size can be larger by a factor as large as √2 at 45-degree angles. You probably know that drawing a 1000x1000 pixel image in a 16x16 space makes it look crummy. That's what's going on. Before I rotate, the image might by 100x100 pixels drawn in a 16x16 space. After rotation, it's 140x140 pixels drawn in the same space, which causes it to be visibly smaller.

I need to offset the visual decrease in size by increasing the radius of the brush at drawing time. In the past, I'd tried to increase the size of the brush before rotation, which doesn't work because it's drawn in an absolute size. I'll be tackling that again soon. I suspect drawing at (sqrt(2)cosφ, sqrt(2)sinφ) will do it.

Share this post

Link to post

Share on other sites

I fixed a rotation issue where angles close to 45 degrees were visibly smaller as a result of weirdness I described in a post above. Thanks to @Eli for bringing my attention back to that issue.

I made a Preferences button under the 'other' tab that opens a little window where you can browse and add folders on your computer that Brush Factory should scour when it starts. The textbox is editable, so you can type any reasonable folder or file path in there. It will handle both of them. The brush location settings are stored permanently.

I released it a little early (day after last update) because I start another quarter of college tomorrow, which means I'll focus less on this and more on school. But I'll still visit to see what I can do and what I can work on, so please keep addressing concerns. I'll have to face that alpha issue sometime

Edited January 9, 2017 by AnthonyScoffler

1

Share this post

Link to post

Share on other sites

Sorry to disturb your studies. I managed to make it crash. How did I do it? I loaded a brush and just kept drawing for a very, very long time without releasing the mouse button (two or three minutes). I do not have a computer with lots of memory so I probably did run out of something. I am posting the crash log.

Spoiler

This text file was created because paint.net crashed. Please e-mail this to crashlog4@getpaint.net so we can diagnose and fix the problem.