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

从虚幻引擎迁移到UNIGINE:内容创建

Geometry Brushes
几何笔刷#

Geometry Brush is the most basic tool for level construction in Unreal Engine. They are useful for rapid prototyping of levels and objects.Geometry BrushUnreal Engine中进行关卡构建的最基本工具。它们对于快速创建关卡和对象的原型很有用。

Brush blocking in UE4UE4中的笔刷阻塞

In UNIGINE, you can use primitives for this kind of task. Go to the Create -> Primitives menu and select the desired type.在UNIGINE中,您可以使用原语为此任务。转到Create -> Primitives菜单,然后选择所需的类型。

Creating a primitive in UNIGINE在UNIGINE中创建基本体

Blocking in UNIGINE在UNIGINE中屏蔽

Meshes
网格#

As well as in Unreal Engine, mesh is the main graphics primitive in UNIGINE.Unreal Engine一样,网格也是UNIGINE中的主要图形基元。

In UE4, all data stored in the FBX model (meshes, skeletal data, animation sequences, materials and embedded textures) is imported as a set of separate assets linked to the source file (useful for updating the assets when changing the source model). Static Mesh assets can be edited in a separate window.UE4中,将存储在FBX模型中的所有数据(网格,星座数据,动画序列,材质和嵌入的纹理)作为链接到源文件的一组单独资源导入(在更改源模型时可用于更新资源)。可以在单独的窗口中编辑Static Mesh资源。

Configuring a Static Mesh asset in UE在UE中配置Static Mesh资源

Both meshes and read-only materials appear as components of the asset.网格和只读材质均显示为资源的组件。

In UNIGINE, an imported FBX asset appears as a container for all meshes it stores in the Asset Browser. The link to the original file isn't created, the file is copied to the project data folder when imported. You can access the contents by right-clicking the asset and choosing Open:在UNIGINE中,导入的FBX资源显示为它存储在Asset Browser中的所有网格的容器。原始文件的链接未创建,导入时文件被复制到项目data文件夹中。您可以通过右键单击资源并选择Open来访问内容:

Meshes within an FBX asset in UNIGINE在UNIGINE的FBX资源内划分网格

Every separate object in the FBX model is represented by a .mesh runtime asset. Materials (if there are any, provided the Import Materials option was enabled) are generated in the materials folder next to the asset. To adjust import settings, select the FBX asset and proceed to the Parameters window.FBX模型中的每个单独对象都由.mesh运行时资源表示。材质(如果有的话,只要启用了Import Materials选项)就会在资源旁边的materials文件夹中生成。调整导入设置,选择FBX资源,然后进入Parameters窗口。

To create a node that uses the mesh or FBX asset you can simply drag it to the UnigineEditor viewport the same way you would do in Unreal Editor. In UNIGINE, this will add a Static Mesh object to the world hierarchy.创建一个节点使用网格或FBX资源的用户,只需将其拖动到UnigineEditor视口中,就像在Unreal Editor中一样。在UNIGINE中,这会将Static Mesh对象添加到世界层次结构中。

Object nodes are major building blocks that construct the world. Most of them represent visible geometry of the scene. For example, it is best to use a Static Mesh object for objects that are not intended to change their geometry the same way as Static Mesh actor in UE4.目的节点是构成世界的主要构件。它们中的大多数代表场景的可见几何体。例如,对于不打算以与UE4中的Static Mesh actor相同的方式更改其几何形状的对象,最好使用Static Mesh对象。

On the picture below similar UI elements for static mesh parameters are color-coded for both editors:在下面的图片中,两个编辑器的静态网格物体参数的相似UI元素均用颜色编码:

Static Mesh parameters in Unreal Editor and UnigineEditorUnreal EditorUnigineEditor中的Static Mesh参数

Here Surface come into play. They are pretty close to Elements of a Static Mesh in Unreal Engine, but a surface encapsulates a sub-mesh having a certain material assigned (in third-party 3D editors) and has the name according to that material. For convenience, surfaces can be rearranged in a hierarchy and toggled on and off. Some settings you would set for the whole Static Mesh actor, such as visibility and contribution to lighting, are available for each surface separately.这里表面参加进来。它们非常接近Unreal Engine中的Static Mesh元素,但是表面封装了已分配了某种材质的子网格(在第三方3D编辑器中),并具有根据该材质命名的名称。为了方便起见,表面可以是在层次结构中重新排列并打开和关闭。您可以为整个Static Mesh actor进行设置的某些设置(例如可见性和对照明的贡献)是可用的对于每个表面分别地。

Levels of Detail (LOD)
细节等级(LOD)#

In Unreal Editor, you are likely to be used to configuring LODs for a Static Mesh asset using the Static Mesh Editor. You usually import additional FBX files for all LODs and specify the screen size for each one. The active LOD is defined by the threshold based on the ratio of the mesh's screen-space size to the total screen height.Unreal Editor中,您可能习惯于使用Static Mesh Editor为静态网格物体资源配置LOD。通常,您会为所有LOD导入其他FBX文件,并为每个LOD指定屏幕尺寸。根据网格的屏幕空间大小与总屏幕高度之比,由阈值定义活动LOD。

LOD Group

