Archive for November, 2009

Let’s spray everything

Friday, November 13th, 2009

I added new feature to spray -  spraying bitmap images (textures). Thanks to the KDE you can load plenty of image formats. It starts with Qt QImage supported file formats and continue with KDE supported file formats (psd, xcf to choose the most used ones). Let’s be the mentor for you for a while and teach you how can you do nice things. Let’s start with autumn wallpaper.

Tutorial

You need svn copy of Krita (how to build koffice ) and  some leafs textures (e.g. I used this one , found in wikipedia by Kubuntiac ). The texture has alpha channel, it is png file. That is important so that it looks cool. I scaled that texture to 192×118 px and named it leaf2.png.

Spraying bitmaps works nicely with objects that are cut from some pictures, e.g. some kde hackers on planet have their faces properly cut from photos. It is good example object for spraying.

Some random KDE hackers from planet

In Krita you select spray brush and go to options. In Particle Type you select Spray object to image. Then you select the image within the dialog (Open The File, locate leaf2.png on disk and click ok). In brush size you can specify with particle number — how many images will be sprayed per dab (something like per mouse move event:) ) but what I changed there is spacing to 1.0, so that the brush reacts quicker and with less density. In Color dialog check random HSV and move hue to value 40, saturation to -40 and value leave intact. Here you can experiment. Experiment with scale and brush size too. Brush size can be changed by pressing shift and moving with mouse left and right on the canvas. It was added lately and it is quite handy.

Let’s look at some pictures. This autumn image was made with the leaf texture I mentioned above and one other leaf texture. HSV trasformation nicely changes the texture so you get rich colorful image with just one or two textures.

Spraying leafs - HSV transformation useful

Filters can be useful when painting, here is post-processed version (I used auto-contrast filter). It has different mood, more like some cartoon, illustration style :)

And one for upcoming winter. I did this one with snow flakes. Those are used as textures. Clouds done with feature I wrote about last time.

Snowing [done with spray]

This feature is present in other apps in some ways too. I don’t have Photoshop or Corel Painter, I never used them before but Boud told me that similar feature is called image hose in Corel’s Painter. In GIMP similar feature is called brush pipe.

Developing future

I have to polish the GUI, optimize the algorithm so that more and big images can be sprayed more faster. I plan to improve the particle settings, add more control to rotation to the user’s hands (tablet support, etc. )

Questions

How do you see it? Do you like it? What would you add to the spraying of bitmaps?

Krita: Everybody can make a painting

Sunday, November 1st, 2009

I decided to share some GUI between our brush engines (paintops in Krita jargon). I started with color dialog. The color dialog is work-in-process. I co-operate with Cyrille Berger so that more paintops can benefit from color trasformations and also I want to add features that Cyrille coded. First implementers of the color dialog are spray and grid brush.

Color dialog

So I implement some features that are available with grid brush to spray. And now you can do fun stuff. You can be artist with just few clicks. Everybody can make a painting :)

There is painting style called pointillism. If you want to know what is that, wikipedia has nice article and nice picture in neo-impressionism article. Inspiration came also from Paul Haeberli, who did really great job in area of non-photorealistic rendering (Paint By Numbers article). There is Paul’s applet where you can be impressionist (pointillism style also possible with proper settings).

Now in spray brush in Krita you select particle type circle, you check in color dialog, that you want color per particle and sample input color. Then you just go through image and paint where you want. You can get the same result as in picture I did. Don’t forget to load some cool photo which colors will be sampled.

Pointillism

Pointillism with spray brush in Krita

You can select different particle type to get different style. E.g. I selected rectangle with 1px width and 60px height size (lines ;)   and checked random size and same options in the color dialog. I also checked random opacity and random HSV and used sliders to post-process sampled colors as I paint.

ImpressionistKrita-impressionism with spray

So far it is destructive editing, so you paint on photo in the layer. For future you will be able to select layer in which your photo is loaded so that it is not destroyed.

I love to paint clouds :) I always wanted to be able to paint clouds with my brush engines and now I’m closer to that aim. Here is what I get with spray and color dialog:

Clouds

Let’s describe random HSV and opacity a little. Random opacity select random opacity of the color. Easy. Random HSV turn on hue, saturation and value transformation of the color. The sliders in the color dialog sets how much and how far the color can be transformated. If you select from HSV e.g. value to zero, color’s value will not be changed. If you select value 100, then color’s value will be randomly adjusted to interval 0..100. Applies for the hue and saturation in the same manner. You have to understand the HSV model for this usage.

For the clouds I selected white color and checked random opacity and HSV and dragged the value slider to negative values to get darker colors. And I played with gray colors and saturation. Working on thesis is fun! ;)