Follow me for updates and bonus :

illustrator , concept-artist

Textured brush in FLOSS digital-painting

24 january 2013


This article is a personal research document done around the 'textured brushes feature'  in digital painting.

This article start with an update on my investigations , addressed to Krita development .
Then you can read the original article published on 11 december 2011.

Update  :

This update add informations to the chapter 'How I guess it works'.
I obviously didn't studied it enough, or missed informations on the first publishing. I hope this update will correct it. 


The update is based on what Krita is able now , on Git master 2.7pre-alpha, and I hope it will help the leader of the Krita project and chairman of the Krita foundation Boudewijn Rempt ( aka boud on IRC , #krita channel , freenode ) to polish the feature he started just right after the publishing of the first version of this article ( thanks again about it ).

Note : the 'textured brushes feature' is available since 2.5 and still sleep because -I guess- the result is not what user expect.

Note 2 : Link to the same bug-report page : https://bugs.kde.org/show_bug.cgi?id=313831


The 'textured brushes feature' in Krita since 2.5
( Pixel brush Engine > Pattern )





One of the rare speed-painting tested with tweaking the feature in Krita 2.5
All feeling of 'dynamics' here are simulated by moving the parameters manually


A better test file

I worked on having a better test file this time (  attached to the bug-report ) than my previous poor binary black and white 'checker'.

 It helped me to figure-out how the actual parameters works on Git master 2.7pre-alpha. The 'Texture-tester.png' pattern in the tar.gz contain blured dots , from 0 to 100% value.

 I also drew a 3D representation under to understand later the 'Cutoff' parameter in a visual way.






Finding the right setting to attribute a pressure dynamics


 The target is to give to the user the feeling of having a tool who affect the grain of a texture. For reference , I did test "to the root" and took a photo of 3 traditional art tools and the way they react to a paper texture here.

 So , doing high pressure on the stylus should give the feeling to crush all the texture and deposit a lot of 'pigment' on the canvas ( and so affect all the brighter value on our test-texture ) .
In opposite , the lower pressure should only affect the peaks ( dots in black our test-texture ) to give the user the feeling to only touch delicately the texture, and deposit 'pigment' only on the micro summits of it.






 Fortunately , the feature exist at 90% I would say in actual Krita . Thanks to my better texture to test , I could find the best parameters to mimic this process.
  • the mode is "Mask Out"
  • check-box "inverted" is checked
  • moving manually the little 'black' pyramid slider from right to left to select the value range to affect.
Conclusion :
 If this value/data could be linked to a pressure dynamic, I presume the 'textured stroke' feature would work.








-------------------------------------------------------------------------
-------------------------------------------------------------------------

Article previously published

The following article was posted on the 11 december 2011.



Visual infos

As a picture worth thousands words, this article is mainly done around visual exemple done this way :
- Pattern sample : a little zone to display the pattern selected as a texture
- Brush mask sample : the brush selected ( brushes belong to the brush kit GPS 1.5 )
- Test stroke : 2 areas to see how the texture behaves on various backgrounds
- Painting test area : A speed painting example to show the rendering quality potential of this brushes

Traditionnal simulation

Oil dry
A paper like texture pattern combined with this sort of brush can obtain a very expressive effect. The strokes get more life and tell more about the energy of the painter. We are also used to decrypt this sort of rendering with centuries of traditionnal painting imagery. On low pressure some hair rubs the canvas to reveal his texture , while on high pressure , the mix brush engine create a more consistent color, near to an impasto. 

Pastel
A pastel preset would use a continuous fiber-pressed paper like paper Ingres simulated by this kind of pattern, and a squary brush mask to simulate the foot print of a pastel block. Mix brush engine is inactivated to have a more dry technic result. If I would activate it, I would obtain a sort of crayon/oiled chalk/oiled pastel effect. 

Speedpainting texturing

Reptilian sort of skin

Reptilian sort of skin ( negative )
Speedpainters can takes a lot advantage to have efficient patterns : most shading part of the artworks can benefit in less than a minute to a big amount of details with only few brush strokes. Leather, trunks, scales, roof, bricks etc...etc... can be simulated this way.  For this example above, I show also the same texture can produce another effect with itself negative.  

Cracks on a surfaces
Most textures shouldn't be left 'as this' on the canvas, and need further little painting details to make them believable. Apart of that the textured brush does a wonderful job to got a prototype of the visual aspect before a final refinement. 

For 3D artist

A texture applied to a cube in Blender
Digital painters are not alone to benefit about textured brush strokes. 3D texture artist use them a lot. A large library of good tile-able patterns is a must have for them.On the example above here is a 1min textures done with a pattern and 2 brushes ( a cloudy one for texture variation , and a rake for scratches on the borders ) and applied to a cube in Blender.

How I guess it works

technical test with rounded brush and checker
I'm not a coder and technician, but I do an attempt here to describe the behavior to help user and developers to understand it. The pattern seams to react just as a 'alpha mask' acting in addition to the 'brush mask'. It's evident with testing the feature with a circle as a brush mask and a pure checkers as a pattern. Black parts become totally transparent while white totally let express the original brush behavior ( a opacity control on the pressure )

Pattern alignment test
Threw many strokes done, the pattern position keeps aligned. This is good, because it allows to brighten parts or darken parts of a textures, and be consistent in a shading. Also, with this behavior, the usage of pattern as textured paper is possible and keep consistent.


Graphic user interface

The texturing as you can use it now in Gimp-painter 2.6 

The current GUI in Gimp-painter works, but don't offer many options. A checkbox 'Use texture' ( only available in mixbrush ) activate the feature. A slider 'Grain' under offer the possibility to have an additional alpha control on the pattern. Good to 'calm down' a to strong texture effect. The pattern choice depend of the Gimp internal panel for pattern selection. The preview are really bad, because they offer a little square centered cropped at 100% resolution. For artist working at high resolution for printing, the maximum of 512x512px for pattern size is a hard limitation, and the thumbnail often end up in a cloudy zoom on the texture, not representative at all, and so hard to pick. A good spatial memory ordering helps. 
Other majors disadvantages ; the scaling of the texture is not possible to choose on the fly. For this you have to resize your pattern manually and create as many instance of the same pattern at each size you want. Same for a simple negative. Also, default provided patterns needs to be deleted, they all are useless. 

Gimp-painter 2.7.2  textures on GUI  new toolbar ( abandonned developement )

The toolbar access to the texture as proposed in the version 2.7.2 of Gimp-painter was a brillant idea from the developer of the fork Sigetch. But it seams the main part of Gimp team not agree with him according to the actual 2.7 development ... 

Krita 2.4 beta  Pattern on GUI  toolbar
Krita also propose the same very good access to the pattern via the toolbar, with sharing of ressources via GHNS ( to share or download online patterns on the fly from within Krita ) , organisation via Tag. As a cons, the panel is not undockable nor re-sizable, the preview thumbnails are also fixed size and not offer a good visibility for high res textures.  

Krita 2.4 beta  Actual textures feature
The actual 'Source->Pattern' features is not usable as a textured brush. The alignment is good, but the texture pattern don't behave yet as an alpha mask , but as the 'source' color of the brush strokes.

A visualization mock-up of a functional GUI for textured brush in Krita 

This 'ideal' mock-up feature:
- a selection of the pattern ( thumbnails ) , because preset should ideally remember the associated pattern if in use.
- a 'Scale' silder , to upscale the texture or downscale it according to the need of  the artwork. 
- a 'Rotation' slider ( optional ) , to rotate the texture panel ; if impossible to do , simple mirroring on X or Y axis is also interresting
- an 'Offset' slider (optional ), to offset the alignment position of the texture on both X and Y axis.
- an 'Alpha' slider , to do as Gimp-painter propose , an additionnal alpha control on the texture itself. 
- a checkbox 'Use color' ; to fall back on the actual 2.4 behavior where texture use color input
- a checkbox 'Negative' ( optional ) , to use an inverted version of the pattern too. 

I made it to simply to communicate how it can looks, sorry if it's a non-sens coding wise. This is just a user proposition

Ending note :

I hope my article will help developers to make future FLOSS digital painting tools better. 

Ressources :  materials to do your test ( patterns I use in this article , 3D files , template for my test zone ) textured-brush-floss.zip  ( Public domain textures, CC-0 ).

If you have additional thinking or question about feel free to use the comments. 
Share this page :

^

15 comments

Avatar Gravatar

1. n-pigeon


sunday 11 december 2011, 16:00

yup I miss this feature also

Avatar Gravatar

2. n-pigeon


sunday 11 december 2011, 16:21

@David

"I'm not a coder and technician, but I do an attempt here to describe the behavior to help user and developers to understand it. The pattern seams to react just as a 'alpha mask' acting in addition to the 'brush mask'."

Not only, the brush (for example by pressure) controls the mask also, probably by changing its values or/and contrast.
That's why when you press lightly on canvas, the stroke seems to take only high point fo texture, and when you press hard it fills more of texture valleys.

Avatar Gravatar

http://brettwmccoy.com
sunday 11 december 2011, 16:21

So is Gimp Painter a dead project now?

Avatar Gravatar

4. n-pigeon


sunday 11 december 2011, 16:29

Oh and it's not that Gimp team not agreed with GimpPainter dev :P, Alexia is porting his features to gimp 2.7+ but his code is full of dirty hacks and it's not one day job to clean it and port to main stream gimp. In 2.7 smooth stroke was ported, in 2.9 she plans to port mixbrush or maybe even textures also. :)

