r/GraphicsProgramming • u/No-Citron-3963 • Sep 20 '26
Building a unified engine for traditional art materials
Last time I built oil paint using WetBrush. Since then I've extended it to watercolor, pencil, crayon and gold leaf as well, and brought them all under a unified engine.
Keeping WetBrush as the backbone, I moved the computationally heavy viscosity calculation and the pigment — which I had been holding in 3D — onto a height field, so it now runs in the browser and on devices like the iPhone SE 3rd gen.
Some of the dynamic simulators haven't been ported over yet, so I'm not happy with the oil paint yet, but I've tried to strike a balance between accuracy and speed.
You can try a demo in the browser:
https://mignonsketch.com/sketch
14
u/h74v Sep 20 '26
Kind of reminds me of this https://david.li/paint/
3
u/Manifesto3433 Sep 20 '26
Doesnt work. In Firefox it throws: canvas.getContext() returned null; webgpu not available or canvas already in use
In Chrome the canvas just stays empty.
Tried on multiple devices, android & linux
3
u/ananbd Sep 20 '26
Cool!
I made an app years ago which did a similar thing using particles which sampled an off-screen texture. You can cheat lots of things with particles and noise.
2
u/tannershelton3d Sep 23 '26
This reminds me of the program called “Rebelle”. I have wanted to look into that for stylized renderings done in post. I remember reading it could take into account the velocity and depth from the renders to make the painting happen within the scene even though it was done in post. Apparently it was used for Across the Spider-verse
2
u/klozovin Sep 26 '26
Reminds me of Verve Painter, many years ago.
5
u/Loud_Campaign5593 Sep 20 '26
that’s incredible what the hell? im going to try this
4
u/stuckplayingpossum Sep 20 '26
Wow this is amazing!
1
u/areyouretard Sep 22 '26
Is this open source I would really like to learn how this works. Or could u recommend some materials that could help me build my own?
2
u/Defiant_Squirrel8751 Sep 20 '26
nice!
2
u/Fluffy-Plankton7484 Sep 22 '26
Very cool!
2
u/Malkalypse Sep 23 '26
Nice!!!!