GodotOceanWaves  by 2Retr0

Godot module for FFT-based ocean wave rendering

Created 1 year ago
2,494 stars

Top 18.7% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides an FFT-based ocean rendering system for the Godot Engine, targeting game developers and visual effects artists. It offers a physically-based approach to simulating realistic open ocean waves, allowing for real-time parameter control and a wide variety of ocean environments.

How It Works

The system simulates ocean waves using the inverse Fourier transform of directional ocean-wave spectra, a method that offers greater control and scalability than traditional Gerstner waves for complex open-ocean surfaces. It leverages a custom GPU compute shader pipeline implementing the Stockham FFT algorithm for efficient computation. The lighting model is based on the 'Atlas' GDC talk, using GGX for microfacet distribution and incorporating sea foam generation based on wave Jacobian and sea spray particles.

Quick Start & Requirements

  • Install: Download the project files and integrate into a Godot project.
  • Prerequisites: Godot Engine (version not specified, but likely 3.x or 4.x based on RenderingDevice usage).
  • Resources: Requires a GPU capable of running compute shaders.

Highlighted Details

  • FFT-based wave generation for realistic open-ocean surfaces.
  • Physically-based lighting model with GGX distribution and custom normal/foam map sampling.
  • Tessendorf-based sea foam generation and particle-based sea spray simulation.
  • TMA spectrum and mixed directional spread functions for wave spectra, tunable via wind speed, depth, and fetch.
  • Wave cascades for tiling artifact reduction and dynamic parameter adjustment.
  • Load balancing for wave updates to smooth performance.

Maintenance & Community

  • The project is a personal experiment by 2Retr0.
  • References include academic papers and GDC talks, indicating a strong theoretical foundation.
  • Uses OTFFT DIT Stockham Algorithm (MIT License).

Licensing & Compatibility

  • MIT License for the OTFFT DIT Stockham Algorithm.
  • CC0 1.0 license for "Evening Road 01 (Pure Sky)" asset.
  • The primary project license is not explicitly stated in the README, but the use of MIT and CC0 suggests a permissive stance. Compatibility with commercial projects is likely, but requires confirmation of the main project license.

Limitations & Caveats

The README mentions that the automatic offsetting of cascade start times to avoid interference "might not work lol," suggesting potential issues with wave layering. The sea spray particle system's density is limited by particle distribution, and increasing particle count yields diminishing returns.

Health Check
Last Commit

4 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
35 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.