Configuring LODS in Static Mesh EditorStatic Mesh Editor中配置LODS

In UNIGINE, it is much more handy to store all LODs in a single .fbx model, in this case a Static Mesh created based on the asset will have several surfaces corresponing to LODs. Levels of detail are defined based on distances — in a more low-level manner to make fine tuning available. Surfaces have visibility settings for this purpose. You can set the minimum and maximum visibility distances from the camera for each surface. For Cross Fading use the Minimum Fade and Maximum Fade values.在UNIGINE中,将所有LOD存储在单个.fbx模型中更为方便,在这种情况下,基于资源创建的Static Mesh将具有与LOD对应的多个曲面。细节级别是基于距离定义的-以更底层的方式进行微调。表面有可见性设置以此目的。您可以为每个表面设置距相机的最小和最大可见距离。对于交叉淡入淡出,请使用Minimum FadeMaximum Fade值。

Surface LOD Settings

Configuring LODs in UNIGINE在UNIGINE中配置LOD
注意
Note the -inf value in one of the fields. You can use inf (Infinity) and -inf (-Infinity) values for parameters supporting this format to define the lowest and highest possible values respectively.注意其中一个字段中的-inf值。您可以将infInfinity)和-inf-Infinity)值用于支持此格式的参数,以分别定义最低和最高值。

Automatic generation of LODs is not provided in UNIGINE, but automatic LODs setup when importing a model is described in the FBX Import Guide. For more details on configuring LODs refer to the dedicated article.在UNIGINE中未提供LOD的自动生成,但是在导入模型时介绍了自动LOD设置。 FBX导入指南。有关配置LOD的更多详细信息,请参阅专用文章

Bone-Based Animation
基于骨骼的动画#

FBX models containing bone-animated skinned meshes create animation clips when imported in both engines. In UNIGINE, such clips are represented by .anim assets.包含骨骼动画蒙皮网格物体的FBX模型在两个引擎中导入时都会创建动画剪辑。在UNIGINE中,此类剪辑由.anim资源表示。

Animation sequence in UE4 and .anim asset in UNIGINEUNIGINE中的UE4和.anim资源中的动画序列
注意
当前,每个网格仅支持一个动画剪辑。要对多个动画剪辑进行操作,您需要为每个动画导出一个单独的FBX

Skinned Mesh object acts the same way as Skeletal Mesh Actor in UE4 used for handling bone animations.Skinned Mesh对象的行为与用于处理骨骼动画的UE4中的Skeletal Mesh Actor相同。

There is no skeleton concept as a special type of asset in UNIGINE. The skinned animation system is focused on operating animation layers: you can configure multiple layers with various animation clips and perform blending between them by using API methods.在UNIGINE中,没有skeleton概念是一种特殊的资源。外观动画系统专注于操作动画层:您可以使用各种动画剪辑配置多个层,并使用API方法在它们之间执行混合。

Example of animation using two layers使用两层动画的示例

For more details refer to the following articles:有关更多详细信息,请参阅以下文章:

Blend Shapes
混合形状#

The same way Skinned Mesh object supports morphing. If a mesh has blend shapes (sometimes referred to as morph targets) assigned in a third-party 3D modelling software, they will be available internally as surface morph targets (provided the Import Morph Targets option was enabled for the imported asset).Skinned Mesh对象支持变形的方式相同。如果网格在第三方3D建模软件中分配了blend shapes(有时称为morph targets),则它们将在内部以表面变形目标(前提是已为导入的资源启用了Import Morph Targets选项)。

In UNIGINE, multiple animation morph targets (i.e. morph layers) are created based on the available surface morph targets and blended manually using weights via API methods.在UNIGINE中,根据可用的表面变形目标创建多个动画变形目标(即变形层),并使用权重通过API方法

Follow the related tutorial for more details:请遵循相关教程以获取更多详细信息:

Materials and Shaders
材质和明暗器#

Similar to Unreal Engine, UNIGINE primarily works with PBR materials. Additionally, UNIGINE supports legacy Specular workflow.Unreal Engine类似,UNIGINE主要用于PBR材质。此外,UNIGINE支持旧版Specular工作流程

In UE4, you are accustomed to create materials and edit them using a node-based Material Editor visually. Each node represents a snippet of HLSL code, so, basically, you create a shader through visual scripting. To avoid time-consuming rebuilding of the material when tweaking parameters, you can use Material Instances.UE4中,您习惯于创建材质并使用基于节点的材质编辑器直观地对其进行编辑。每个节点代表一小段HLSL代码,因此,基本上,您是通过可视脚本创建着色器的。为了避免在调整参数时耗时的材质重建,可以使用Material Instances

In UNIGINE, material system is formed by base materials and user materials inherited from them. A node-based Material Editor is also available in UNIGINE enabling you to create custom complex materials without coding required.在UNIGINE中,物料系统由基础材质以及从中继承的用户资料。

Materials in the UNIGINE rendering pipelineUNIGINE渲染管道中的材质

