This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
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

纹理优化

Textures are often the most frequently used and the most memory-consuming assets. Big projects with a huge number of assets have to face the optimization stage to improve performance and have acceptable FPS.纹理通常是最常用和最消耗内存的资源。拥有大量资源的大型项目必须面临优化阶段以提高性能并具有可接受的 FPS。

An overview of the project's bottlenecks is given by Performance Profiler. By using the Rendering Performance Profiler, you can estimate the amount of video memory consumed by textures.项目瓶颈的概述如下性能分析器.通过使用Rendering Performance Profiler ,您可以估计纹理消耗的视频内存量。

The output of Rendering Profiler渲染分析器的输出

Adjust the global Textures Settings to quickly choose the desired Quality or Maximum Resolution of all textures in the project and thus decrease the video memory consumption. Mipmaps of lower resolution are used for rendering textures of lower quality.调整全局纹理设置快速选择项目中所有纹理的所需质量最大分辨率,从而减少视频内存消耗。较低分辨率的 Mipmap 用于渲染较低质量的纹理。

Asynchronous Streaming异步流#

Asynchronous Data Streaming of graphic resources ensures smooth loading of textures without spikes and other impacts on performance at first moments of run time. Make sure it is enabled for your worlds with a massive number of textures that certainly do not fit into video memory.异步数据流图形资源确保平滑加载纹理,在运行时的最初时刻不会出现峰值和其他对性能的影响。确保它为您的世界启用了大量纹理,这些纹理肯定不适合视频内存。

To make sure the video memory budget is not exceeded, there is a memory limit that controls freeing unnecessary resources. This limit is available in the Rendering Profiler as the second value of the VRAM Textures (after the slash). Please note that this setting is just a recommendation for the engine, and the specified memory limit can be exceeded if textures are required to render the current frame.为确保不超过视频内存预算,Memory Limits 控制释放不必要的资源。相应的纹理的内存限制Rendering Profiler中作为 Textures Limit 值可用。请注意,此设置只是对引擎的建议,如果需要纹理来渲染当前帧,则可以超出指定的内存限制。

Setting a low memory limit for textures is not reasonable as in this case, textures will be constantly reloaded from the disk storage, affecting the performance.为纹理设置较低的内存限制是不合理的,因为在这种情况下,纹理会不断地从磁盘存储中重新加载,从而影响性能。

Texture Cache used for rendering when full-size textures are being loaded also occupies video memory. Although it usually takes very little space, consider lowering the resolution and, therefore, the size of cached textures to gain more free memory.纹理缓存用于在加载全尺寸纹理时进行渲染也会占用视频内存。虽然它通常占用很少的空间,但请考虑降低分辨率,从而降低缓存纹理的大小以获得更多可用内存。

Texture Formats纹理格式#

You can control each texture asset in its Import Parameters.您可以控制其中的每个纹理资源导入参数.

It is usually inappropriate to use textures with the Unchanged option enabled unless they have the *.dds or *.texture format. Otherwise, compression may affect the color data a lot (like with custom hdri textures).通常不适合使用启用了 Unchanged 选项的纹理,除非它们具有 *.dds*.texture 格式。否则,压缩可能会对颜色数据产生很大影响(例如使用自定义 hdri 纹理)。

It is crucial to use the correct Texture Preset for every texture, depending on its applicability. Thus, you ensure to use only needed channels and apply a proper compression algorithm. If the list does not provide a required preset, you can select the Custom option and choose the needed options.使用正确的方法很重要纹理预设对于每种纹理,取决于其适用性。因此,您确保只使用需要的通道并应用适当的压缩算法。如果列表未提供所需的预设,您可以选择 Custom 选项并选择所需的选项。

You can also manually select the desired resolution of the texture in the Import Options.您也可以手动选择所需的纹理分辨率导入选项.

Texture ProfilerTexture Profiler#

To clearly understand which assets can be optimized or deleted, Texture Profiler is used. Using this tool, you can see how much memory every texture used in the project takes, easily find it in Asset Browser, and delete or resize it.为了清楚地了解可以优化或删除哪些资源,使用了 Texture Profiler。使用此工具,您可以查看项目中使用的每个纹理占用了多少内存,在 Asset Browser 中轻松找到它,并删除或调整它的大小。

To open the Texture Profiler window, choose Tools -> Content Profiler on the Menu Bar of UnigineEditor and switch to the Textures tab. By using the Location switch, you can choose to inspect the textures either from the entire video memory or only the ones displayed in the Editor viewport at the moment.要打开 Texture Profiler 窗口,请在 UnigineEditor 的菜单栏上选择 Tools -> Content Profiler 并切换到 Textures 选项卡。通过使用 Location 开关,您可以选择从整个视频内存中检查纹理,所有仅显示在编辑器视口中的纹理。

Texture Profiler allows sorting by path, extension, occupied RAM or Video Memory size, format, or resolution.Texture Profiler 允许按路径、扩展名、占用的 RAM 或显存大小、格式或分辨率进行排序。

最新更新: 2023-06-21
Build: ()