Features include:
- GPGPU-accelerated waves using CUDA or OpenCL on systems that support it
- Highly optimized multi-core FFT algorithms for systems without GPGPU capabilities
- Thousands of waves simulated at once using inverse Fast-Fourier Transforms
- Accurate wave conditions for given wind conditions or Beaufort scales
- Foam and particle-based spray effects
- Ship wakes with 3D Kelvin wakes and propeller backwash effects
- Height and normal queries for the water surface
- Integration with Unity cubemaps for environmental reflections
- Fresnel refractions for deep water
- Variable depth effects
The biggest challenge in developing Triton was taking advantage of whatever parallel computing resources might be available on the end user's system. NVidia users are best served with CUDA, ATI users with OpenCL, and for everyone else we use Intel's Integrated Performance Primitives to maximize use of multi-core CPU's. These technologies power the Fast-Fourier Transforms at the heart of our wave simulations, and abstracting, testing, and optimizing them all took quite a bit of effort. But, it was worthwhile - Triton takes full advantage of any system it's on, as a result.
Integrating Triton into Unity Pro presented a few challenges, as native rendering from plugins is something Unity has only recently started to support. Integrating with environmental cube maps from Unity to power water reflections in Triton was especially tricky, as passing texture handles to plugins is only supported with OpenGL in Unity. In the end, we found an efficient way to transfer the actual texture data across and create our own textures on the native side to work around the issue.
Feedback welcome, of course!
-Frank Kane
Sundog Software, LLC
Click here to view the iotd