This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

从Unity迁移到UNIGINE

This section gives a brief overview of UNIGINE from a Unity user's perspective and provides basic information to help you transfer your Unity experience to UNIGINE.本节从Unity用户的角度简要概述了UNIGINE,并提供了基本信息,可帮助您将Unity的经验转移到UNIGINE。

注意
Please consider hardware requirements first.请首先考虑硬件要求

Quick Glossary快速词汇表#

This chapter matches common Unity software terms on the left and their UNIGINE equivalents (or rough equivalent) on the right. UNIGINE keywords are linked directly to related articles to provide you with more in-depth information.本章在左侧匹配常用的Unity软件术语,在右侧匹配其UNIGINE等效项(或粗略等效项)。 UNIGINE关键字直接链接到相关文章,以为您提供更深入的信息。

CategoryUnity softwareUNIGINE
Project and SDK managementHubSDK Browser
Editor UIHierarchy PanelWorld Nodes Hierarchy window
InspectorParameters window
Project BrowserAsset Browser window
Scene ViewEditor Viewport
SceneSceneWorld
Gameplay TypesComponentComponent System
GameObjectNode
PrefabNodeReference
MeshesMesh RendererStatic Mesh, Dynamic Mesh
Skinned Mesh RendererSkinned Mesh
BlendshapesMorph Targets
EffectsParticle SystemParticle System
HaloVolumetric Objects
Lens FlaresLens Flares
Billboard RendererBillboards
Projector / Decal Projector (HDRP)Decals
ExteriorsTerrainTerrain systems
Trees / GrassMesh Clutter, Grass, Vegetation Add-On
Wind ZonesAnimation Field
Game UIUIGUI
LightingLight SourcesLight Sources
EnvironmentEnvironment
LightmappingVoxel GI
Reflection ProbesEnvironment Probes
RenderingShaderBase Material
MaterialUser Material
Custom Shaders: HLSL, Shader GraphHLSL / GLSL / UUSL
Compute ShadersUUSL Compute Shaders
Rendering PathsRendering Sequence
Multi-Display RenderingMulti-Monitor Rendering plugins, Syncker Plugin for Multi-Node Rendering
ProgrammingC#C++ / C#
Scriptable Render Pipeline (URP / HDRP)Rendering Sequence if fully accessible from API / Scriptable Materials
PhysicsRaycastIntersections
Rigid BodyRigid Body
ColliderShape
JointJoint
ClothCloth Body
AnimationTimelineTracker
Navigation and PathfindingNavMesh, NavMeshAgent, Off-Mesh Link, NavMesh ObstacleNavigation Areas, Obstacles

Project and SDK Management项目和SDK管理#

As a Unity software user, you are accustomed to use Unity Hub — the application that streamlines the way you find, download and manage your projects and installations.作为Unity软件用户,您习惯于使用Unity Hub,该应用程序可简化查找,下载和管理项目及安装方式的方式。

UNIGINE SDK Browser is the first step to start working with UNIGINE Engine. This application enables you to manage your projects and installed SDKs, as well as gives you access to the samples and the knowledge base. UNIGINE SDK浏览器 是开始使用UNIGINE Engine的第一步。该应用程序使您可以管理项目和已安装的SDK,并可以访问示例和知识库。

Unity Hub和UNIGINE SDK浏览器比较 (点击放大)

Unity Hub和UNIGINE SDK浏览器比较

UNIGINE provides several programming workflows, to easily adapt your experience of scripting in Unity software, it is recommended to use C# Component System. Creating a project using this workflow in SDK Browser is done as follows:UNIGINE提供了几个编程工作流程,为轻松适应您在Unity软件中的脚本编写经验,建议使用 C#组件系统。使用SDK浏览器中的此工作流程创建项目的步骤如下:

  1. Click Create New in My Projects section单击My Projects部分中的Create New
  2. Among other options, choose C# (.NET 5) project type in the API + IDE field.在其他选项中,在API + IDE字段中选择C# (.NET 5)项目类型。
  3. If you want to make the project compatible with one of supported VR headsets, proceed to the Plugins section, check the required plugins in the Stereo 3D section and click Ok (more about VR-compatibility).如果要使项目与受支持的VR头戴式耳机之一兼容,请继续至Plugins部分,在Stereo 3D部分中检查所需的插件,然后单击确定(更多关于 VR兼容性)。
  4. Click Create New Project.单击Create New Project
  5. Upon completion, click Open Editor to run UnigineEditor.完成后,单击Open Editor以运行UnigineEditor。