A base material is a set of read-only material properties (basically flags, parameters and textures) referring to fragment, vertex and geometry shaders. Base material can be assigned to nodes (or surfaces) of the type it is bound to. UNIGINE provides a rich out-of-the-box library of base materials and standard shaders that can be used to create almost any appearance for all the types of nodes available in the engine.基础材质是一组只读的材质属性(基本上是标志,参数和纹理),它们涉及片段,顶点和几何着色器。可以将基础材质分配给其绑定类型的节点(或表面)。 UNIGINE提供了丰富的开箱即用的基础材质库以及可用于为引擎中所有可用节点类型创建几乎任何外观的标准着色器。

注意
All materials are listed in the Materials window (menu: Windows -> Materials Hierarchy).所有材质都在Materials窗口中列出(菜单:Windows -> Materials Hierarchy)。

The mesh_base is the base PBR material in UNIGINE used for mesh surfaces. Right here you can inherit a new material from it and start setting it up by tweaking the parameters and assigning textures in the Parameters window.mesh_base是UNIGINE中用于网格曲面的基础PBR材质。在这里,您可以从中继承新材质并开始设置它通过调整参数并在Parameters窗口中分配纹理。

Parameters of the mesh_base materialmesh_base材质的参数

We create user materials by inheriting them from base materials to override some properties passed to shaders on rendering. When creating a material in the Asset Browser, we choose the base material to inherit from, thus defining the type of objects the new material will support.我们创造用户资料通过从基础材质继承它们,以覆盖渲染时传递给着色器的某些属性。在Asset Browser中创建材质时,我们选择要继承的基础材质,从而定义了新材质将支持的对象类型。

Create Material windowCreate Material窗口

Furthermore, user materials can form a hierarchy for convenience. So, when parameters of the parent material are changed, overridden parameters of its children remain the same.此外,用户资料可以形成等级制度为了方便。因此,更改父材质的参数时,其子材质的覆盖参数保持不变。

Materials Hierarchy windowMaterials Hierarchy窗口

You can create a custom base material via the visual Material Editor or manually, in this case you will need to create and edit a .basemat file in a text editor. The format of Base Material asset has a quite straight structure. As for shaders, HLSL syntax is supported for DirectX. Also, UUSL, the built-in UNIGINE shader language is provided as a universal one.请注意,UNIGINE中未提供基于节点的材质编辑器(当前正在研究此功能),因此,要创建自定义基础材质,您将需要在文本编辑器中手动创建和编辑.basemat文件。这基本物料资源的格式具有很直的结构。至于着色器,DirectX支持HLSL系统。同样,内置的UNIGINE着色器语言UUSL作为通用语言提供。

See also:也可以看看:

Shader Compilation
着色器编译#

UE4 compiles shaders asynchronously using a streaming system.UE4使用流系统异步编译着色器。

In UNIGINE, Forced Shader Compilation, an in-editor feature, is available via both the toolbar and the Editor section of the Settings window.在UNIGINE中,强制着色器编译,一种编辑器内部功能,可通过工具栏和Settings窗口的Editor部分使用。

Lighting and Environment
照明与环境#

The same way as in UE4, lighting in UNIGINE can be considered as either realtime or precomputed. A set of objects and tools enables you to get benefit from the both approaches.UE4中的方式相同,可以将UNIGINE中的光照视为实时或预先计算的。一组对象和工具使您可以从两种方法中受益。

Light Sources
光源#

In UE4, light sources are represented by several Light actors. UNIGINE provides several types of light sources similar to the ones of Unreal Engine. The following table lists all possible way to add lighting in both engines.UE4中,光源由几个Light actor表示。 UNIGINE提供了几种类型的光源Unreal Engine类似。下表列出了在两个引擎中添加照明的所有可能方法。

Light Source Unreal Engine UNIGINE

A light source located at a point and sending light out in all directions equally位于一个点上的光源,可以均匀地向所有方向发射光

Point Light

Light Omni

A light source type providing a cone-shaped region of illumination提供锥形照明区域的光源类型

Spot Light

Light Projected

A type simulating an infinitely distant light source and casting parallel beams onto the scene 一种模拟无限远的光源并将平行光束投射到场景上的类型

Directional Light

Light World

An area light that illuminates objects in different directions at once 区域照明一次照亮不同方向上的物体

Area Light: Rectangle and Disc shape区域光:矩形和圆盘形状

Shape Type: Sphere, Capsule and Rectangle形状类型:球体,胶囊和矩形

Emissive objects emitting light across their surface area 发光物体在其表面积上发光

Emissive materials发光材质

Emission排放

Flat ambient lighting 平面环境照明

Sky light with a cubemap specified指定了立方体贴图的天光

Environment Ambient Lighting, Environment Probe环境环境照明Environment Probe

Shadows
暗影#

In UE4, light sources can be Static, Stationary, actors have the same modes. When it comes to light baking (including shadows), UE4 workflow implies using Lightmaps.UE4中,光源可以是Static,Stationary ,actor具有相同的模式。对于轻度烘焙(包括阴影),UE4工作流程意味着使用光照贴图

Considering the concept of realtime and precomputed shadows, UNIGINE provides both types of shadows from light sources.考虑到实时阴影和预先计算的阴影的概念,UNIGINE提供了两种类型的光源阴影。

