joeedh / pigment-painter

GNU General Public License v3.0
7 stars 0 forks source link

Demo

Implementation of "Mixbox: Practical Pigment Mixing for Digital Painting" See https://github.com/scrtwpns/pigment-mixing

Warning: research code!

In addition to the pigment implementation, there is also an approach based on building a color space from arbitrary user-controller color lines. It doesn't work nearly as well as the mixbox approach. This lookup table is edited in the "Triplet LUT" tab.

The Code

There are seperate paint implementations in in JS, C++/WASM and GLSL. The JS and WASM code is used to generate and optimize the lookup tables. The actual painting is done by WebGL (there are paint backends in both JS and WASM but those are obsolute).

Note that in an attempt to be compatible with MixBox's lookup tables the lookup tables have their green and blue components swapped. This may change.

Differences from MixBox

Changing pigments is a bit tricky, since you have to regenerate the lookup tables (remember that this is research code).

The steps to change a pigment are:

License

The code is licensed under GPLv3. The mixbox people did not have to publish a paper at all, nor did they have to publish a readable one. Not only is their paper not obfuscated, but the video they published is so easy to understand that one could probably implement their method with that video alone. Out of respect for their hard work I have decided to go with the GPL. That includes the lookup tables in the assets/ folder. You may not use them for commercial purposes unless you publish your code.