注意
C# API section available in the Samples showcases traditional programming workflow in C#. For samples that use C# Component System, take a look at the Demos -> C# Component Samples.示例中的 C#API 部分展示了C#中的传统编程工作流程。对于使用 C#组件系统的示例,请看一下Demos -> C# Component Samples

Editor Interface编辑器界面#

Below you can see interfaces of Unity Editor and UnigineEditor. Interface elements in the images are color-coded to indicate common functionality. Each element has a label to show UNIGINE's equivalent. The layout of UnigineEditor is fully customizable by resizing, dragging and dropping the tabbed windows. UnigineEditor adopts a dark color scheme.在下面您可以看到Unity Editor和UnigineEditor的接口。图像中的界面元素采用颜色编码以指示常用功能。每个元素都有一个标签来显示UNIGINE的等效项。通过调整大小,拖放选项卡式窗口的大小,UnigineEditor的布局可以完全可自定义。 UnigineEditor采用深色方案。

Unity and UNIGINE Editor UI Comparison (click to enlarge)

Unity Editor and UnigineEditor UI ComparisonUnity编辑器和UnigineEditor UI比较

To learn more about the UnigineEditor interface, read this article.要了解有关UnigineEditor界面的更多信息,请阅读本文

Scene View场景检视#

You may find the Scene View and the Editor Viewport controls looking very much alike.您可能会发现Scene ViewEditor Viewport控件看起来非常相似。

Unity Scene View
UNIGINE Editor Viewport

You can use:您可以使用:

  • Camera panel to switch between cameras and configure the current one.Camera panel可以在摄像机之间切换并配置当前摄像机。
  • Rendering Debug to display the contents of rendering buffers the same way as using the Draw Mode in Unity Editor.Rendering Debug显示渲染缓冲区的内容,与在Unity Editor中使用Draw Mode相同。
  • Navigation panel to quickly set up and switch between camera speed presets and change the camera position.Navigation panel可快速设置并在摄像机速度预设之间切换并更改摄像机位置。

Navigation inside the Editor Viewport is pretty much the same as in Unity Scene View. However, get familiar with Scene Navigation so as not to miss details.Editor Viewport中的导航Unity Scene View中的几乎相同。但是,请熟悉场景导航,以免丢失细节。

Also, a set of global switchers is available in the top toolbar:另外,顶部的工具栏提供了一组全局切换器:

You can use as many Editor Viewports as you need.您可以根据需要将许多编辑器视口用作

Game View and Play Mode游戏查看和播放模式#

You are accustomed that Unity Editor has the Play mode inside the Game View which is rendered from the camera(s) in your scene, being representative of your final build.您习惯于Unity编辑器在Game View内部具有Play模式,该模式是从场景中的摄像机渲染的,表示您的最终构建。

In UNIGINE, the Play button is used to run an instance of the application in a separate window. You can switch between Play presets to change essential parameters of the play mode, such as VR Mode to enable compatibility with one of supported VR headsets, as an example.在UNIGINE中,Play按钮用于在单独的窗口中运行应用程序的实例。例如,您可以在Play预设之间切换以更改播放模式的基本参数,例如VR Mode以启用与受支持的VR耳机之一的兼容性。

By default, the mouse cursor is grabbed when clicked in the Play mode. There are two ways to setup default Input Bindings (key states and the mouse behaviour):默认情况下,在Play模式下单击时,鼠标光标将被抓住。有两种方法可以设置默认的输入绑定(键状态和鼠标行为):

