Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: Base Brush Radius #104

Merged
merged 1 commit into from Sep 22, 2017
Merged

input: Base Brush Radius #104

merged 1 commit into from Sep 22, 2017

Conversation

briend
Copy link
Contributor

@briend briend commented Aug 2, 2017

This input can help solve the following issues:

  • pixel-feather/hardness drop-out with small brush sizes
  • slow performance of small brushes due to many dabs
  • blurry large brushes

It also brings to the table some new dimensions for brushes:

  • Change any brush settings based on size
  • Redefine bigger/smaller brush concept

Demo of this input applied to radius, smudge, and lightness. No pressure, tilt, or any other input was used, all I did was use the F and D keys to make the brush bigger or smaller. I've defined this brush so that it is darker when small, and more smudgy when large. Also the dab size stays consistent and jitter makes the brush larger (instead of the dab size making it larger). Finally, there are more dabs drawn when it is larger and less dabs when it is smaller.
brushradius

Probably the simplest and lamest-sounding input ever, but it is surprisingly useful. This input is literally a feedback of the currently set base brush radius; the setting controlled by the sliders and buttons to make the brush bigger and smaller.

Bigger or Smaller, that is the question. What do those terms mean for a brush in MyPaint? Does it mean bigger dabs, or does it mean more dabs spread out over a bigger distance? Or something else entirely? Have you ever been disappointed by the way certain brushes look when you make them "bigger or smaller"? I bet you have! Here's the default devaad pencil when you make it bigger:
image

It gets all blurry and... well, not very much like a pencil anymore. Here's the same pencil but with this new input set to mostly cancel-out the dab-size increase:
image

image

What's happening?! Well, effectively as I make the brush bigger, I'm making it smaller again. I can adjust this so that it completely negates the dab size growth, or just changes it slightly, or even amplify it to grow more, etc etc.

The interesting bit is that other aspects of the brush engine use the base brush radius value (as opposed to actual) for their calculations. Things like jitter, and the offsets, among others. Most importantly: the dabs-per-actual and basic radius settings use different brush sizes (if that's not obvious by the name). If you use dabs-per-actual radius combined with this new input, you can easily make a brush that gets MORE dabs when it is bigger, and LESS dabs when it is smaller. Previously the opposite would happen because as your brush was smaller the dab count would increase, which never made a lot of sense to me. This also would cause small brushes to have horrible performance in some cases. No more! Alternatively, you can use dab-per-basic radius (instead of actual) and keep the number of dabs consistent regardless of your brush size, making bigger brushes sparse (probably not what you usually want).

So try it out on those pesky brushes that you just hate to make bigger or smaller. Of course, you can use this input to control other aspects of the brush. Have you ever had a brush disappear when you make it small? That's probably because you are using pixel feathering and/or hardness. So, with this new input just fix it-- make pixel-feathering decrease and the hardness increase as you decrease the size of the brush.

And you can make really useful "combo" brushes. When the brush is small you can have a totally different overall behavior than when you make it bigger, and have it smoothly transition between the modes if you want. This can be more useful than two brushes specifically because you can create very smooth transitions.

The last thing that that makes this nice is that you can just use the keyboard shortcuts, which means this input lets you do a lot more stuff dynamically without any need for a fancy tablet, tilt, or pressure. I've made a feature issue on MyPaint to allow Custom input to have keyboard shortcuts too, which is along these same lines.

Simple input that feeds back the current base brush size value.
Useful for changing settings depending on intended brush size.
If applied to radius, can negate dab size and effectively control
brush size by increasing dabs and amplifying jitter or other offsets.

Note the difference between dabs-per-basic-radius and actual.
@briend briend merged commit 8c40ca3 into mypaint:master Sep 22, 2017
@briend briend deleted the baseradius branch April 26, 2018 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

1 participant