Shadows are cast using a commonly used technique called Shadow Mapping. All light sources can be either in Dynamic or Static mode according to which it is decided if shadow maps are computed in real time or saved in an asset, thus significantly reducing the number of polygons rendered each frame. Apparently, moving lights should be Dynamic, we can't precompute shadows cast from a moving light source.使用称为Shadow Mapping的常用技术投射阴影。所有光源都可以位于动态或静态确定阴影图是实时计算还是保存在资源中的模式,从而显着减少了每帧渲染的多边形数量。显然,移动光源应该是Dynamic ,我们无法预先计算从移动光源投射的阴影。

The Mixed or Static Shadow Casting Mode of a light source filters the surfaces that cast shadows from it. By using the Mixed mode you can combine baked shadows from static geometry and realtime shadows cast by certain dynamic meshes. Use the Shadow Mode to decide whether the surface is static or dynamic.光源的“混合”或“静态Shadow Casting Mode”会过滤从其投射阴影的表面。通过使用“混合”模式,您可以将静态几何图形中的烘焙阴影与某些动态网格物体所投射的实时阴影进行组合。使用Shadow Mode可以确定曲面是静态的还是动态的。

The Shadow Mode parameter is set per surface

You don't have to bake shadows to achieve the soft shadows effect. This is controlled by the Penumbra Mode and Filtering Mode parameters per each light source.您无需烘烤阴影即可获得柔和的阴影效果。这由每个光源的Penumbra ModeFiltering Mode参数控制。

World light source uses an advanced shadow mapping technique called Parallel-Split Shadow Mapping to handle shadows at large distances, it is pretty close to the Cascaded Shadow Maps technique the Directional light source uses in Unreal Engine. The shadow settings are available per each light source.世界光源使用一种称为Parallel-Split Shadow Mapping的高级阴影映射技术来处理远距离的阴影,它非常接近定向光源在Unreal Engine中使用的级联阴影贴图技术。这阴影设置每个光源可用。

To learn more about configuring different types of shadows, follow the dedicated links:要了解有关配置不同类型阴影的更多信息,请访问专用链接:

Contact Shadows
接触阴影#

Contact Shadows are known as Screen-Space Shadows in UNIGINE. Settings for them are available per each light source.接触阴影在UNIGINE中称为Screen-Space Shadows他们的设置每个光源可用。

Light Functions
灯光功能#

To filter a light's intensity Unreal Engine provides Light Functions.要过滤光的强度,Unreal Engine提供Light Functions

In UNIGINE, you can use an arbitrary 2D diffuse or albedo texture in the Texture parameter of Light Projected. The same way you can apply texture modulation to a Light Omni by using a cubemap texture.在UNIGINE中,可以在Light ProjectedTexture参数中使用任意2D漫反射或反照率纹理。您可以通过使用多维数据集贴图纹理将纹理调制应用于Light Omni的相同方法。

Modulation by texture通过纹理调制
Modulation by cubemap通过立方体贴图进行调制

This is the way IES Light Profiles can be simulated as well.这也是可以模拟IES灯光轮廓的方式。

Environment
环境#

In UE4, atmospheric lighting is usually represented by a set of actors: SkyLight, SkyAtmosphere, AtmosphericFog, and DirectionalLight.UE4中,大气照明通常由一组角色表示:SkyLight, SkyAtmosphere, AtmosphericFogDirectionalLight

In UNIGINE, all Environment Settings are gathered in the Render Settings (choose Window -> Settings in the main menu, then in the Settings window go to Runtime -> World -> Render -> Environment).在UNIGINE中,所有环境设定在“渲染设置”中收集(在主菜单中选择Window -> Settings,然后在Settings窗口中转到Runtime -> World -> Render -> Environment)。

UNIGINE Environment SettingsUNIGINE环境设置

UNIGINE provides three environment presets, by configuring which you can create a smooth transition between different weather conditions. By default, the first preset is enabled only.通过配置,UNIGINE提供了三个环境预设,您可以在不同的天气条件之间创建平稳的过渡。默认情况下,仅启用第一个预设。

UNIGINE Environment SettingsUNIGINE环境设置

In order to achieve physically correct atmosphere rendering, UNIGINE environment system simulates Scattering by interpolating certain LUTs (Look-UP Textures). This system works in conjunction with the current enabled World light (the Scattering mode), so when configuring environment lighting you should consider all the settings combined. For more details visit the dedicated article.为了实现物理上正确的大气渲染,UNIGINE环境系统进行了模拟散射通过内插某些LUT(查找纹理)。该系统与当前启用的“世界”灯光(Scattering模式)配合使用,因此在配置环境照明时,应考虑所有设置的组合。有关更多详细信息,请访问专用文章

You can set a cubemap texture as the Environment Texture for both sky color and reflections.您可以将天空图和反射图都设置为Environment Texture的立方体贴图纹理。

注意
If you need to change reflections locally, for example indoors, use an Environment Probe with a unique cubemap.如果需要在本地(例如在室内)更改反射,请使用具有唯一立方体贴图的Environment Probe

In UNIGINE, you can use a Sky object recreating clouds and environment background in the scene. It can represent a hemisphere or a full sphere with a cubemap assigned, tiled with clouds texture to produce plausible and inexpensive dynamic clouds. 在UNIGINE中,可以使用Sky对象在场景中重新创建云和环境背景。它可以代表已分配了立方体贴图的半球或整个球体,并用云纹理平铺以生成合理且廉价的动态云。