注意
The Engine Viewport, the Game View's counterpart in UNIGINE used for debugging and profiling, is considered excessive for projects using C# .NET 5 programming workflow (however, it is still available for other workflows).对于使用C#.NET 5编程工作流程的项目,Engine Viewport(UNIGINE中用于调试和分析的Game View's副本)被认为过多(但是,其他工作流程仍可使用)。

Console安慰#

As well as Unity software, UNIGINE has the Console used for standard input, output and error logging. A set of console commands is provided.Unity软件外,UNIGINE还具有用于标准输入,输出和错误记录的控制台。提供了一组控制台命令

It is available both in UnigineEditor and a running application. To open the Console window in the Editor, go to Windows -> Console menu:它在UnigineEditor和正在运行的应用程序中均可用。要在编辑器中打开控制台窗口,请转到Windows -> Console菜单:

A built-in console is called by pressing the grave accent (`) key:按下grave accent (`)键可以调用内置控制台:

You can use it to print user messages from code.您可以使用它从代码中打印用户消息

Packing a Final Build for Publishing打包用于发布的最终版本#

You got used to building your projects via Unity Editor. In UNIGINE, packing a final build is also done via UnigineEditor.您习惯于通过Unity编辑器来构建项目。在UNIGINE中,打包最终版本也通过UnigineEditor完成。

Projects and Files项目和文件#

Directories and Files目录和文件#

A project in UNIGINE, just like a Unity project, is stored in its own folder, project settings are stored in the *.project file. There are various subfolders inside the project's folder, where your content and source files as well as various configuration files and binaries are stored. The most important are the data and source sub-folders.就像Unity项目一样,UNIGINE中的项目存储在其自己的文件夹中,项目设置存储在*.project文件中。项目文件夹中有多个子文件夹,其中存储了内容和源文件以及各种配置文件和二进制文件。最重要的是数据来源子文件夹。

In UNIGINE, each project has a data folder. Similar to a Unity project's Assets folder, this is where your project's assets are stored. To import assets into your project, simply drop files into your project's data directory and they will be automatically imported and appear in the Asset Browser. The assets in the editor will update automatically as you make changes to the files using an external program.在UNIGINE中,每个项目都有一个data文件夹。类似于Unity项目的Assets文件夹,这是项目资产的存储位置。要将资产导入项目,只需将文件拖放到项目的data目录中,它们就会被自动导入并显示在资产浏览器中。当您使用外部程序对文件进行更改时,编辑器中的资产将自动更新。

Relationship between the contents of the data folder in your project's root on your computer, and the Project folder in the Asset Browser window计算机上项目根目录中的data文件夹的内容与Asset Browser窗口中的Project文件夹之间的关系

Supported File Types支持的文件类型#

Unity software supports a wide range of file formats, while UNIGINE supports the most commonly used and some specific ones:Unity软件支持多种文件格式,而UNIGINE支持最常用的和某些特定的

资产类型 支持的格式
几何 .fbx, .obj, .3ds, .dae, .glb/.gltf, .stp/.step, .igs/.iges, .brep, .stl
贴图 .png, .jpeg, .tif, .tga, .rgba, .psd, .hdr, .dds, and more
声音和视频 .wav, .mp3, .oga/.ogg, .ogv
字型 .ttf

Bringing Your Assets from Unity Software从Unity软件中获取资产#

注意
If you import a group of assets containing .meta description files (for example, from a Unity project), there mights be warnings in the Console due to unsupported file format. Upon import completion, all contents in .meta files in the UNIGINE project folder will be replaced with UNIGINE native asset metadata. Source files will not be affected.如果您导入包含.meta描述文件的资产组(例如,从Unity项目中),则由于不支持的文件格式,在控制台中可能会出现警告。导入完成后,UNIGINE项目文件夹中.meta文件中的所有内容将被UNIGINE本机资产元数据替换。源文件不会受到影响。

Meshes网格

