Paint effect shader

Hey there,

I’ve seen a paper on the web about a paint effect shader technique, I wanted to show it to you and try to do it in Panda, but I can’t find the url of the site anymore.

The technique they talk about is a geometry displacement in realtime, this was giving the best toon shading I’ve ever seen.

There was a video of a teapot, a sea with a ship, all with the shader applied, it looked like a speed painting but in realtime.

The effect was like this (well in 3d) :

If anyone saw the page I’m talking about and got it in his bookmarks it would be very cool !

Thanks in advance.

Is this it?

Regardless, it’s incredibly awesome.


Thanks ! Yeah the effect is crazy.

Looks like realtime normal displacement is directx10 only effect ?

Maybe it’s possible to mimic the render with the same technique as shell fur + normal & parallax mapping using a noise texture.

Well, displacement certainly sounds like a DX10/11-level hardware feature. Then again, I can’t see this as a problem, it’s about time to start using this stuff.

So here is my wip on this effect, I’ll post in code snippets when finished.

I have some problems with the buffer creation, it fails 1/2 times when the same program is executed, looks like the “open gl cache”? is not properly cleaned on panda exit. You can see artifacts in the preview. (Had far less problems in Linux…)

It is using the code from motion trails sample, but on a buffer instead of full window.

There is an offscreen buffer with a dupplicated mesh, the mesh is displaced in vertex shader using a noise texture, then the motion blur effect is added to the paint buffer. I composite the paint effect + original scene so the paint adds light to the original mesh.

It needs a blender animation now and camera movements, to see if the overall effect is OK.

EDIT : I think the effect could use deferred lighting to get strokes of different colors and multiple lights.

Sorry for the encoding quality :open_mouth:






I get some artifacts (look at the banding colors) :frowning:

Needs a force map to get less distortion on focus zones.

Absolutely awesome. Certainly needs a higher resolution mesh and less motion blur, but the effect is great. Almost like someone was speed painting every frame.

Manou, you should totally make a Cg shader wiki. :slight_smile:
It would be like a library of shaders people could browse.
What do you say? I could help with setting it up.