michaelbrusegard / WebGL-Fluid-Enhanced

WebGL Fluid Simulation for modern webpages (works even on mobile).
https://webgl-fluid-enhanced.michaelbrusegard.com
MIT License
45 stars 8 forks source link

Make it look like water #9

Closed mak33v closed 8 months ago

mak33v commented 8 months ago

Hello. I'm trying unsuccessfully to make it look like water, maybe someone has some experience in this direction. Thanks a lot for any help.

michaelbrusegard commented 8 months ago

So you can't make it look exactly like water. By messing around in the config I found some settings which I personally feel behave and feel like water, but how much is difficult to say. It will never be exactly like in real life.

Here is a screenshot: fluid

This is the config I used:

const config = {
  DENSITY_DISSIPATION: 0.5,
  VELOCITY_DISSIPATION: 0,
  PRESSURE: 0.7,
  CURL: 5,
  COLOR_PALETTE: ["#00FFFF","#00DBFF","#10A5F5","#0C71E0","#0859C6"],
  BLOOM: false,
};

Good luck.

michaelbrusegard commented 1 day ago

https://webgl-fluid-enhanced.michaelbrusegard.com/docs/examples/water