You can import an asset you used in Unity software to UNIGINE if you have it as an FBX model. While importing the FBX model to UNIGINE, check the required import options depending on the model.如果将其用作FBX模型,则可以将在Unity软件中使用的资产导入UNIGINE。将 FBX模型导入UNIGINE时,请根据模型检查所需的导入选项

UNIGINE uses the same units (meters) as Unity software, so you don't need to rescale meshes.UNIGINE使用与Unity软件相同的单位(米),因此您无需重新缩放网格。

Materials材料

Similar to Unity software, UNIGINE works with PBR materials and supports both Metalness and Specular workflows (similar to Unity materials based on the Standard and Standard (Specular Setup) shaders), a rich out-of-the-box library of materials enables to create almost any material. So, materials created for the model in Unity software can be re-created in UNIGINE using mesh_base material, the base material in UNIGINE used for physically based materials.Unity软件类似,UNIGINE可与 PBR材质一起使用,并支持 Metalness和Specular工作流程(类似于基于StandardStandard (Specular Setup)着色器的Unity材质),盒式材料库可创建几乎所有材料。因此,可以使用mesh_base材料在UNIGINE中重新创建在Unity软件中为模型创建的材料,这是UNIGINE中用于基于物理的材料的基础材料。

Textures纹理

Textures can be imported as a part of a model or separately and then applied to a mesh. To import textures, you might have to do some adjustments in advance. For example, the Shading texture in UNIGINE stores the metalness, roughness, specular, and microfiber maps in its corresponding channels, so you need to modify the texture using third-party software, such as GIMP or Photoshop, and then import it to UNIGINE.可以将纹理作为模型的一部分或单独导入,然后将其应用于网格。要导入纹理,您可能需要事先进行一些调整。例如,UNIGINE中的Shading纹理将金属性,粗糙度,镜面和微纤维贴图存储在其对应的通道中,因此您需要使用第三方软件(例如GIMP或Photoshop)修改纹理,然后将其导入UNIGINE。

To import the Normal texture, you should invert the G channel. This can be done while importing the texture (or even later) by using the Invert G Channel setting.要导入Normal纹理,应反转G通道。这可以在使用Invert G Channel设置导入纹理(或什至以后)的同时完成。

Animations动画

You can import a bone-animated model you used in Unity software to UNIGINE if you have it as an FBX model. While importing the FBX model, enable the Import Animations option and fine-tune the import using additional options.如果将Unity软件中使用的骨骼动画模型用作FBX模型,则可以将其导入UNIGINE。导入FBX模型时,启用导入动画选项,并使用其他选项对导入进行微调。

For more details, see import recommendations.有关更多详细信息,请参见导入建议

Scene现场#

The concept of the Scene in both engines is the same. However, Unity software and UNIGINE use different coordinate systems.两个引擎中“场景”的概念是相同的。但是,Unity软件和UNIGINE使用不同的坐标系。

Unity softwareUNIGINE

Unity Coordinate System (left-handed)

Unity software uses a left-handed coordinate system where the vertical direction is usually represented by the +Y axis.Unity软件使用左手坐标系,其中垂直方向通常由+Y轴表示。

One unit is one meter.一单位一米。

Axes and Directions:轴和方向:

  • X — right (+), left (-) X -右(+),左(-)
  • Y — up (+), down (-) Y -向上(+),向下(-)
  • Z — forwards (+), backwards (-) Z -向前(+),向后(-)

Positive rotation angle sets the rotation clockwise.正旋转角设置顺时针旋转。

File format: *.scene档案格式:*.scene

UNIGINE Coordinate System (right-handed)

UNIGINE uses a right-handed coordinate system where the vertical direction is usually represented by the +Z axis.UNIGINE使用右手坐标系,其中垂直方向通常由+Z轴表示。

One unit is one meter.一单位一米。

Axes and Directions:轴和方向:

  • X — right (+), left (-) X -右(+),左(-)
  • Y — forwards (+), backwards (-) Y -向前(+),向后(-)
  • Z — up (+), down (-) Z -向上(+),向下(-)

