5 ms·
I have a fork of this that inverts the light model from additive to subtractive and suddenly its like ink in water https://observablehq.com/@tomlarkworthy/ink
by tlarkworthy 2y ago
I have a fork of this that inverts the light model from additive to subtractive and suddenly its like ink in water
https://observablehq.com/@tomlarkworthy/ink https://observablehq.com/@tomlarkworthy/ink
- doctorhandshake 2y agoThis was the first thing I did when I wrote a fluid sim as well - I’ve spent a ton of time and energy pursuing ways to get subtractive color effects (the richness and light-subjectivity of pigment) in digital artifacts and have mostly come up empty, but I take every chance I can get.
- snaily 2y agoHave you checked out mixbox[0]? The outputs do feel intuitively "right" as someone who has dabbled in watercolor, and the paper/videos cover the thinking and Kubelka-Munk theory well. [0] https://github.com/scrtwpns/mixbox https://github.com/scrtwpns/mixbox
- tlarkworthy 2y agooh wow, they have the fluid demo too!!! Thats so much better! https://scrtwpns.com/mixbox/fluids/ https://scrtwpns.com/mixbox/fluids/
- doctorhandshake 2y agoWild! Just saw that at the top of the front page and thought ‘dang is HN reading my mind today??’ Thanks for the link!
- bj-rn 2y agoSpectral.js might also be interesting. It comes with a GLSL implementation of Kubelka-Munk and is MIT. https://github.com/rvanwijnen/spectral.js https://github.com/rvanwijnen/spectral.js
- popalchemist 2y agoHow difficult would it be to prevent the ink from disappearing? Any tips would be appreciated, I'd love to integrate this into a drawing app.
- tlarkworthy 2y agovery easy, its a free parameter in the simulation see the "Ink dissipation" slider, you can set it to > 1 for some weird effects.
- lgas 2y agoNo such slider on mine. (https://i.imgur.com/m1tODYK.png https://i.imgur.com/m1tODYK.png)
- tlarkworthy 2y agoyou are looking at the wrong app https://observablehq.com/@tomlarkworthy/ink https://observablehq.com/@tomlarkworthy/ink
- lgas 2y agoAh, thanks.
- SiggyF 2y agoYou could consider changing your ink to CMYK colors: `mutable ink = [255, 0, 255]`.