Thursday 1 July 2010

Watercolor effect


Ok The first thing I've tried is to have a way to render things with a bit more expression than standard pipeline.
I'm not really fond of realistic rendering, even if it can be really impressive.

So I've tried this effect: a watercolor pipeline.

It's only an implementation from a research paper: Real-Time Watercolor for Animation:

The system is quite heavy for now, but has some advantages, one being that it doesn't need texture (which I don't have.)

Every object is rendered using a standard pipeline, with uniform texture:


With Frame buffer object, I also render a diffuse lighting texture. (another specular texture can be used, but I haven't implemented that yet.)


This Id texture is then processed one time per id used, each time a new texture is created separating the pixels from the corresponding color:



At the same time, every image gets a low pass filter ( Gaussian blur)


Then following the algorithm, every image gets numerous effects to create the alpha of the layer:
- flow pattern (a step function)
- edge darkening (inversing the alpha border create with the blur)
- pigment granulation (a paper texture affecting the image)

Then every image gets a single color. (for a nicer effect, the diffuse texture is used to interpolate 2 colors)




That's it. I can then render every single layer into the main window.


With the different constants used, the final image can be quite different:

Grand Opening

Here is the grand opening of this Developer's diary.
Project Loomy is my project for the time being. Its name is an homage to "Loom" the 1991 game by Lucasart.
In Loomy we will see a lot of graphic programming, general game programming and some thoughts on game design.