Positive rotation angle sets the rotation counterclockwise.正旋转角设置逆时针旋转。

File format: *.world档案格式:*.world

Scene Objects场景对象#

This section gives a brief description of basic scene objects in both engines as well as their basic similarities and differences.本节简要介绍了两个引擎中的基本场景对象,以及它们的基本异同。

Unity softwareUNIGINE

Hierarchy window层次结构窗口


Basic scene object — GameObject.

基本场景对象-GameObject

GameObjects are containers for all other Components. Components add functionality to the GameObject.

GameObject是所有其他组件的容器。组件为GameObject添加功能。

Every GameObject has the Transform component by default.
每个GameObject默认都有Transform组件。

GameObjects can be organized into a hierarchy (parent-child relation).GameObjects可以组织成一个层次结构(父子关系)。

World Nodes Hierarchy window世界节点层次结构窗口


Node is a basic type from which all types of scene objects are inherited. Some of them appear visually: Objects, Decals, and Effects — they all have surfaces to represent their geometry (mesh), while others (Light Sources, Players, etc.) are invisible.

Node是一种基本类型,从该基本类型可以继承所有类型的场景对象。其中一些可视化显示:对象贴图效果-它们都具有表面来表示其几何形状(网格),而其他(光源播放器等)不可见。

Basic functionality of a node is determined by its type. Additional functionality can be added using properties and a component system.节点的基本功能由其类型决定。可以使用属性组件系统添加其他功能。

Each node has a transformation matrix, which encodes its position, rotation, and scale in the world.每个节点都有一个转换矩阵,该矩阵对其在世界上的位置,旋转和比例进行编码。

Nodes can be organized into a hierarchy (parent-child relation).节点可以组织成一个层次结构(父子关系)。

注意
All scene objects added to the scene regardless of their type are called nodes.不论类型如何,添加到场景中的所有场景对象都称为节点。

Prefabs预制件#

The workflow in Unity software is based on prefabs. It is usual for you to assemble a complex object from GameObjects with certain components and properties and create a prefab from such object. Prefabs can then be placed in your world via Editor, or instantiated at run time.Unity软件中的工作流程基于预制件。通常,您是从 GameObjects 中组装具有某些组件和属性的复杂对象,然后从此类对象创建预制件。然后可以通过编辑器将预制件放置在您的世界中,或在运行时实例化。

UNIGINE's workflow is based on Node References that are very similar to prefabs. In order to make a complex object to be instanced in your world, you just build the desired hierarchy from nodes, assign materials and properties to them, and save it as a Node Reference. Then you can use this node reference as many times as necessary and, just like with the prefabs, modify the node reference by changing any of its instances.UNIGINE的工作流程基于与预制件非常相似的节点引用。为了使复杂的对象在您的世界中成为实例化,您只需从节点构建所需的层次结构,为其分配材质和属性,然后将其另存为Node Reference。然后,您可以根据需要多次使用此node reference,并且与预制件一样,通过更改其任何实例来修改node reference

注意
Node References support nesting as well, so you can build complex hierarchies easily.节点引用也支持嵌套,因此您可以轻松构建复杂的层次结构。

To learn more about creating Node References and managing them, please follow the link below:要了解有关创建节点引用和管理它们的更多信息,请点击以下链接:

How to Collaborate?如何合作?#

Unity Editor provides the Smart Merge tool and support for custom tools for resolving conflicts when merging results of teamwork. Scenes and other files should use the YAML format in order to be merged.Unity编辑器提供了智能合并工具,并支持自定义工具以解决合并团队合作结果时的冲突。场景和其他文件应使用YAML格式才能进行合并。

In UNIGINE, all native file formats are text-based by default, so you can use any VCS you are used to and merge worlds, nodes and other assets. You can extend the file system to keep the shared assets by using Mount Points. Also, a normal workflow is to split work of different team members using separate Node Layers, so there will be no need to match the conflicted files when merging the project modifications.In UNIGINE, all native file formats are text-based by default, so you can use any VCS you are used to and merge worlds, nodes and other assets. You can extend the file system to keep the shared assets by using Mount Points. Also, a normal workflow is to split work of different team members using separate Node Layers, so there will be no need to match the conflicted files when merging the project modifications.