注意
If your project requires simulating lifelike clouds, take a look at the Volumetric Clouds.如果您的项目需要模拟逼真的云,请看一下体积云

Fog
多雾路段#

To simulate fog in Unreal Engine, you are accustomed to use different types of actors, such as AtmosphericFog, ExponentialHeightFog with the support for Volumetric Fog.要在Unreal Engine中模拟雾,您习惯于使用不同类型的actor,例如AtmosphericFog, ExponentialHeightFog并支持Volumetric Fog

For the same purpose in UNIGINE you can use Environment Haze in the Solid mode or, if the difference between haze and fog is crucial for your project, use Volumetric Objects — they are great for simulating light beams and shafts, fog and shaped clouds.为了在UNIGINE中实现相同的目的,可以在Solid模式下使用Environment Haze,或者如果雾度和雾度之间的差异对于您的项目至关重要,则可以使用体积物体-它们非常适合模拟光束和轴,雾和异形云。

Global Illumination
全球照明#

Unreal Engine provides a set of advanced systems that model indirect lighting significantly improving the realistic look of the scene. So does UNIGINE. This section lists UE4 GI techniques and ways to get the same or similar results in UNIGINE.Unreal Engine提供了一组高级系统,这些系统可以对间接照明进行建模,从而显着改善场景的逼真的外观。 UNIGINE也是如此。本节列出了UE4 GI技术和在UNIGINE中获得相同或相似结果的方法。

Lightmaps
光照贴图#

UE4 provides the Lightmass system enabling you to pre-calculate (bake) the brightness of surfaces in a scene and store the result in a lightmap for later use at run time. It requires non-overlapping UVs which are auto-generated for static meshes when importing.UE4提供了Lightmass系统,使您能够预先计算(烘焙)场景中曲面的亮度并将结果存储在光照图中,以供以后在运行时使用。它需要不重叠的UV,这些UV会在导入时为静态网格物体自动生成。

Baked indoor GI using Lightmass Portal in UE4使用UE4中的Lightmass Portal烘焙室内GI

In UNIGINE, lightmaps are also supported and baked using the integrated GPU Lightmapper tool.在UNIGINE中,还使用集成的GPU Lightmapper工具支持并烘焙光照贴图。

UNIGINE provides another advanced solution for static GI — Voxel-Based Global Illumination provided by Voxel Probe.UNIGINE为静态GI提供了另一种高级解决方案—由Voxel Probe提供的Voxel-Based Global Illumination

UNIGINE Voxel-Based Global Illumination基于UNIGINE体素的全局照明

Voxel Probe is a box-shaped volume composed of voxels of fixed size, providing both pre-calculated indirect lighting and diffuse (blurred) reflections. One of advantages of this approach — there is no need in UV coordinates, any geometry will contribute to GI with no issues.Voxel Probe是由固定大小的体素组成的盒形体积,既提供了预先计算的间接照明,又提供了漫反射(模糊) 。这种方法的优点之一-不需要UV坐标,任何几何形状都不会对GI产生影响。

Light baking is performed using Bake Lighting tool.使用Bake Lighting工具执行轻度烘烤。

Similar to using Lightmass Importance Volume in UE4, you can make insets — Voxel Probes with more dense grid — to bake more details of GI where necessary.与在UE4中使用Lightmass Importance Volume相似,您可以使insets(具有更密集网格的Voxel Probes)在必要时烘烤GI的更多细节。

As concerns realtime, Unreal Engine supports SSGI solution providing real-time GI simulation in screen space. For such cases UNIGINE features the SSRTGI (Screen-Space Ray-Traced Global Illumination) technology, which incorporates ray-traced SSGI, SSAO and Bent Normals in screen space, enhancing overall connectedness of the scene a lot.关于实时,Unreal Engine支持SSGI解决方案,可在屏幕空间中提供实时GI模拟。在这种情况下,UNIGINE具有SSRTGI (Screen-Space Ray-Traced Global Illumination)技术,该技术在屏幕空间中加入了光线追踪的SSGI, SSAO and Bent Normals,从而大大增强了场景的整体连接性。

Baked Ambient Occlusion
烘烤环境阻塞#

Lightmass system is also capable of baking Ambient Occlusion, a part of pre-computed illumination which darkens creases, holes and surfaces that are close to each other.Lightmass系统还能够烘焙Ambient Occlusion,这是预先计算的照明的一部分,可使彼此靠近的折痕,孔和表面变暗。

UNIGINE has no built-in baking tool for ambient occlusion, nonetheless, it is possible to apply an additional ambient occlusion texture generated using third-party software in the mesh_base material settings.UNIGINE没有内置的用于环境光遮挡的烘焙工具,但是,可以应用额外的环境光遮蔽使用第三方软件在mesh_base材质设置中生成的纹理。

Volumetric Lightmaps
体积光照贴图#

Volumetric Lightmap storing precomputed lighing in all points in space is much closer to UNIGINE Voxel Probe.Volumetric Lightmap在空间的所有点中存储预先计算的行距,更接近UNIGINE Voxel Probe

Volumetric Lightmap in Unreal Editor虚幻编辑器中的体积光照贴图