http://www.davidrevoy.com/
sunday 11 december 2011, 16:41

@n-pigeon : ok , I understand what you say.
No, it's really simplier than this as I explain here ( that's why I wanted to make all this test ). If a preset at low pressure takes only hight white part of a pattern , it's because adding the low alpha of the brush + alpha of the mask = only hight value of the pattern remains ( witch makes the feeling pattern got 'holes' ) . It gives for sure to the user the illusion pressure control the pattern mask density. In fact pressure only control opacity , and pattern just follow this opacity as a child process, clipping to full transparent value when lower than 0 ( black ).

@Brett McCoy : No updates since January. Don't know any users of 2.7.2. Source code of 2.6 on Ubuntu 11.10 got a bug with tablet ( need to be patched, but the PPA Mizuno will not work. I sent him a private message on launchpad for the updates, but it might takes long time. ) So. Yep, it's in way to death, imo.

Avatar Gravatar

6. n-pigeon


sunday 11 december 2011, 17:09

Oooh, right, now I understand it. It's not changing texture mask contrast, but it's max value, used to create final mask of the stroke.

But I think it shouldn't be bind with brush own opacity.

With brush opacity not bonded to pressure, the texture coverage should still work and brush own opacity should be controlled separately by it's own opacity slider and pressure curve.

