joeedh / pigment-painter

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

LUT generation #2

Open ruser-2020 opened 8 months ago

ruser-2020 commented 8 months ago

Hi, which one of the scripts (in the scripts or wasm folder), are used to generate the LUTs you have?

joeedh commented 8 months ago

First the pigment spectral data (I got it from a nice professor) is optimized to better fit inside the (SRGB I think?) RGB color space. That happens in optimize.js I think.

The LUT itself is generated in colormodel.js.. Btw, other people have had success using polynomials instead of lookup tables; the original authors used a polynomial to replace one of the two LUTs, and people have used them for both.

Anyway, the main LUT generation happens in makeLUTsJob(). It's pretty messy code, I tried a lot of things.

electro-logic commented 7 months ago

Hi Joe, why not creating a small standalone app to convert spectral data to look-up table? I can provide you spectral data for some pigments