Brush tip preset library.
Closed, ResolvedPublic

Description

So, one of the concerns is not being able to make preset icons easily or standardly.

One solution is to have a brush preset icon library that will make it easy for users to select a few presets.

I've implemented a super basic dialog that can choose two images from a list, have the first's hue transformed and then allows them to be added together. The second image in this case would be an optional icon to indicate wetness or whatever.

This is the diff.

What is needed is..

  1. Help with loading images, I suspect our images need to go into a qrc, but I've never used those.
  2. Help with making the dialog look nicer :)
  3. And a selection of preset tips/icons that can be used. I could just start with this set: https://community.kde.org/Krita/Brushes_Preset_Preview and then when someone comes up with a nicer basis put those in instead.

I guess the best place for this selection would be in the save brush preset window. We already have other options with the preset image like loading an image and loading from the scratchpad into the thumbnail area. When I was building that, people mentioned that they also wanted the ability to select from a predefined list (like you are doing). I would imagine this would be another option people could use to help them create their thumbnail easily.

For what preset images to choose, I saw that @Deevad offered his icon set up. also @woltherav had some. I am ok with any of it.

I am sure the next request will be people wanting to use their own template files, but that is probably out of the scope of this work.

Yeah, I plugged it into the save brush preset window as another button.

Anyway, I tweaked it a little more and the following is possible. I guess for me as a programmer I really need @rempt's help with setting up qrc files to load from.

For the other things, I guess it'll be best as a meeting topic? If we dare?

@woltherav : Amazing!

I want to propose a pack of "brush icon" + "small emblem". what size/format is optimal for populating this GUI?

woltherav added a comment.EditedNov 10 2017, 5:00 PM

Currently, I am loading 200x200 images into the base image section, and 20x20 images into the extra icon section. However, the extra icon, could, theoretically be as large as the base image, it just kind defeats the purpose if it is :p (Besides, I can resize things quite easily).

I think it'd be the best if you could have a background.png, and then toolicons and extra icons as semi transparent pngs. Then I can have the color adjustment only apply to the tool icon.

Like I said, I can resize on the fly, so a little bit big isn't too much of a problem. It'd also be nice(but not necessary) if you could figure out where the extra icon should be positioned roughly on a pixel level, then I don't have to solve that :p

EDIT:
Background.png: any size above 200x200, square.
toolicons: pngs/svg, any size about 200x200, square, transparent background.
emblems: pngs/svg, transparent background, any size is ok.

Thank you @woltherav , I'll work on it during the next days.

if you could figure out where the extra icon should be positioned

On my template ( Krita file in T7424#117574 ) it's a little circle area on top left. I'll use bounding box of this circle for cropping the emblems.

@woltherav , thank you for your continuous effort on this topic. It's inspiring. I cleaned my pack, renamed and exported to PNG on alpha. Here is the pack. Emblems, and additional brush will come later.

Excellent!

On windragon's request I made a branch: Wolthera/T7435-preset-icon-library

check that out, build it, and then...

  1. go to local resource folder
  2. add folder preset_icons
  3. in that folder add two folders tool_icons and emblem_icons
  4. Put in therespective pngs in either.
  5. Restart krita, open dialog to see your icons... (I am not sure whether restart is necessary, actually, given it loads in the initialisation of the widget...)

This should help testing, I think :)

That's so cool!
Yes, it will help a lot. Thank you.

I just played around with the branch and it is fantastic! We can bundle our own stuff, and people can also use their own icons if they want. I can see other brush creators like @Deevad and @gdquest really like this

Yeah, as mentioned in the review-request I would like to know whether I should get Krita to make those folders I instructed deevad to make. Another thing is whether mid-gray level makes sense as label for the last slider(it is a super simple levels filter).

Finally I am thinking about whether it is necessary is whether we should bundle 512 sized pngs or that we should try to resize them down to 200 and maybe run pngcrush over the folder. This has much less priority for now though.

mangatengu added a subscriber: mangatengu.

I think the current folder structure is fine. I also think the mid-grey is fine for the label. I don't have anything better than that.

