Get the top HN stories in your inbox every day.
tlarkworthy
doctorhandshake
This 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
Have 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.
bj-rn
Spectral.js might also be interesting. It comes with a GLSL implementation of Kubelka-Munk and is MIT.
doctorhandshake
Wild! Just saw that at the top of the front page and thought ‘dang is HN reading my mind today??’
Thanks for the link!
tlarkworthy
oh wow, they have the fluid demo too!!! Thats so much better!
popalchemist
How 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
very easy, its a free parameter in the simulation see the "Ink dissipation" slider, you can set it to > 1 for some weird effects.
lgas
No such slider on mine. (https://i.imgur.com/m1tODYK.png)
SiggyF
You could consider changing your ink to CMYK colors: `mutable ink = [255, 0, 255]`.
jcims
I don't know why but I always find these high resolution physics simulations/eye candy to the thing that really blows my mind about how much processing is done inside of a cpu/gpu. I watched a two minute short earlier today from the cockpit of a plane declaring an emergency and needing to take a runway at an airport and it wasn't until right at the end that I realized the video wasn't real...it was from a simulator or video game of some kind. Yet still seeing swirly colors on a screen still is what does it for me.
Weird.
Mossly
I'll always have a soft spot for this earlier implementation which at lower resolutions has a kind of cyberpunk netrunner aesthetic, and at higher resolutions an almost ethereal ghostlike quality: https://haxiomic.github.io/projects/webgl-fluid-and-particle...
Mossly
hey there's even a comment from 2020 where the creator of that project talks about this project, neat! I always wondered if they were connected in some way or independent applications of the same underlying premise: https://news.ycombinator.com/item?id=24065857
sujayakar
I love playing with it at UltraHigh quality and 1 solver iterations. It reminds me of gradually incorporating one ingredient into another when cooking: like incorporating flour into eggs when making pasta.
klener
Does anyone know of more examples of water simulations in WebGL? I’m looking for ways to implement waves with foam.
I love Evan’s Pool demo. https://madebyevan.com/webgl-water/
hirako2000
Was reading somewhere that one isn't a simulation. Rather super clever tricks to make it look like water, swimming pool, a thing in it.
dtgriscom
You're right. Move the ball so it's half-immersed, wait for the water to settle, and then cause a single ripple. The ripple will propagate past the ball, coming out the other side with no diffraction.
Still very, very cool.
swazzy
Sebastian Lague recently created a related video for those interested in rendering fluids: https://www.youtube.com/watch?v=kOkfC5fLfgE
jedimastert
Lague's videos have been consistently incredible and inspiring. Highly recommend for anyone interested in the space
omoikane
oimo.io also has a few WebGL fluid simuations, via this thread:
https://news.ycombinator.com/item?id=37026592 - Water (2023-08-06, 133 comments)
brundolf
I think this actually produces HDR on my iPhone 15 Pro, which really makes it pop because not a lot of things do
Very cool!
geek_at
It looks really nice and is very smooth.. But a subscription for a fluid dynamic app, really?
jonplackett
They gave you a free web version. So if they want to try and do a subscription of charge $30 for a one off purchase I think that’s up to them. I’m curious if anyone will ever buy a subscription or spend $30 though.
tlarkworthy
I tried it as a background on Android but it killed my battery within hours so I stopped. Shame, its so cool.
Workaccount2
People will fall over themselves to attach a subscription to anything. Pure cancer if you ask me.
naich
The first time I've actually appreciated my laptop's touch screen.
Falimonda
This reminds me of Plasma Pong!
It would be a shame if you implemented a free online version of it ;)
Edd314159
This reminded me of a game but I couldn’t remember which one. I opened this comment thread hoping someone would know, and you delivered. Thank you!
chamomeal
Plasma pong was AMAZING thanks for unlocking that memory!!
jeffhuys
Oh wow yeah!
MPSimmons
I have an HDR monitor and OMG it's so bright it's almost painful. So beautiful!
exodust
I don't think this demo uses your monitor's HDR. You can test by pausing the simulation, then paint your whole screen with the pointer. Your screen is now all white. Compare brightness with a regular white page, it's the same brightness.
I have an OLED display too. SDR content looks really good on OLED displays because of the incredible contrast. It might appear HDR but is SDR.
keepamovin
If I stir a cup (or even a rectangle) of water, it will start swirling. Why does this not swirl? Local chaos, dissipates quickly, bulk flow does not sustain.
block_dagger
Swirls on my phone.
keepamovin
I tried phone, similar. I guess it kind of does keep rotating, but you can’t see it. Colors fade faster than flow.
If you dab a finger in the stream at right angles to the flow you made, the splash flows the expected way, but maybe slower than water.
It would be good to visualize any flow. And also to respond to device orientation so you can feed the resonance :)
Get the top HN stories in your inbox every day.
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