In scenarios where a GPU is not present, such as headless servers, a CPU option is available.
To use this feature, select a Shape FFT component that is generating the waves in a scene and enable Enable Baked Collision.
Configure the properties under the “Collision Baking Heading”. Also set the Time Loop Length on the Shape FFT component.
Next click Bake To Asset And Set To Current and select a path and filename for the result. After the bake completes Water Renderer will be configured to use this data.
Changing Wave Conditions¶
Added in version 1.1.0.
Multiple ShapeFFT components can be used to contribute to global wave conditions. Using the Weight property is the correct way to do this, for example:
class WaveBlend : MonoBehaviour
{
public ShapeFFT _CalmWaves;
public ShapeFFT _RoughWaves;
[Range(0, 1)]
public float _Lerp;
void Update()
{
_CalmWaves.Weight = _Lerp;
_RoughWaves.Weight = 1f - _Lerp;
}
}
Limitations¶
There are currently a few key limitations of this approach:
Properties like Wind Speed cannot be changed at runtime. Weight must be used to blend multiple wave conditions together
Wave Attenuation (like from Depth Probe) is not supported. In order to get a one-to-one match between the visuals and the collision data, it should not be used.
The Water Level simulation is not supported. CPU queries assumes a fixed sea level for the whole scene.