Skip to content

Galaxy simulation v2.0

Latest

Choose a tag to compare

@N0rvel N0rvel released this 12 Jul 15:49
7e4a65d

Galaxym - Gas simulation, complete rendering overhaul, and a new onboarding experience

🌌 Simulation & physics

  • Sticky gas: a configurable fraction of particles behaves like gas with pressure and short-range cohesion - spiral arms form and persist in a much more realistic way.
  • Dark matter halo (Einasto profile): applied as an analytical potential in the compute shader through a precomputed enclosed mass table (256×1 texture) - flat rotation curves without additional particles.
  • Realistic disk generation: exponential surface density, circular velocities measured by Monte Carlo summation on the disk itself (using the same force law as the shader), plus Gaussian dispersion - the disk starts almost relaxed.
  • Real physical units throughout the entire configuration: gravity in ×G, time in Myr/s, radii in kly/Mly, black hole mass in 10⁶ M☉ - presets are written using the units displayed by the sliders.

🎨 Rendering

  • Volumetric gas layer (inspired by OpenSPH's VolumeRenderer): each gas particle is a splat whose radius expands according to its number of neighbors; per-particle emission is preserved, and the screen brightness follows the actual gas mass. Rendered into a dedicated HDR target, then composited below the star layer.
  • HDR post-processing pipeline: half-float accumulation, Reinhard tone mapping based on luminance (colors no longer clip to white), bloom, and motion blur through a blend pass.
  • Space environment: decorative starfield and skybox independent from the GPGPU simulation.

🖥 Interface

  • New custom control panel (dat.gui removed): tabs for Settings / Simulation / Graphics, collapsible "Advanced" sections, action buttons always visible, and UI state preserved between rebuilds.
  • Settings persistence (localStorage) with a clean reset.

✨ "Liquid glass" landing page

  • One-page scrolling homepage over a fullscreen video: hero section with parallax, panels revealed while scrolling, and mode selection.
  • WebGL2 refractive glass effect: each surface (buttons, title) refracts the video along its edges (rounded rectangle SDF + chromatic aberration), rendered in a shared GPU atlas - no SVG filters, no CPU readback.
    Glass text: the glyphs themselves become the refractive surface.

🔊 Audio

  • Looping ambient sound when launching the simulation, with persistent mute support.