This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

水优化

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. Global Water是另一个会严重影响性能的对象。尽管已对其进行了优化,以确保GPU不会过载,但仍可能需要进行一些其他优化。

注意
It is recommended to use only 1 global water object (ObjectWaterGlobal) in the scene, as it uses the screen space projected grid for the water surface.建议在场景中仅使用 1 个全局水对象 (ObjectWaterGlobal),因为它在水表面使用了屏幕空间投影网格

Optimizing Rendering Settings
优化渲染设置#

There is also a set of water rendering settings that may also reduce the performance. They can be found in the Water section of the Settings window.还有一组水渲染设置,这些设置也可能会降低性能。可以在Settings窗口的Water部分中找到它们。

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:您可以通过以下方式之一为水对象启用SSR效果:

  • In the Menu Bar, choose Rendering -> Water -> SSR.在菜单栏中,选择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.在菜单栏中,选择Windows -> Settings,然后转到Water部分。在这里,您可以启用 SSR Enabled 参数。

In the Settings window, you can also specify the additional settings for SSR: set the quality of reflections and enable/disable increased accuracy.“设置” 窗口中,您还可以指定SSR的其他设置:设置反射的质量并启用/禁用提高的准确性

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 all the light sources of the certain type on the water surface to increase the performance.您可以禁用在水面上渲染某种类型的所有光源以提高性能。

注意
To enable/disable rendering of a particular light source on the water, select it in the World Hierarchy, go to the type-specific tab of the Parameters window and check/uncheck the Render Water parameter.要启用/禁用特定光源在水上的渲染,请在“世界层次结构”中选择它,转到Parameters窗口的 type-specific 标签,然后选中/取消选中Render Water参数。
  • Render Environment Probes toggles on/off rendering of all environment probes on the water surface.

    Render Environment Probes 打开/关闭水面上所有环境探针的渲染。

  • Render Voxel Probes toggles on/off rendering of all voxel probes on the water surface.

    Render Voxel Probes 打开/关闭水面上所有体素探针的渲染。

  • Render Lights toggles on/off rendering of all omni and projected light sources on the water surface.

    Render Lights 打开/关闭水面上所有全向和投影光源的渲染。

Anisotropy Quality
各向异性质量#

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. Anisotropy Quality参数指定水纹理的各向异性级别(各向异性过滤的程度)。提高质量可以在一定距离上提供更好的纹理细节,但是,这对性能有很大的影响。因此,找到最合适的值以保持视觉质量和性能之间的平衡。

Refraction Quality
Refraction Quality#

The Refraction Quality parameter specifies the quality of water refraction: the higher the quality, the lower the performance is. Refraction Quality参数指定水的折射质量:较高质量,较低性能。

Shoreline Wetness
Shoreline Wetness#

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.为海岸线附近的对象启用的潮湿效果也可能会影响性能。如果可能的话,请尝试禁用它以提高水渲染的性能。

Underwater Shafts
Underwater Shafts#

Rendering of the underwater shafts can be disabled if the camera never gets under the water.如果照相机永远不会在水下,则可以禁用水下竖井的渲染。

Field Objects
Field 对象#

If interaction of water with FieldHeight and/or FieldShoreline objects is enabled in the Global Water parameters, 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.如果在 Global Water 参数 中启用了水与FieldHeight和/或FieldShoreline对象的交互,则可以通过设置 resolution Field Height and Field HeightSettings window: the 较高分辨率,较低性能。

Another fields-related setting is Field Precision 32 bits. It allows reducing the precision of textures used for field objects, therefore, increasing the performance.另一个与字段相关的设置是Field Precision 32 bits。它会降低用于野外对象的纹理的精度,从而提高性能。

Setting Up Shoreline Rendering
设置海岸线渲染#

The shoreline areas created with the Field Shoreline object may reduce the water performance if set up improperly. Global Water provides several shoreline-related parameters that can help to gain the performance.如果设置不正确,用 Field Shoreline 对象创建的海岸线区域可能会降低水的性能。Global Water 提供了几个与海岸线相关的选项,可以帮助获得性能。

The Normal and Geometry options 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 option is enough to simulate distortion of the water surface. NormalGeometry选项会影响海岸线波浪的几何形状渲染。当海浪几乎不可见时(例如,仅从上方观察海岸线时),请禁用它们。在某些情况下,仅使用Geometry选项足以模拟水面的变形。

If both options are disabled, disable also the High Precision option that allows improving interpolation between the adjacent pixels of the shoreline texture. This option 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.如果两个选项都被禁用,则也禁用High Precision选项,该选项可以改善海岸线纹理的相邻像素之间的插值。这种选项减少了在分离水上和水下的水线处明显的踩踏伪影。但是,如果对海岸线波浪禁用了波浪几何图形渲染,则无需进行此类额外计算。

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 Caustics Distortion option that smooths caustics. It will gain the performance without visual losses.如上所述,当从上方观察水面时,通常无法渲染波浪的几何形状。因此,您可以禁用平滑焦散的Caustic Distortion选项。它将获得无视觉损失的性能。

注意
You can disable the caustic distortion in any other case, if necessary.如有必要,可以在任何其他情况下禁用苛刻的失真。

Another option that also affects the performance is Foam. It enables foam rendering for shoreline zones. If the foam simulation isn't necessary, disable the option to increase the performance.另一个也会影响性能的选项是Foam。它可以为海岸线区域提供泡沫。如果不需要泡沫模拟,请禁用该选项以提高性能。

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.如您所见,上图的海岸线之间几乎没有视觉差异。

Setting Up Water Parameters
设置水参数#

The Global Water provides several parameters that can also affect the water performance:Global Water提供了几个参数,也可以影响水性能:

  • Steepness Scale affects the sharpness of the wave crests. The waves look more realistic, however, you can disable this effect if the water is observed from the large distance. Steepness Scale响波浪的锐度。波浪看起来更逼真,但是,如果从远处观察到水,则可以禁用此效果。
  • Underwater DOF provides the DOF effect for underwater and overwater splice. It can also be disabled, if the camera never gets under the water. Underwater DOF为水下和水下拼接提供自由度效果。如果相机永远不会掉入水下,也可以将其禁用。
  • Caustics enables rendering of light rays refracted by the water surface. It can be disabled, if the effect isn't required. Caustics可以渲染水面折射的光线。如果不需要效果,可以将其禁用。
  • Caustics Distortion smooths caustics. It is available only when the Caustics is enabled for the water. If smoothing isn't required, the option can be disabled to gain the performance. Caustics Distortion消除焦散。仅在为水启用Caustics时可用。如果不需要平滑,则可以禁用该选项以获得性能。

Optimizing Planar Reflections
优化平面反射#

The Global Water object allows you to use planar reflections on the water surface. Global Water对象允许您在水表面上使用平面反射

注意
It is recommended to use planar reflections on undisturbed water (0-2 Beaufort).建议在不受干扰的水(0-2 Beaufort)上使用平面反射。

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 Planar Reflection section of the Parameters, specify the appropriate value for the Map Size.但是,高分辨率的平面反射可能会大大降低性能。因此,您可以尝试减小平面反射贴图的大小:在 Parameters 的平面 Planar Reflection,为Map Size参数指定适当的值。

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.您还可以使用反射蒙版来控制将平面反射渲染到摄影机视口中。例如,您可以仅渲染某些平面反射,而其他区域则替换为屏幕空间反射

最新更新: 2024-07-12
Build: ()