< Back to Docs Home

Advanced Performance Optimizations

UIWS also includes a number of advanced performance optimization options that you can use per project or per platform if the need arises. These are detailed below.

UIWSWaterBody Details Panel


Disable Automatic Interaction
One of the most expensive GPU costs of UIWS is automatic interaction. This uses a well optimized scene capture method to capture all interactions using custom depth, at the water surface. While this is a cost effective method on higher end platforms, it can be a significant performance hit on platforms like Nintendo switch. I’ve exposed simple options to disable auto interaction globally for a body of water, or on a per platform basic. With these options checked you can still interact with water but only using the manual interaction functions via blueprint or c++.

Capture Res:
This is the resolution of the automatic interaction scene capture. You can experiment with lowering this value depending on your interaction distance, but this is already quite low so there probably won’t be too much wiggle room. (As a side note, higher resolutions actually lead to uglier looking ripples despite seeming counter intuitive).

Max Tile Scale:
Increase this value higher to decrease the number of ‘chunks’ a water body consists of.
The why behind this is a bit more long winded but I know some people would like to understand.
So, a water body is made of a number of ‘chunks’. By default each mesh chunk is 1000 units square.  When the water body is scaled up, it automatically subdivides the water body whenever it's chunks are going to be larger than 1000 * MaxTileScale.  This is so it keeps a reasonably uniform vertex density without tessellation. The chunking is required for efficient culling, as well as lodding down to opaque quads at distance etc.  This is an intermediary step towards my end goal of using a system much like the terrain component system found on landscapes.

Sim Res Min: When a water body isn’t currently the priority water body (ie, the one closest to the player currently) this is the resolution it’s simulation render targets render at. Lowering this will result in a less detailed sim but could improve your gpu simulation costs if you have a large number on water bodies in your scene.

Tie Sim to FPS: So that UIWS ripples aren’t framerate dependent, under the hood the ripple propagation works on a somewhat fixed time step. This can result in performing multiple simulation cycles per frame which isn’t a problem on most hardware, but on nintendo switch this is a worthwhile performance optimisation. A side effect of enabling this is if your framerate falls very low the ripples will appear to simulate in slow motion. If you’re operating at a reasonably steady or even locked frame-rate anyway, this setting makes alot of sense.