shown in other instead.
A Global Water is another object that significantly affects the performance. Despite it is optimized so that the GPU is not overloaded, it still may require some additional optimizations.
Setting Up Water Tessellation#
The Engine performs quad tessellation of the water surface. However, not the whole water surface is tessellated: only the inner part of the water that is always under the camera is. Tessellation that is set up properly allows you to increase the performance.
To specify the size of the water grid under the camera that should be tessellated, use the Tessellation Distance parameter. It can be found in the Parameters tab of the Materials Editor. Increasing the tessellation distance leads to decreasing the performance, so try to find the proper value.
There is also the Max Tessellation Factor parameter that allows specifying maximum subdivision of each tessellation patch. The higher the value, the more the number of rendered polygons, and, therefore, the lower the performance is.
The Max Tessellation Factor is used together with the Tessellation Exponent parameter that specifies the rate of decrementing the tessellation factor: i.e. how fast the tessellation will fades from the center point of inner water to outer. Increasing this value allows you to improve the performance as well.
Optimizing Planar Reflections#
The water_global_base allows you to use planar reflections on the water surface.
However, planar reflections of a high resolution may significantly reduce the performance. So, you can try to lower the size of the planar reflection map: in the States tab of the Materials Editor, specify the appropriate value for the Map Size parameter.
However, remember that reflections of a low resolution rarely provide the expected visual result.
You can also use reflection mask to control rendering of the planar reflections into the camera viewport. For example, you can render only certain planar reflections, and the other ones replace with screen space reflections.
Optimizing Screen Space Reflections#
For the water object, the screen space reflections can be rendered instead of the planar reflections at large distances. It improves the performance, as such reflections don't depend on complexity of the reflected geometry.
You can enable the SSR effect for the water object in one of the following ways:
- In the Menu Bar, choose Rendering -> Water -> SSR.
- In the Menu Bar, choose Windows -> Settings and then go to the Water section. Here you can toggle the SSR Enabled parameter on.
However, remember that these settings affect the performance as follows:
- The higher the quality of the reflections, the lower the performance is.
- Enabling the increased accuracy reduces the performance. However, some visual artifacts are reduced as well.
Rendering Lights on Water#
You can disable rendering of the all light sources of the certain type on the water surface to increase the performance.
- Render Environment Probes toggles on/off rendering of all environment probes on the water surface.
- Render Voxel Probes toggles on/off rendering of all voxel probes on the water surface.
- Render Lights toggles on/off rendering of all omni and projected light sources on the water surface.
Optimizing Field Objects#
If interaction of water with FieldHeight and/or FieldShoreline objects is enabled in the global water material, you can affect the performance by setting up the resolution of the Field Height and Field Shoreline textures in the Settings window: the higher the resolution, the lower the performance is.
Another fields-related setting is Field Precision 32 bits. It allows reducing the precision of textures used for field objects, therefore, increasing the performance.
Setting Up Shoreline Rendering#
The shoreline areas created with the FieldShoreline object may reduce the water performance if set up improperly. The water_global_base material provides several shoreline-related states that can help to gain the performance.
The Normal and Geometry states affect rendering of wave geometry of shoreline waves. Disable them, when the waves are hardly noticeable (e.g., if the shoreline is observed from above only). In some cases, using only the Geometry state is enough to simulate distortion of the water surface.
If both states are disabled, disable also the High Precision state that allows improving interpolation between the adjacent pixels of the shoreline texture. This state reduces stepping artifacts that are noticeable at the waterline separating overwater and underwater. However, if rendering of the wave geometry is disabled for the shoreline waves, there is no need in such additional calculations.
As it was noticed above, rendering of the waves geometry is usually disabled when the water surface is observed from above. Therefore, you can disable the Caustic Distortion state that smooths caustics. It will gain the performance without visual losses.
Another state that also affects the performance is Foam. It enables foam rendering for shoreline zones. If the foam simulation isn't necessary, disable the state to increase the performance.
Thus, you can simulate shoreline areas, viewed from a plane, by just enabling the foam effect while disabling geometry, caustics and improved interpolation as they are hardly noticeable with a significant increase of performance.
As you can see, there is almost no visual difference between shorelines on the pictures above.
Other Water Optimizations#
Setting Up Water Material States#
The water_global_base material provides several states that can also affect the water performance:
- Choppy Waves creates waves with sharp crests. The waves look more realistic, however, you can disable this state if the water is observed from the large distance.
- Underwater DOF provides the DOF effect for underwater and overwater splice. It can also be disabled, if the camera never gets under the water.
- Caustics enables rendering of light rays refracted by the water surface. It can be disabled, if the effect isn't required.
- Caustics Distortion smooths caustics. It is available only when the Caustics is enabled for the water. If smoothing isn't required, the state can be disabled to gain the performance.
The states are available in the States tab of the Materials Editor.
Adjusting Water Rendering Settings#
The Anisotropy Quality parameter specifies the anisotropy level (degree of anisotropic filtering) of the water textures. Increasing the quality provides better texture detail over a distance, however, it has a great impact on the performance. So, find the most appropriate value to keep the balance of the visual quality and the performance.
The Refraction Quality parameter specifies the quality of water refraction: the higher the quality, the lower the performance is.
The wetness effect enabled for objects near the shoreline may also affect the performance. Try to disable it, if possible, to improve the performance of water rendering.
Rendering of the underwater shafts can be disabled if the camera never gets under the water.