As Voxel Probe has internal volume baked, it will illuminate objects that move within its bounds. The Bake Internal Volume parameter enables to choose the quality and time required to bake GI for empty voxels (i.e. the voxels that do not cover any geometry).随着Voxel Probe的内部体积被烘焙,它将照亮在其范围内移动的对象。使用Bake Internal Volume参数可以为空的体素(即不覆盖任何几何体的体素)选择烘焙GI所需的质量和时间。

Voxel-based GI on moving objects in UNIGINE基于体素的GI在UNIGINE中移动的物体

To preview ambient lighting in the viewport, switch the Rendering Debug mode to Indirect Lighting.要在视口中预览环境照明,请将Rendering Debug模式切换为Indirect Lighting

Reflection Capture
反射捕捉#

An almost complete counterpart for Sphere Reflection Capture and Box Reflection Capture actors of UE4 is Environment Probe in UNIGINE. This reflection provider stores a cubemap texture to be rendered on reflective surfaces within its bounds. 在UNIGINE中,UE4Sphere Reflection CaptureBox Reflection Capture actor的几乎完全对应的是Environment Probe。该反射提供程序存储要在其范围内的反射表面上渲染的立方体贴图纹理。

A reflective sphere placed inside Environment Probe放置在Environment Probe内的反射球

Environment Probe can be either Static or Dynamic:Environment Probe可以是StaticDynamic

Dynamic Mode. The cubemap is grabbed each frame providing real time reflections and a massive load on the CPU.Dynamic模式。每帧都将抓取立方体贴图,以提供实时反射并给CPU带来沉重的负担。

Static Mode. Environment Probe uses a pre-baked cubemap obtained using the Bake Lighting tool. This mode suits mostly static environments.Static模式Environment Probe使用通过Bake Lighting工具获得的预烘焙立方体贴图。此模式主要适合静态环境。

Custom Static Mode. The static mode with a custom cubemap texture assigned.Custom Static模式。分配了自定义立方体贴图纹理的静态模式。

Box projection is supported as well:箱体投影也受支持:

Projection types shown on a box-shaped room箱形房间中显示的投影类型

Furthermore, spherical Environment Probe can be subject to Parallax effect controlled by the corresponding parameter. While the 0 value implies projecting the reflection on an infinitesimally far sphere, the value of 1 corresponds to the actual Probe bounding sphere taking into account the viewer's perspective.此外,球面Environment Probe可以受到视差效果的控制,对应参数。虽然0值意味着将反射投影在一个无限远的球体上,但考虑到观察者的视角,1的值对应于实际的Probe边界球体。

Planar Reflection
平面反射#

The Planar Reflection actor is the provider of real-time planar reflections in Unreal Engine.Planar Reflection actor是Unreal Engine中实时平面反射的提供者。

In UNIGINE, planar reflections are implemented via Planar Reflection Probe.在UNIGINE中,平面反射是通过Planar Reflection Probe实现的。

Screen Space Reflections
屏幕空间的思考#

Screen-Space Reflections are also a part of UNIGINE. Global SSR settings contain multiple parameters making fine-tuning available.屏幕空间反射也是UNIGINE的一部分。全局SSR设置包含多个参数,可进行微调。

Audio and Video
音视频#

Audio Sources
音源#

In UE4, AudioComponent plays back Sound Wave assets. The sound is spatialized using the dedicated flag of AudioComponent.UE4中,AudioComponent播放Sound Wave资源。使用专用标记AudioComponent对声音进行空间化处理。

In UNIGINE, Sound Source node type is responsible for playing back an audio asset. It provides a surround effect the same way. While many parameters seem rather familiar to you, such settings as Doppler level, Attenuation (Rolloff) function and other, including Audio Mixer channels, are available only globally in the Sound section of the Settings window.在UNIGINE中,Sound Source节点类型负责播放音频资源。它以相同的方式提供环绕声效果。尽管您似乎对许多参数相当熟悉,但多普勒电平衰减(滚降)功能等设置,包括音频混音器通道,仅在Settings窗口的Sound部分中全局可用。

注意
Take note that a sound source must use a mono audio file to be spatialized at run time. Stereo audio files are played according to the stereo channels stored.请注意,声音源必须使用单声道音频文件才能在运行时进行空间化。立体声音频文件根据存储的立体声通道播放。

UNIGINE supports HRTF (Head Related Transfer Function) out of the box, so imitation of surround sound for stereo headsets is close to real life.UNIGINE开箱即用地支持HRTF (Head Related Transfer Function),因此,模拟立体声耳机的环绕声接近现实生活。

Another sound source entity in UNIGINE is the Ambient Source used to create a non-directional ambient background sound (e.g. background music). It has no position in the world and, therefore, can't be represented as a node. So it is available only via API.UNIGINE中的另一个声源实体是Ambient Source,用于创建非定向环境背景声音(例如背景音乐)。它在世界上没有位置,因此不能表示为节点。因此,仅可通过API使用。

Audio Volumes
音频音量#