Check out the related article for more details:请查看相关文章以获取更多详细信息:

Cameras摄影机#

Cameras, the entities essential for rendering, are treated slightly differently in both engines.渲染必需的实体相机在两个引擎中的处理方式略有不同。

In Unity software, Camera component is responsible for capturing a view and sending it to render. All enabled cameras present in the scene are rendered in the viewport (Game View) and may overlap each other. To switch between cameras, one usually needs to toggle off the current camera and enable the other one.Unity软件中, Camera 组件负责捕获视图并将其发送给渲染。场景中存在的所有启用的摄影机都在视口(游戏视图)中渲染,并且可能彼此重叠。要在摄像机之间切换,通常需要关闭一个摄像机并启用另一个摄像机。

In UNIGINE, the Camera is a rendering-related object and implemented by the Player nodes in the world. There are several player types with different behaviour provided in order to simplify creation of the most commonly used cameras controlled via the input devices (keyboard, mouse, joystick):在UNIGINE中, Camera 是与渲染相关的对象,由世界上的 Player 节点实现。为了简化通过输入设备(键盘,鼠标,操纵杆)控制的最常用摄像机的创建,提供了几种具有不同行为的播放器类型:

  • Dummy is a simple camera wrapper. You can use it for static cameras or enhance with custom logic. _ Dummy是一个简单的相机包装器。您可以将其用于静态摄像机或通过自定义逻辑进行增强。
  • Spectator is a free flying camera. _ Spectator是一款自由飞行的相机。
  • Persecutor is a flying camera that has the target and orbits it at the specified distance. It is a ready-to-use simple solution for a third-person camera. Persecutor是具有目标并围绕指定距离运行的飞行相机。它是适用于第三人称相机的简单易用的解决方案。
  • Actor is a player that is capable of providing physical interaction with scenery. It has a rigid physical body, which is approximated with a capsule shape. It is a ready-to-use simple solution for a first-person character similar to Unity Character Controller. _ ^ Actor能够为物理互动提供风景。它具有坚固的物理体,近似于胶囊形状。对于类似于Unity Character Controller的第一人称角色,它是一种易于使用的简单解决方案。

Only one player can be rendered into the viewport at a moment. To switch between cameras in the Editor Viewport of the UnigineEditor, use the Camera panel:一次只能将一个玩家渲染到视口中。要在UnigineEditor的Editor视口中切换相机,请使用Camera面板:

By checking the Main Player flag of a player you set the default player, which will be rendered when the scene is loaded in the Play mode.通过检查播放器的 主播放器 标志,您可以设置默认播放器,该默认播放器将在以Play模式加载场景时呈现。

Project Settings项目设定#

Overall project settings adjustment in Unity Editor is usually done via the Project Settings window (menu: Edit > Project Settings). The Audio, Graphics, Physics, Quality levels and other settings affect the whole project.通常通过项目设置窗口(菜单:Edit > Project Settings)在Unity编辑器中进行总体项目设置调整。音频,图形,物理,质量级别和其他设置会影响整个项目。

In UNIGINE, the Common Settings and Preferences are available via Windows -> Settings menu at the Runtime section. The World settings are set for each world separately.在UNIGINE中,可以通过运行时部分的Windows -> Settings菜单使用“通用设置和首选项” 。为每个世界分别设置World设置。

Shader Compilation着色器编译#

In Unity Editor, Asynchronous Shader compilation is toggled on and off in the Editor settings (menu: Edit > Project Settings > Editor > Shader Compilation).Unity编辑器中,在编辑器设置(菜单:Edit > Project Settings > Editor > Shader Compilation)中打开和关闭Asynchronous Shader compilation