For the images to include, I would probably have the final 200x200 images. It will be a better reference for people knowing what the final image size is for those. Something like pngcrush would eventually be good to get the file size down a bit.

I didn't do extensive testing, but everything seems to work with me playing around with it for 15 minutes.

I think the current folder structure is fine.

This wasn't what I asked, I asked whether the folders should be made by default in the user resource directory or not? Because they aren't yet.

rempt added a comment.Nov 13 2017, 4:56 PM
This wasn't what I asked, I asked whether the folders should be made by default in the user resource directory or not? Because they aren't yet.

Yes, I think they should be autocreated, just like the rest of the folders. It's done in KisApplication.

In T7435#117934, @rempt wrote:
This wasn't what I asked, I asked whether the folders should be made by default in the user resource directory or not? Because they aren't yet.

Yes, I think they should be autocreated, just like the rest of the folders. It's done in KisApplication.

alright, done!

Okay, I updated my own icons too.

The major difference between my and david's icons is that I have more different types of pen, but maybe we can do some combination thing. (Some of these are already in the branch so they can be used to test, but their place there is completely negotionable.)


Super @woltherav , they look very good.
Sure, I was planning we mix our icons set (maybe other artist want to join too?) in a common library.

I tested today. Good job; it's easy to use! :-)

Okay, the brush preset tip library is in master now. Now what we need to do is fill it up with goodness :p

Deevad added a comment.EditedNov 15 2017, 4:15 PM

Super for being in master.
Adding emblems:

ramonmiranda added a subscriber: ramonmiranda.EditedNov 28 2017, 11:14 AM

Super @woltherav , they look very good.
Sure, I was planning we mix our icons set (maybe other artist want to join too?) in a common library.

Hi this topic is getting superb, @woltherav awesome job and @Deevad supercool resources too. if you remember , i did some icons in more vector style i have the .svg which is ready to create more combinations if people wants{F5516902}

Excellent initiative, and thanks much David for sharing your icons :)
I'd gladly share mine, but there are fewer and they're a different style. But I'll definitely keep creating brushes in the future, and gladly contribute assets if I can switch back to this approach. The ability to set the icons to a fixed size + simplifying brush creation like this could be enough to fix the issues I've had so far.
Is this tool based on python by any chance?

@ramonmiranda: yes, these svgs are available in the symbols docker as well :)

@gdquest: No, sadly, it wasn't possible for me to hook up the tool to the save dialog without using cpp. I only had to use qt classes though, so having a script or wizard using pyqt to have this feature generate preset icons on canvas would be quickly done, it just would be on the canvas, and not quickly when saving a preset :)

can we close this ticket? I have been using it to build out the new default presets for 4.0 and it seems to have worked really well

woltherav closed this task as Resolved.Dec 2 2017, 8:10 PM

Let's close it for now, yes, then when we have issues we'll open it again. (Or open a seperate task :) )

Maybe I'm missing something, but there seems no way to modify a thumbnail once created, that is you have to create a new preset just to change the icon, say you forget to add one of those little info icons from the top left corner, you'd have to save a new preset just to make this change. Also undo would be nice on this interface if it's not too difficult to implement.

rempt added a comment.Feb 19 2018, 6:16 PM

You can load presets in krita as images and modify them.

@rempt Yah I know that, but that's not friendly UI for the average guy and you need to know where the system images are store if you're in the case I mentioned, you just for example want to add that tilt symbol in the top right corner, plus you'd have to place it manually in the right place etc. Modifying manually by loading the preset in krita as image is not the way to go for this is what I think

@razvanr - you said there is no way to modify the thumbnail once created. It sounds like you are looking for a certain workflow. Most brush creators want A LOT of control over exactly how their brush images look (layers with different elements, changing the brush size, changing the color, manual placement of different elements, text overlays, different backgrounds, etc). Some even want auto-generated stroke previews so they don't have to make them.

We could go a lot of directions, but I think it is usually best to do iterations of small improvements. What is the biggest thing that the preset image editor needs? An easier way to get to the location of the preset images/emblems? Auto-generated strokes? Changing the brush size/color? Manual placement of emblems?