Just like Audio Volume in Unreal Engine, UNIGINE Sound Reverb objects represent reverberation zones where ambient sound effect appears provided the player is within the zone. With fine-tuned parameters a reverberation zone correctly reproduces the way the sound is reflected from surfaces, forming three main components:就像Unreal Engine中的Audio Volume一样,UNIGINE Sound Reverb对象表示混响区域,只要播放器在该区域内,环境声音效果就会出现在该区域。通过微调的参数,混响区可以正确再现声音从表面反射的方式,从而形成三个主要成分:

  • Early reflections早期反思
  • Late reverberation后期混响
  • Echo回声

Besides that, a number of parameters can be changed to alter the type of environment being simulated. A number of presets may help you to quickly choose the most suitable type of environment to simulate:除此之外,可以更改许多参数以更改要模拟的环境的类型。许多预设可以帮助您快速选择最合适的环境类型来模拟:

By adjusting the Threshold parameter you can enable smooth sound transition when the listener moves from the outside area into the reverberation zone.通过调整Threshold参数,可以在聆听者从外部区域移至混响区域时实现平稳的声音过渡。

Playing Video
播放影片#

In Unreal Engine, you use Media Framework to play back video files stored in Media Source asset types. Videoclips of various formats can be rendered to textures and other targets.Unreal Engine中,使用Media Framework播放存储在Media Source资源类型中的视频文件。可以将各种格式的视频剪辑渲染到纹理和其他目标。

In UNIGINE, video playback is supported only in a virtual monitor as a part of GUI system. Currently only *.OGV files are supported.在UNIGINE中,仅在虚拟监视器作为GUI系统的一部分。当前仅支持*.OGV文件。

Built-in Optimization
内置优化#

Levels Streaming
级别流#

Unreal Engine supports streaming of levels: you can create several maps representing small chunks of a huge world that are streamed when the player approaches to them. The levels to be streamed are listed in Levels window.Unreal Engine支持关卡流式传输:您可以创建多个地图,这些地图代表玩家接近时流式传输的巨大世界的小块。要流式传输的级别在Levels窗口中列出。

In UNIGINE, resources streaming is a part of the advanced Asynchronous Data Streaming system. This system is intended to reduce spikes caused by loading of graphic resources, such as meshes and textures. Only the resources that are required to render the current camera view are loaded; and unloaded as soon as other resources require to be loaded to video memory in order not to exceed the specified memory limits. Uploading is time-sliced so as to avoid spikes when the world is just loaded.在UNIGINE中,资源流是高级功能的一部分异步数据流系统。该系统旨在减少由于加载诸如网格和纹理之类的图形资源而导致的尖峰。仅加载呈现当前摄影机视图所需的资源;并在需要将其他资源加载到视频内存时立即卸载,以免超出指定的内存限制。上传是按时间分割的,以避免在加载世界时出现峰值。

Settings for fine adjustment are available in the Streaming section of the Settings window:Settings窗口的Streaming部分中提供了用于微调的设置:

Texture Streaming
纹理流#

UE4 provides mipmap-based Texture Streaming. This system reduces the total amount of memory UE4 needs for textures by loading only the mipmaps that are needed to render the current camera position in the scene.UE4提供基于mipmap的纹理流。该系统通过仅加载渲染场景中当前相机位置所需的mipmap,减少了纹理所需的内存总量UE4

UNIGINE's Asynchronous Data Streaming system also provides Texture Streaming with an option to load texture mipmaps. When mipmaps loading is enabled, the textures that are not currently in use are unloaded.UNIGINE 的异步数据流系统还为纹理流提供了加载纹理 mipmap 的选项。启用 mipmap 加载后,当前未使用的纹理将被卸载。

Occlusion Culling
咬合剔除#

In UE4, apart from the common culling technique, such as Frustum Culling, there is also a set of additional ones. Mostly all of them have Occlusion Culling analogs available in UNIGINE. These techniques extremely reduce the number of polygons rendered.UE4中,除了像Frustum Culling这样的常用剔除技术之外,还存在其他一组剔除技术。大多数情况下,它们在UNIGINE中都有Occlusion Culling类似物。这些技术极大地减少了渲染多边形的数量。

Precomputed Static Visibility in UE4UE4中的预先计算的静态可见性

In UNIGINE, technique is represented by methods:在UNIGINE中,技术由方法表示:

  • Cull Distance Volumes can be replaced by Switcher nodes. Cull Distance Volumes可以替换为Switcher节点。
  • Precomputed Static Visibility. It is usual for you, as an Unreal Engine user, to define Visibility Volumes and precompute visibility cells.Precomputed Static Visibility。作为Unreal Engine用户,通常需要定义Visibility Volumes并预先计算可见性单元。

    In UNIGINE, you can use box-shaped and mesh-based Occluder culling geometry occluded by them dynamically.在UNIGINE中,可以动态使用它们封闭的基于箱形和基于网格的Occluder剔除几何。

  • Hardware Occlusion Queries technique is also available in UNIGINE. It allows skipping rendering of objects, the bounding boxes of which are covered by another opaque geometry.硬件遮挡查询在UNIGINE中也可以使用该技术。它允许跳过对象的渲染,这些对象的边界框被另一个不透明的几何图形覆盖。

Draw Call Batching
抽奖电话批处理#

