Flash watercolour simulation (using PixelBender)

farbe-watercolour

Something I’ve been thinking about doing for a long time is imitating real artistic media, in particular watercolours. Not because I’m an avid watercolour painter (last time I’ve touched them was in kindergarten), but because I think it’s an interesting dynamic. Since it is mainly fluid dynamics, the idea resurfaced after my previous fluid sims. And luckily, with Pixel Bender, I can finally do this kind of thing! This paper by Cassidy J. Curtis et al was great, tho it also caused me to loose some time figuring out some errors. Finally I came up with something, dubbed Farbe (simply German for ‘colour’). One thing I dropped was the interaction between different strokes, because that would kill the cpu easily enough.

For a change, there’s no source of this, and for a few reasons. First of all, it’s a mess and needs to be optimized. Apart from that, I might just add on to this before I release anything (hence the project name ‘Farbe’).

The picture on the left is my poor imitation of Joan Miró’s Barcelona ’92 poster (Strepie, this one’s for you ;) ), so ignore that and create your own :)

See Farbe in action

26 thoughts on “Flash watercolour simulation (using PixelBender)

  1. Amazing. Amazing. I had planned to study fluid dynamics a while ago for some shader work I wanted to create but in the end resorted to some basic image manipulation due to lack of time, so seeing something like this is quite inspiring to get back to it. Also, thanks for the references!

  2. Zeh: Fluid dynamics is definately worth checking out. I’ve been getting into it a couple of months ago and I keep getting back to it in some way; there’s endless possibilities to be explored :)

    Sakri: Correction, TWO weeks ago! :D Back then it was all in abstract form and not quite working as it should. Luckily the breakthrough came sooner than expected ;)

    Strepie: Never forget Cobi, the Catalan Sheepdog!

    Steven: Yeah baby, my first digg! Thx ;)

    Ryan, Kristof, Alain: Thanks :D

  3. Wow, you can create some really cool fire effects as well by continuing to paint orange in the same spot! Good work!

  4. Mark: The ‘fire effect’ is actually the result of physically incorrect mapping of the pigments to the composited layer. I’ll be investigating that however, so if all goes well, we’ll be loosing that nifty “feature”, so enjoy it while it lasts ;)
    Pierre: I’m thinking of moving Farbe out of the experimentation state and into a proper project. As such, I’m not sure what I’ll do with the source yet.

  5. Pingback: localToGlobal » Blog Archive » news review -> 8th week of 2009

  6. Pingback: Flash Friday - 3D Trails, Flash Blackholes, Pixel Bender Watercolor and Much More | Weber Design Labs

  7. Great soft Merveilleux !!! I’ve just try it I’m not an artist but I love watercolour.
    Many thanks from France.
    Jean

  8. There’s something wrong in code. When you click inside your canvas and drag your stroke outside canvas at the top of the image your strokes and/or texture starts to disappear. I.e. try to paint uniform blue sky using long wide strokes (high water size and pigment size) from left to the right side of the canvas (going slightly outside). And you’ll see banding artefacts or top of your stroke will disappear while calculating (this applies to all systems linux/win I tried it on).

  9. Yes, that’s still a bug in this version. The new version of Farbe doesn’t have that issue anymore, but I can’t say yet when it will be released :)

  10. Pingback: Image bleeding with water (Flash + PixelBender) | Der Schmale - David Lenaerts's blog

  11. Yep, I’ve seen that site :) Similar idea but completely different implementation. About the source, I can’t say yet. Farbe has grown immensely in scope and first I want it released (it’s still being worked on), I’ll worry about source later. But I’m still not sure whether it will/can be released as open source or not.

  12. It will be great to see “Farbe”, the watercolor simulation,
    as a real functional application,
    the demo page is the best I know comparing to the programs
    that I actually use.
    I saw an image of the program that you published,
    isn’t possible to make available a beta Farbe
    until you deal with the stains ?
    I am sure many will be happy with that.

  13. Dany: A little more patience ;-) I’m working towards a beta, even tho it’s going a bit slower than I expected. However, I need to fix some loose ends which are too important!

  14. Very nice!
    That would be good to have it painting in real time thought. Waiting to see the result is a little bit frustrating. I am looking myself to do some 3D impasto painting thing for my little photopainting software. Do not stop there, i’d like to see an optimized version of it!

  15. This is great!

    I am looking for help in rendering just the watercolor and fluid dynamics of this, without the controls and without the mouse involvement. Can you point me in the best direction to get started?

    Great work and we all await your app!

    Cheers, Mary

  16. Hi Mary,

    The article mentioned in the post is the best way to figure out how it works. It involves quite some math, but you’ll have to deal with that in any case!

    Cheers,
    David

  17. Hi, I just discovered this, and this is amazing – on so many different levels – the math behind it, the physics of fluid dynamics, the watercolor look, etc. As watercolor is my medium of choice, I have been looking for something like this for the iphone/ipad and there is nothing at all like this!

    All good things need lots of work and attention and that is obvious in this case, but do you have some kind of time line in mind for when this will come out? (Also, I am assuming that since this uses flash, this won’t be available on the ipad, which is a real bummer, which is apple’s fault).

    Well, great work! So cool!

  18. David,
    As Kristen noted, this is a truly amazing simulation. It’s far and away the most realistic one I’ve come across yet. I would be thrilled to hear about any developments, and I implore you to consider returning to this project.
    Hopefully,
    Joe

Leave a Reply

Your email address will not be published. Required fields are marked *