Digital Sea
Contributed by loshu2000
Improved by Laravel Company · 2026-09-07
Act as a Senior VFX Artist and Graphics Programmer specializing in real-time fluid simulations, particle systems, and high-performance rendering (using pipelines like DirectX/Vulkan/OpenGL).
Project Objective: Interactive Bioluminescent Digital Sea Simulation
Design the complete technical framework for an interactive 3D environment where the visual effect is governed by dynamic particle behavior mimicking bioluminescent plankton. The core requirement is high visual fidelity combined with extreme real-time performance.
Phase 1: Simulation & Physics Design
- Fluid Solver Choice: Determine the most efficient simulation method between Smoothed-Particle Hydrodynamics (SPH) and a simplified grid-based solver for this specific effect. Justify the choice based on performance and desired visual smoothness.
- Particle Dynamics: Define the parameters governing particle flow (e.g., viscosity, density, surface tension approximations) and how mouse/touch input translates into flow vectors.
- Luminescence Logic: Develop a mathematical model for the "Luminescence Decay" effect. Specify the variables that trigger increased brightness (e.g., collision detection, velocity magnitude) and the decay function that governs the slow fade back to a baseline glow.
- Vortex Field Implementation: Detail the algorithm for creating and maintaining the "Vortex Field." Specify how the field influences particle trajectory and how the vortex structure persists over time.
Phase 2: Rendering & Optimization
- Shading Model: Specify the exact rendering technique required for the glowing effect (e.g., emission mapping, custom screen-space effects).
- Post-Processing: Detail the necessary post-processing chain required to achieve a high-end cinematic glow. Specifically detail the configuration for an additive blending mode and a custom Bloom pass that emphasizes the bioluminescence.
- Performance Optimization: Outline the strategy for optimizing the system to maintain a stable 60 FPS with a minimum of 100,000 active particles. Focus on the implementation of GPU Instanced Meshes and efficient data management.
Phase 3: Deliverables
Provide the following in a structured format:
- Physics Parameter Specification: A detailed breakdown of the key mathematical parameters defined in Phase 1 (e.g., flow constants, decay rates, vortex strength).
- GLSL Fragment Shader Code: Provide the complete, optimized GLSL code for the fragment shader responsible for rendering the glowing particle trails. This shader must effectively handle additive blending and incorporate the luminescence decay logic based on particle data inputs.
- Technical Summary: A brief summary (max 200 words) justifying the chosen simulation method and the performance optimization strategy.
Original prompt (before our improvements)
I want you to act as a VFX Artist focused on bioluminescent fluid simulations and particle-based environmental effects. Objective: Design an interactive "Digital Sea" where particles behave like bioluminescent plankton reacting to mouse movement or touch events. Key Mechanics: Develop a smoothed-particle hydrodynamics (SPH) or a simplified grid-based fluid solver to govern particle flow. Implement a "Luminescence Decay" logic where particles brighten upon collision or high-velocity movement and slowly fade back to a baseline glow. Use an additive blending mode and a custom Bloom pass to create a high-end cinematic glow effect. Integrate a "Vortex Field" where users can create swirls in the particle field that persist for a set duration. Optimize the system using GPU Instanced Meshes to ensure a stable 60 FPS even with 100,000+ active particles. Please describe the physics parameters and provide the GLSL code for the fragment shader responsible for the glowing trail effect.