Question

I am trying to implement free-hand sketching (it should look like a pencil). I did some research and I'm surprised there is so little info about this on the internet. The best information I got was by drawing in Photoshop and observing the result. I think Photoshop works something similar like this:

1) Each brush has its own pixel map, telling what opacity has each pixel 2) Settings (like weight, color etc.) apply to this pixel map before drawing 3) When pressing the mouse, Photoshop starts slowly filling the pixels under the pointer according to the pixel map given opacities 4) When drawing fast (so that the distance between two mouse frames is bigger than the fill ratio), Photoshop somehow interpolates the brush so that it looks homogeneous. I am not sure, but I think it also applies some kind of transformations to the pattern, because the line does not look regular.

Another effect I would like to implement is the line getting thinner before the pencil lifts (based on the speed of the pencil) - just as in real life.

I will appreciate any hints about: 1) How precisely Photoshop brushes (or a similar tool) work 2) Any open-source tools which do something similar 3) Keywords to look for (apparently I am googling with the wrong words)

Here a link I found in the research process (unfortunately closed source): http://www.youtube.com/watch?v=3RPphJxxscY

Was it helpful?

Solution

1) How precisely photoshop brushes (or a similar tool) work

Your guesses were quite accurate

2) Any open-source tools which do something similar

The GIMP http://www.gimp.org

3) Keywords to look for (apparently I am googling with the wrong words)

natural drawing tool simulation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top