In UNIGINE, a similar editor feature, Forced Shader Compilation, is available via both the toolbar and the Editor section of the Settings window.在UNIGINE中,可通过工具栏和Settings窗口的Editor部分使用类似的编辑器功能Forced Shader Compilation

Presets预设值#

You use Presets in Unity Editor when you need to reuse property settings that have bearing to different tasks, be it component settings, import settings or especially Project Settings. You can save the settings preset for a certain section of the Project Settings as a .preset asset and reuse in development later.需要重新使用与不同任务相关的属性设置时,可以在Unity编辑器中使用“预设”,无论是组件设置,导入设置还是特别是项目设置。您可以将项目设置的某个部分的预设设置保存为.preset资产,并在以后的开发中重复使用。

Presets are an Editor-only feature in Unity software.预设是Unity软件中的仅编辑器功能。

In UNIGINE, you can save and load presets for general physics, sound and render settings. The presets are stored as assets with the *.physics, *.sound and *.render extensions respectively. Use Load and Save .* asset buttons of the Settings window to work with presets of the corresponding settings section.在UNIGINE中,您可以保存和加载预设以进行常规的物理,声音和渲染设置。预设分别存储为资产,扩展名为*.physics*.sound*.render。使用Settings窗口的LoadSave .* asset按钮可使用相应设置部分的预设。

Saved assets appear in the Asset Browser. You can load the render settings by double-clicking the required .render asset.已保存的资产将显示在资产浏览器中。您可以通过双击所需的.render资产来加载渲染设置。

注意
By default, a UNIGINE project provides settings for low, medium, high, ultra and virtual reality quality presets stored in the data/template_render_settings folder.默认情况下,UNIGINE项目为存储在data/template_render_settings文件夹中的low, medium, high, ultravirtual reality质量预设提供设置。

Presets are not an Editor-only feature in UNIGINE. You can use Physics, Sound and Render classes to manage presets for corresponding settings, for example, to switch between quality levels at run time.预设不是UNIGINE中的仅编辑器功能。您可以使用PhysicsSoundRender类管理相应设置的预设,例如,在运行时在质量级别之间切换。

Graphics图形#

In Unity Editor, settings for graphics quality are mostly gathered in the following sections:Unity编辑器中,以下部分主要收集图形质量的设置:

  • The Graphics section contains global settings for graphics. The Tier Settings provide platform-specific adjustments to rendering and shader compilation. One of the three Tier levels to be applied is defined automatically based on the platform used. Graphics部分包含图形的全局设置。 Tier Settings为渲染和着色器编译提供特定于平台的调整。将根据所使用的平台自动定义要应用的三个层级之一。
  • The Quality section handles levels of graphical quality defined for each platform. Quality部分处理为每个平台定义的图形质量级别。

In UNIGINE, the rendering settings of the world can be found in the Render section of the Settings window. You can also toggle on and off the most common render features by using the Rendering menu:在UNIGINE中,可以在Settings窗口的Render部分中找到世界的渲染设置。您还可以使用Rendering菜单打开和关闭最常见的渲染功能:

There is no platform-dependent quiality adjustments in UNIGINE, you should write your own logic to control the quality levels. You can use Render Presets for this purpose.UNIGINE中没有依赖平台的质量调整,您应该编写自己的逻辑来控制质量水平。为此,您可以使用渲染预设

Let's consider the most commonly used rendering settings in Unity software and their corresponding analogs in UNIGINE:让我们考虑一下Unity软件中最常用的渲染设置及其在UNIGINE中对应的类似物:

Unity software UNIGINE
HDR Mode Render -> Buffers -> Color 16F
Rendering Path see below
Shaders Preloading Render -> Streaming -> Preload at World Loading
Pixel Light Count Forward Per-Object Limits
Texture Quality Render -> Textures -> Quality
Anisotropic Textures Render -> Textures -> Anisotropy
Anti Aliasing Render -> Antialiasing -> Supersampling
Soft Particles particles_base -> Soft Interaction
Realtime Reflection Probes Menu: Rendering -> Dynamic Reflections -> Enabled
Texture Streaming Render -> Streaming Settings
Shadows Render -> Shadows Settings
Shadow Cascades set per each World Light source
VSync Count Runtime -> Video settings

