Log inGet started
← Explore

Slosh

SPH fluid tech demo: pour runny water and thick goo between vessels on a tabletop. GPU compute solver, grab-and-tilt pouring, live viscosity/cohesion sliders.

World media
About this world

Slosh

A fluids tech demo — the joy is watching real fluid behave. An SPH particle fluid you pour between vessels on a tabletop, with two materials at a stark viscosity contrast:

  • Water — runny: low viscosity, splashes, flows fast, settles flat.
  • Goo — thick slime: high viscosity and cohesion, oozes, clumps, packs tight, spreads slowly.

Controls

  • LMB drag — grab the vessel under the cursor and carry it
  • Wheel while grabbing — tilt to pour
  • RMB — pour the selected material at the cursor (into a vessel if you aim at one)
  • 1 / 2 — select Water / Goo
  • MMB drag — orbit the table · wheel — zoom
  • R — reset table · G — toggle gravity · C — clear fluid · Esc — pause
  • Fill each vessel to its painted line with the requested material for a FILLED ✓ check; pure sandbox otherwise.

How it works

The solver is a weakly-compressible SPH with a Clavet-style near-pressure anti-clumping term, running entirely in GPU compute: four .computeShader passes per substep (uniform-grid clear, atomic binning, density + near-density, pressure/viscosity/cohesion forces with XSPH smoothing, semi-implicit integration and SDF collision against the table and four open-cup vessels with moving-boundary velocities). Four substeps per frame at dt = 1/240.

Rendering is two instanced entity pools (one per material) fed by an async GPU readback each frame. Vessel transforms are ordinary synced entities, so every peer's local sim sees the same pours. Sound is procedurally synthesized WAVs (watery glugs, goo squelches, drips) driven by live flow activity. Live HUD sliders expose viscosity, cohesion, and gravity so the water/goo contrast is tunable while you play.

Comments · 0

Open discussion — no rating attached. Ask questions, swap notes, follow threads.

Sign in to join the discussion.