尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Liquids for design, games, 3D and .NET. Water first: a pool on the GPU with the liquid's own viscosity, Caustikon's optics and ray-traced caustics; shaders for WebGL, Unity, Unreal and Godot.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Liquids for design, games, 3D and .NET. Water first.
A pool that moves on the GPU and is lit the way water is lit. The surface is the long-wave equation
with the liquid's own viscosity; the light through it is Caustikon's
optics for that liquid, one refractive index per colour channel and absorption from its measured k table;
the lamp's caustics on the floor come from refracted rays, not from a texture. Nine liquids, water to
carbon disulfide, each with its handbook density, viscosity and surface tension.檢視完整 README ↗Liquids for design, games, 3D and .NET. Water first.
A pool that moves on the GPU and is lit the way water is lit. The surface is the long-wave equation with the liquid's own viscosity; the light through it is Caustikon's optics for that liquid, one refractive index per colour channel and absorption from its measured k table; the lamp's caustics on the floor come from refracted rays, not from a texture. Nine liquids, water to carbon disulfide, each with its handbook density, viscosity and surface tension.
The site at https://undine.levvs.cc is the pool: touch it, change the liquid, take the shaders. The surface runs at the liquid's own ripple speed from its dispersion relation, the light is Caustikon's, and the caustics on the floor and walls are refracted rays.
| Path | What |
|---|---|
src/Undine | The .NET package: Liquid and Liquids, Surface (height field with viscous damping), LiquidOptics (indices, Fresnel, absorption from Caustikon), CausticMap. |
shaders/ | GLSL ES 3.00 for the spectral surface step (FFT pass, mode evolution, forces), the caustics and the pool render, for the shallow-water flow step and the table render, and for the particle liquid (the whole position-based scheme, and its screen-space rendering) (what the site runs); an HLSL file for Unity and Unreal; a Godot 4 shader. |
site/Undine.Site/ | The site: Blazor WebAssembly in the Caustikon format. The WebGL2 pool, the liquid table, one "Give Me!" page per craft with the numbers and the shaders. wwwroot/data/liquids.json is baked by tools/Undine.Bake. |
tests/ | What the physics must keep doing: water's index and its blue over metres, wave speed, a drop spreading, glycerol dying, a flat surface lighting the floor evenly and a ripple focusing it. |
external/caustikon | Caustikon as a submodule, the source of every optical number. |
git clone --recurse-submodules https://github.com/levvs-one/undine.git
dotnet build Undine.slnx -c Release
dotnet test --project tests/Undine.Tests/Undine.Tests.csproj -c Release -f net10.0
dotnet run --project tools/Undine.Bake -c Release # site/Undine.Site/wwwroot/data/liquids.json
using System.Numerics;
using Undine;
Liquid water = Liquids.Water; // optics from Caustikon, mechanics from the CRC Handbook
LiquidOptics optics = new(water);
Vector3 n = optics.IndexRgb; // 1.3327, 1.3347, 1.3387 at 610, 550, 465 nm
Vector3 tenMetres = optics.Transmittance(10); // what white becomes after ten metres: blue
Surface pool = new(cells: 256, sizeMetres: 4, depthMetres: 1.2, water);
pool.Disturb(xMetres: 2, yMetres: 2, radiusMetres: 0.05, amountMetres: -0.01); // a drop
pool.Step(1 / 60d); // substeps as stability requires
Vector3 normal = pool.NormalAt(128, 128);
CausticMap floor = new(256);
floor.Build(pool, optics, lightDirection: new Vector3(0.3f, -1f, 0.2f), raysPerSide: 512);
The surface is a height field: v += c²∇²h·dt + ν∇²v·dt, h += v·dt, with c = √(g·depth) and ν = η/ρ. The substep is bounded by both the wave and the diffusion stability limits. Light: exact Fresnel per channel, Snell's law per channel, Beer–Lambert absorption over the path, caustics by ray counting.
Not modelled yet: dispersive gravity–capillary waves (Liquid.PhaseSpeed gives the true phase speed,
the height field runs at one speed), breaking, splashes, foam, floating bodies, light reflected off
the floor back up through the surface. The next stages are viscous liquids on particles (oil, honey)
and slime as a viscoelastic material.
Optics: Caustikon's liquids, generated from the RefractiveIndex.INFO database (CC0 1.0), each with its citation. Mechanics: CRC Handbook of Chemistry and Physics, 97th ed., values at 20 °C, rounded.
MIT. Copyright (c) 2026 levvs-one.