Rendering Paths渲染路径#

Unity software provides two non-legacy lighting and shading workflows: Deferred and Forward Rendering Paths defining the shading fidelity, as well as the rendering consumption and required hardware. You can choose the rendering path that your Project uses in the Graphics window, and you can override that path for each Camera.Unity软件提供了两种非传统的照明和着色工作流程:DeferredForward 渲染路径,用于定义着色保真度以及渲染消耗和所需的硬件。您可以在Graphics窗口中选择项目使用的渲染路径,并且可以为每个 Camera 覆盖该路径。

UNIGINE has the fixed Rendering Sequence represented by a combination of a full deferred renderer with forward rendering techniques:UNIGINE具有固定的 Rendering Sequence (固定序列),由完整的延迟渲染器与正向渲染技术的组合表示:

  • All opaque (non-transparent) geometry is rendered in the deferred pass.所有不透明(非透明)几何图形均在延迟的过程中呈现。
  • Transparent geometry is rendered in the forward pass.透明几何图形在正向传递中呈现。

You can reduce computational load by skipping certain rendering stages. Watch the dedicated video tutorial on using the Microprofile tool to optimize rendering:您可以通过跳过某些渲染阶段来减少计算量。观看有关使用Microprofile工具优化渲染的视频教程:

Post-Processing后期处理#

In Unity software, availability of post-processing effects is determined by the render pipeline used. In UNIGINE, similar effects are not a part of Post-processing but are integrated into the Rendering Sequence. Thus, Unity High Definition Render Pipeline (HDRP) is much closer to the rendering workflow in UNIGINE, than other render pipelines.Unity软件中,后处理效果的可用性取决于所使用的渲染管道。在UNIGINE中,类似的效果不是后期处理的一部分,而是集成到渲染序列中。因此,与其他渲染管线相比,Unity High Definition Render Pipeline (HDRP)更接近UNIGINE中的渲染工作流程。

In Unity software the Volume framework is used to define the volumes where post-processing parameters and effects are locally (or globally) overridden. In UNIGINE you will have to write your own logic to smoothly interpolate between settings at different spaces (if such a requirement appears).Unity软件中,Volume框架用于定义在局部(或全局)覆盖后处理参数和效果的体积。在UNIGINE中,您将必须编写自己的逻辑以在不同空间的设置之间进行平滑插值(如果出现此要求)。

注意
UNIGINE offers a number of materials to create image postprocessing effects out of the box. They can be applied both globally and per camera.UNIGINE提供了许多开箱即用的材质来创建图像后处理效果。 它们可以在全局和每个摄像机上应用。

This section lists all common Unity post-processing techniques that can be achieved in UNIGINE as well regardless of render pipeline.本节列出了所有通用的Unity后处理技术,无论渲染管线如何,都可以在UNIGINE中实现。

Post-Processing Effects后处理效果#
Unity software UNIGINE
Anti-aliasing methods:
  • FXAA
  • TAA
  • SMAA
  • MSAA
Anti-aliasing methods:
Ambient Occlusion Screen-Space Ambient Occlusion
Auto Exposure Camera Effects:
White Balance
Tonemapping
Bloom
Color Grading:
  • Tone
  • Lookup Texture
Chromatic Aberration Postprocess Materials:
  • post_color_correction
Grain
Deferred Fog Haze
Depth of Field Depth of Field
Motion Blur Motion Blur
Screen Space Reflection SSR
Contact Shadows Screen Space Shadows
Micro Shadows Cavity of SSAO

What's Next?下一步是什么?#

Where to go from here?从这里去哪里?

Make sure you don't miss the subtopics of this guide:确保您不要错过本指南的子主题:

Thank you for reading the guide! You can proceed to the following sections for further learning:感谢您阅读指南!您可以继续以下各节以进一步学习:

最新更新: 2022-03-10
Build: ()