I’m working on an application in which the user paints as if he or she were Van Gogh. I’d like the colors to blend just as real paint would blend, and I don’t really know where to start. I found Krita, an opensource application which uses " a set of differential equations that describe (among other things) the behavior of pigments". I can’t find anything relevant in the source though and it seems to be a very daunting task to implement this in oF. Could anyone send me in the right direction?
Link to Krita post concerning paint blending: http://commit-digest.org/issues/2007-08-12/
[move]By the way, great new forum features! ;D[/move]
this helps, mayebe?
it’s a list of all photoshop blend mode equations
If you’re comfortable with GLSL you should check out this http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/
or this discussion on stack overflow:
to do real paint though, you’ll need to make a way to put shadows for depth at edges of strokes, which is a little more complex. There’s a famous paper on this: http://www.soe.ucsc.edu/classes/cmps160/Spring05/p207-haeberli.pdf but it doesn’t really have much equation/code. This looks a little more helpful http://www.incognitek.com/painterly/downloads/painterly-paper.pdf and this demo of using geometry shaders for paintbrush:
sorry if that’s a tech overload, but it’s a really interesting topic.
Thanks for the links, I’ve never used shaders before but maybe now is the time to start learning it
One more quick addition to this for completeness sake, you might want to check out the classic dynaDraw:
The C code is sorta easy to follow along with and if you combined it with a texture, even just a circle with a dark ring around the edge of it for the brush, it might be close to what you’re looking for.
I’ll look into all of it tonight, but I just found an example of what I’d like to have as a result. I really like their brushes too.