There is no Draw call batching in Unreal Engine as is. You are rather accustomed to Merge Actor and use the Proxy Geometry tool as a way to reduce the number of draw calls by combining static meshes and materials they use.照原样在Unreal Engine中没有批处理调用。您非常习惯Merge Actor,并使用Proxy Geometry工具作为通过组合静态网格物体和它们使用的材质来减少绘制调用次数的方法。

UNIGINE performs DIP batching: all opaque surfaces are automatically grouped and rendered in batches according to materials assigned, thus decreasing the number of DIP calls and, therefore, increasing the performance. This is why sometimes it is reasonable to create Texture Atlases, so even objects using different textures could share the same material in order to be subject to batching.UNIGINE执行DIP批处理:所有不透明的表面会根据分配的材质自动分组并成批渲染,从而减少了DIP调用次数,因此提高了性能。这就是为什么有时创建“纹理地图集”是合理的,因此,即使使用不同纹理的对象也可以共享相同的材质,以便进行批处理。

UNIGINE provides additional objects to take full advantage of mesh batching:UNIGINE提供了其他对象以充分利用网格划分的优势:

  • Mesh Clutter is an object used to scatter a large number of identical meshes across the world. It is suitable for simulating vegetation a lot while keeping performance high. Mesh Clutter是用于在世界上散布大量相同网格的对象。它适用于大量模拟植被,同时又保持较高的性能。

  • Mesh Cluster is an object that can contain a great number of identical meshes with the same material, which are managed as one object. Cluster meshes can be scattered either automatically, or each mesh can be positioned, rotated, and scaled manually.Mesh Cluster是一个对象,可以包含大量具有相同材质的相同网格,将它们作为一个对象进行管理。群集网格可以自动分散,也可以手动定位,旋转和缩放每个网格。

Follow the Working with Large Number of Objects article for more details on using these objects.跟着处理大量对象文章以获取有关使用这些对象的更多详细信息。

Billboards
广告牌#

In UE4, you use Billboard rendering component — a 2D texture rendered always facing the camera that can be used to replace a complex 3D mesh at some distance from the camera, thus reducing the load on GPU.UE4中,使用Billboard渲染组件—始终面向相机渲染的2D纹理,可用于在距相机一定距离处替换复杂的3D网格,从而减轻GPU的负担。

Fog sheet created using Billboard in UE4使用UE4中的Billboard创建雾表

UNIGINE provides support for Billboards as well. In UNIGINE, a billboard is a rectangular flat object that always faces the camera so it is capable of representing some flat effects and objects that are barely seen from far off.UNIGINE也提供对Billboards的支持。在UNIGINE中,广告牌是一个矩形的平面物体,始终面对着相机,因此它能够代表一些平面效果和从远处几乎看不到的物体。

Billboards sample in UNIGINEUNIGINE中的Billboards样本

Imposter Sprites
冒名顶替的精灵#

To substitute a complex mesh with a set of sprites showing the mesh from a number of views, you generate 3D Imposter Sprites using the Render To Texture Blueprint toolset.要将复杂的网格替换为从多个视图中显示网格的子画面集,请使用Render To Texture Blueprint工具集生成3D Imposter Sprites

3D imposter sprites3D冒名顶替的精灵

In UNIGINE, you can generate a billboard-based Impostor using the Impostors Creator. This out-of-the-box tool creates a series of snapshots of the object while saving shading fidelity and combines them in a single Billboard object. Now you can use the Impostor object as the lowest LOD for the mesh at a distance.在UNIGINE中,您可以生成基于广告牌的Impostor使用Impostors Creator。这个开箱即用的工具创建了对象的一系列快照,同时保存了阴影保真度,并将它们组合在单个Billboard对象中。现在,您可以将Impostor对象用作远处网格的最低LOD。

Impostor albedo textureImpostor反照率纹理
Object and Impostor wireframes对象和Impostor线框

Channels
频道数#

In UE4, you are accustomed to use Channels to define groups of GameObjects to be unapproachable by light sources, as well as for selective collisions.UE4中,您习惯于使用Channels来定义GameObjects的组,以免光源以及选择性碰撞的影响。

In UNIGINE, a similar system is called the Bit Masking mechanism. Objects, cameras, materials, and other entities have bit masks used by various effects and features to define their scope. Each bit in a bit mask can be named for convenience.在UNIGINE中,类似的系统称为Bit Masking机制。对象,照相机,材质和其他实体具有位掩码,各种效果和功能都使用位掩码来定义其范围。为了方便起见,可以命名位掩码中的每个位。

The masks are compared bitwise using logical conjunction, so if two masks have at least one matching bit enabled, they match and, therefore, the entity is subject to the effect.使用逻辑结合对掩码进行按位比较,因此,如果两个掩码至少启用了一个匹配位,则它们将匹配,因此实体受此影响。

For instance, you can filter out certain objects (e.g. tooltips) for reflections by adjusting the Reflection Viewport Mask:例如,您可以通过调整Reflection Viewport Mask来过滤掉某些对象(例如工具提示)以进行反射:

For more details and usage examples:有关更多详细信息和用法示例:

Optimization Tools
优化工具#

All runtime spikes, bottlenecks, and performance issues can be tracked using the built-in optimization tools:可以使用内置的优化工具来跟踪所有运行时高峰,瓶颈和性能问题:

See Also
也可以看看#

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