Avatar Gravatar

7. n-pigeon


sunday 11 december 2011, 17:16

The texture should have it's own opacity and pressure curve (or other dynamics) it will have more uses. I think.

Sorry for to many post I deleted some my accident ^^'

Avatar Gravatar

http://stevenpowerssmp.com
monday 12 december 2011, 04:46

David,

Good article. Not to put you on the spot, but how about doing a video demonstrating the basic points in the article showing what you like and want to see in FLOSS apps?

Avatar Gravatar

9. Marco


tuesday 20 december 2011, 10:48

Taking Steven Powers idea. Have you watched the Jimmac videos that explain how to create a simulated interface with blender? Well those videos are about creating Gnome3 mockups. But if you make a video about your gimp's dream mockup I think will be inspiring for developers:
http://jimmac.musichall.cz/log/?p=1203

Also a couple of years ago I've found interesting projects (like this one I'm linking) that used inkscape to create the GUI of a real program and not just a mockup:
http://osku.de/simsui/

It would be interesting to separate the program by the GUI and let to each artist to create it's own interface using Inkscape and maybe share it with others like an extension on Firefox. But probably I'm dreaming.

Avatar Gravatar

http://krita.org
sunday 11 march 2012, 11:53

Hm... I'm working on this now, and I'm wondering -- in the mockup, texture takes the place of the input color, and I'm thinking that it might have to be a third item in the preview designer, next to brush and color.

http://www.davidrevoy.com/
sunday 11 march 2012, 15:11

@Boudewijn Rempt : Many thanks to work on it. And you are right about the categories for the mockup. Making the texture inside the 'Color' menu finally doesn't make a lot of sens. I wonder you'll find enough room to open a third section 'Texture' or another label for it. I think it's a really good idea, and it will also give best visibility to the feature. Thanks again. I'm around to test branch.

Avatar Gravatar

http://krita.org
saturday 24 march 2012, 10:25

For everyone who's interested -- you can now test the first implementation of textured brushing in krita by checking out the krita-texturizer_option-rempt branch in git :-). I still want to add a bunch of smaller features and the performance isn't optimal yet -- and I'm not sure we can already exactly reproduce the effects David shows in his examples. But please test!

Avatar Gravatar

13. Aman


friday 25 january 2013, 11:50

This is very exciting development indeed.

I have to tell that this may be a great alternative to Texture fills in Vector layer,if I can use this brush in Big size on a selected area by use of lasso tool or other selection tool.

I would also like to request a wooden texture brush in the texture Brush Library if its not there,since that's a trend in interior designs in vehicles.

Once I select an area on a new layer,I can use texture brush.

Once I use a texture Brush,I can then make another layer,another same area selection and use Light Airbrushing.

This would definitely be a nice feature and I don't think this is available in most commercial Painting softwares.

http://www.davidrevoy.com/
friday 25 january 2013, 17:58

@Aman :
"and I don't think this is available in most commercial Painting softwares."
Well... it exist in Corel Painter, TVpaint, Manga Studio, Open Canvas and Photoshop since at least, more than 5 years xD

Avatar Gravatar

15. Aman


saturday 26 january 2013, 15:32

Thanks a lot!
I Was not aware of this.
I recently started testing trial versions of these softwares.
But anyway,the brushes in Krita are really unique.Thats very true.

Rss feed of the article's comments

Write a Comment

What is the first letter of the word uenr? :