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

位屏蔽

Bit masking is a flexible mechanism used to access only the specific bits in a set of data. It can be applied to the following systems: 位掩码是一种灵活的机制,用于仅访问一组数据中的特定位。可以将其应用于以下系统:

  • Rendering into viewport Rendering into viewport
  • Shadowing Shadowing
  • Reflections rendering反射渲染
  • Collisions Collisions
  • Intersections Intersections
  • Decals贴图
  • Fields Fields
  • Sound sources Sound sources
  • Physicals身体
  • Pathfinding Pathfinding

To specify the mask, click the corresponding mask button (Viewport, Shadow, Intersection, etc.) and enable required bits of a 32-bit mask. Enabling a bit means setting the value of 1 (when disabled, the value is 0). The resulting mask is displayed as hexadecimal characters on the top of the context menu window. The name of selected bit or bits is displayed on the mask button.要指定掩码,请单击相应的掩码按钮(Viewport, Shadow, Intersection等),然后启用32位掩码的必需位。启用位意味着设置 1 的值(禁用时,该值为 0 )。生成的掩码在上下文菜单窗口的顶部显示为十六进制字符。所选按钮的名称显示在屏蔽按钮上。

To collapse the context menu, click the mask button once again.要折叠上下文菜单,请再次单击“遮罩”按钮。

注意
The Material mask stores 24 bits. All other masks store 32 bits. Material掩码存储24位。所有其他掩码都存储32位。
Surface viewport mask
Bit mask with the first bit turned on启用第一位的位掩码
  • Set All turns on all the bits in the mask Set All打开掩码中的所有位
  • Clear All turns off all the bits in the mask Clear All关闭掩码中的所有位

Default names of bits can be changed. The name entered in a field is assigned to a selected bit in all masks of this type. For example, if you assign a name to the first bit of the Viewport mask of a surface, the same name is displayed for the first bit of the Camera's Viewport mask. Bit masks names are assigned locally and stored in the <Project Name>/data/default.bitmasks file, which is created when you open your project in UnigineEditor for the first time.可以更改默认的位名称。在此类型的所有掩码中,将在字段中输入的名称分配给选定的位。例如,如果将名称分配给曲面的Viewport遮罩的第一位,则为相机的Viewport遮罩的第一位显示相同的名称。位掩码名称是在本地分配的,并存储在<Project Name>/data/default.bitmasks文件中,该文件是您首次在UnigineEditor中打开项目时创建的。

Comparing Masks
比较口罩#

Masks are compared bitwise using binary operator and. As a result, the first bit of the first mask is compared to the first bit of the second mask, the second bit — to the second one, and so on.

注意
If two masks have at least one matching bit, the masks match. Values of other bits won't affect the result.If two masks have at least one matching bit, the masks match. Values of other bits won't affect the result.
If two masks have at least one matching bit, the masks match. Values of other bits won't affect the result.使用二进制运算符按位比较掩码。结果,将第一掩码的第一位与第二掩码的第一位进行比较,将第二位-与第二位进行比较,依此类推。

注意
If two masks have at least one matching bit, the masks match. Values of other bits won't affect the result.如果两个掩码具有至少一个匹配位,则掩码匹配。其他位的值不会影响结果。

For example, the following viewport masks have 4 matching bits, so they match:例如,以下视口蒙版具有4个匹配位,因此它们匹配:

The camera Viewport mask with the first 6 bits enabled启用了前6位的相机Viewport掩码
The object's Viewport mask with the second, third, fourth, and fifth bits enabled启用了第二,第三,第四和第五位的对象的Viewport掩码

Each mask has a hexadecimal representation, which is displayed in the input field of the context menu. You can copy the hexadecimal value of one mask and paste it in the input field of another mask to enable the same bits of the mask.每个掩码都有一个十六进制表示形式,显示在上下文菜单的输入字段中。您可以复制一个掩码的十六进制值并将其粘贴到另一个掩码的输入字段中,以启用掩码的相同位。

See a part of our video tutorial on bit masking dedicated to a more detailed and visualized explanation of the bit masking concept.请参阅我们的 有关位屏蔽的视频教程的一部分,该教程专门介绍位屏蔽概念的更详细和直观的说明。

Rendering into Viewport
渲染到视口#

Objects (along with decals and lights) can be selectively rendered into viewport. To that end, the camera Viewport mask (set in the Camera Settings window opened via the Camera panel), should match the following masks:可以选择性地将 对象(以及 decals lights )渲染到视口中。为此,相机Viewport遮罩(在通过“相机”面板Camera Settings打开的窗口中设置)应与以下遮罩匹配:

  • Object surface Viewport mask (Parameters window → Node tab → Surfaces section → Rendering field)物体表面Viewport蒙版(Parameters窗口→Node选项卡→Surfaces部分→Rendering字段)
  • Object material viewport mask to render the object's material (Parameters window → Node tab → Surface Material section → Common tab → Options field)对象材质视口蒙版以渲染对象的材质(Parameters窗口→Node选项卡→Surface Material部分→Common选项卡→Options字段)
注意
All masks match each other by default.默认情况下,所有蒙版都匹配。

Usage Example
使用范例#

Suppose, we have two objects with the same material. To make one of them to be rendered into viewport and the other one — not to be rendered, we should change the Viewport mask of the second object.

In the surface Viewport masks of both objects, the same bit Viewport Mask 0 is enabled (00000001) In the surface Viewport masks of both objects, the same bit Viewport Mask 0 is enabled (00000001)
For the first object, all bits of the surface Viewport mask are disabled (the mask is set to 00000000)For the first object, all bits of the surface Viewport mask are disabled (the mask is set to 00000000)
In the surface Viewport masks of both objects, the same bit Viewport Mask 0 is enabled (00000001) For the first object, all bits of the surface Viewport mask are disabled (the mask is set to 00000000) 假設我們有兩個具有相同材質的對象。 為了使其中一個渲染到視口中,而另一個不渲染,我們應該更改第二個對象的Viewport mask

In the surface Viewport masks of both objects, the same bit Viewport Mask 0 is enabled (00000001) 在两个对象的表面Viewport蒙版中,启用了相同的位Viewport Mask 000000001
For the first object, all bits of the surface Viewport mask are disabled (the mask is set to 00000000)对于第一个对象,禁用了表面Viewport蒙版的所有位(该蒙版设置为00000000

See the demonstration of how to set rendering into viewport and one more usage example in our video tutorial on bit masking. 在我們的## 有關位掩碼的視頻教程中查看如何將渲染設置為視口的演示。

Reflection Mask
Reflection Mask#

The reflection mask (Reflection Viewport) controls rendering of the environment probe reflections and planar dynamic reflections into the viewport of the reflection camera.反射蒙版(Reflection Viewport)控制将环境探针反射和平面动态反射渲染到反射相机的视口

The reflection mask can be set:

  • For environment probes (Parameters window → Node tab → Baking Settings section → Reflection Viewport Mask button). The mask is used only in combination with Realtime Update mode enabled for the environment probe.For environment probes (Parameters window → Node tab → Baking Settings section → Reflection Viewport Mask button). The mask is used only in combination with Realtime Update mode enabled for the environment probe.
  • For planar reflections (Parameters window → Node tab → Surface Material section → Parameters tab → Planar Reflection section → Viewport Mask button).For planar reflections (Parameters window → Node tab → Surface Material section → Parameters tab → Planar Reflection section → Viewport Mask button).
For environment probes (Parameters window → Node tab → Baking Settings section → Reflection Viewport Mask button). The mask is used only in combination with Realtime Update mode enabled for the environment probe.For planar reflections (Parameters window → Node tab → Surface Material section → Parameters tab → Planar Reflection section → Viewport Mask button). 可以设置反射罩:

  • For environment probes (Parameters window → Node tab → Baking Settings section → Reflection Viewport Mask button). The mask is used only in combination with Realtime Update mode enabled for the environment probe.用于环境探针Parameters窗口→Node选项卡→Baking Settings部分→Reflection Viewport Mask按钮)。该遮罩仅与为环境探针启用的Realtime Update模拟结合使用。
  • For planar reflections (Parameters window → Node tab → Surface Material section → Parameters tab → Planar Reflection section → Viewport Mask button).用于平面反射Parameters窗口→Node选项卡→Surface Material部分→Parameters选项卡→Planar Reflection部分→Viewport Mask按钮)。

For the dynamic reflection to be rendered, the Reflection Viewport mask of the reflecting material (Parameters window → Node tab → Surface Material section → Parameters tab → Planar Reflection section → Viewport Mask button) must have at least one matching bit with each of the following masks:

  • Reflection Viewport mask of the camera (Camera Settings window → Masks field)Reflection Viewport mask of the camera (Camera Settings window → Masks field)
  • Viewport mask of the object (Parameters window → Node tab → Surfaces section → Rendering field)Viewport mask of the object (Parameters window → Node tab → Surfaces section → Rendering field)
  • Viewport mask of the object's material (Parameters window → Node tab → Surface Material section → Common tab → Options field)Viewport mask of the object's material (Parameters window → Node tab → Surface Material section → Common tab → Options field)
Reflection Viewport mask of the camera (Camera Settings window → Masks field)Viewport mask of the object (Parameters window → Node tab → Surfaces section → Rendering field)Viewport mask of the object's material (Parameters window → Node tab → Surface Material section → Common tab → Options field)为了渲染动态反射,反射材质的Reflection Viewport遮罩(Parameters窗口→Node选项卡→Surface Material部分→Parameters选项卡Planar Reflection部分→Viewport Mask按钮)必须具有至少一个与以下每个遮罩匹配的位:

  • Reflection Viewport mask of the camera (Camera Settings window → Masks field)摄像机的Reflection Viewport遮罩(Camera Settings窗口→Masks字段)
  • Viewport mask of the object (Parameters window → Node tab → Surfaces section → Rendering field)对象的Viewport掩码(Parameters窗口→Node选项卡→Surfaces部分→Rendering字段)
  • Viewport mask of the object's material (Parameters window → Node tab → Surface Material section → Common tab → Options field)对象材质的Viewport蒙版(Parameters窗口→Node选项卡→Surface Material部分→Common选项卡→Options字段)

See also the fragments of our video tutorial on bit masking demonstrating the use of bit masks with baked reflections and dynamic reflections.另请参见我们的视频教程中有关位掩码的片段,演示了如何使用 烘焙反射动态反射

Usage Example
使用范例#

Suppose, you have a reflecting surface and two objects reflected in this surface.

  • To render an object without a reflection, either its Viewport mask or its material's Viewport mask should have no matching bits with the planar reflection's Viewport mask or the camera's reflection Viewport mask.To render an object without a reflection, either its Viewport mask or its material's Viewport mask should have no matching bits with the planar reflection's Viewport mask or the camera's reflection Viewport mask.
  • To render a reflection without an object, the object's Viewport mask or its material's Viewport mask should have no matching bits with the camera's Viewport mask.To render a reflection without an object, the object's Viewport mask or its material's Viewport mask should have no matching bits with the camera's Viewport mask.
To render an object without a reflection, either its Viewport mask or its material's Viewport mask should have no matching bits with the planar reflection's Viewport mask or the camera's reflection Viewport mask.To render a reflection without an object, the object's Viewport mask or its material's Viewport mask should have no matching bits with the camera's Viewport mask.假设您有一个反射表面,并且在该表面上反射了两个对象。

  • To render an object without a reflection, either its Viewport mask or its material's Viewport mask should have no matching bits with the planar reflection's Viewport mask or the camera's reflection Viewport mask.要渲染无反射的对象,其Viewport遮罩其材质的Viewport遮罩应与平面反射的Viewport遮罩相机的反射Viewport不具有匹配位。面具。
  • To render a reflection without an object, the object's Viewport mask or its material's Viewport mask should have no matching bits with the camera's Viewport mask.要在没有对象的情况下渲染反射,对象的Viewport遮罩其材质的Viewport遮罩应与相机的Viewport遮罩没有匹配的位。

In the example below, masks are given in the binary representation. For convenience, let's assume that objects and their materials have identical Viewport masks. For masks to match, they should share 1 in the appropriate bit position. You can convert these masks to the hexadecimal number representation and set the obtained values via UnigineEditor.在下面的示例中,掩码以二进制表示形式给出。为了方便起见,我们假设对象及其材质具有相同的Viewport蒙版。为了使掩码匹配,它们应在适当的位位置共享1。您可以将这些掩码转换为十六进制数字表示形式,并通过UnigineEditor设置获得的值。

An object without the reflection没有反射的对象
A reflection without the object没有对象的反射
蒙版
相機Viewport蒙版0111
相機Reflection Viewport蒙版1100
第一個對象的Viewport蒙版0001
第二個對象的Viewport蒙版0110
平面反射Viewport遮罩反射面材质的1110
蒙版
相機Viewport蒙版0111
相機Reflection Viewport蒙版1100
第一個對象的Viewport蒙版1000
第二個對象的Viewport蒙版0110
平面反射Viewport遮罩反射面材质的1110

In the first example, the object's Viewport mask doesn't match the camera's reflection Viewport mask. However, it matches the camera's Viewport mask, so the object is rendered. 在第一个示例中,对象的Viewport遮罩与相机的反射Viewport遮罩不匹配。但是,它与摄影机的Viewport蒙版匹配,因此将渲染对象。

In the second example, the object's Viewport mask doesn't match the camera's Viewport mask. However, it matches the camera's Reflection Viewport mask and the planar reflection's Viewport mask, so the reflection is rendered. 在第二个示例中,对象的Viewport掩码与相机的Viewport掩码不匹配。但是,它与相机的Reflection Viewport遮罩相匹配,因此与平面反射的Viewport遮罩匹配,因此将渲染反射。

Shadow Mask
Shadow Mask#

The Shadow mask controls rendering of a shadow cast by an object lit by a light source. Shadow蒙版控制由光源照明的对象投射的阴影的渲染。

For a shadow to be rendered, the Shadow mask of the light source that illuminates the object must match the following masks (one bit at least):要渲染阴影,照亮对象的光源的Shadow遮罩必须与以下遮罩匹配(至少一位):

  • Object surface Shadow mask (Parameters window → Node tab → Surfaces section → Rendering field)物体表面Shadow蒙版(Parameters窗口→Node选项卡→Surfaces部分→Rendering字段)
  • Object material Shadow mask (Parameters window → Node tab → Surface Material section → Common tab → Options field)对象材质Shadow蒙版(Parameters窗口→Node选项卡→Surface Material部分→Common选项卡→Options字段)

Usage Example
使用范例#

The example below demonstrates the difference. On the left, the Shadow masks of the surface and its material have all bits enabled, thus they have one bit matching the Shadow mask of the light source, and the shadow is rendered. On the right, the Shadow masks of the surface and its material don't match the Shadow mask of the light source, so the shadow isn't rendered.下面的示例演示了区别。在左侧,启用了表面及其材质的Shadow遮罩的所有位,因此它们具有与光源的Shadow遮罩相匹配的一位,并渲染了阴影。在右侧,表面的Shadow遮罩及其材质与光源的Shadow遮罩不匹配,因此不会渲染阴影。

Shadow mask of the surface and its material表面及其材质的Shadow蒙版
Shadow mask of the surface and its material表面及其材质的Shadow蒙版
Shadow mask of the light source光源的Shadow蒙版
Shadow mask of the light source光源的Shadow蒙版

See one more usage example in our video tutorial on bit masking.请参阅我们的 有关位掩码的视频教程中的另一个用法示例

Material Mask
Material Mask#

注意
Decal mask was renamed Material mask. Decal掩码重命名为Material掩码。

A Material mask is a 24-bit mask that specifies objects onto which the decal can be projected. An object or one of its surfaces can receive the decal only if the object's Material mask corresponds to the Material mask of the decal. Material遮罩是一个24位遮罩,用于指定可以在其上投影贴花的对象。仅当对象的Material蒙版与贴花的Material蒙版相对应时,对象或其表面之一才能接收贴花。

The Material mask can be specified for a selected material on the Parameters tab of the material editor:可以在材质编辑器的Parameters选项卡上为选定的材质指定Material蒙版:

Material mask field Material掩码字段

See how the decal projection area can be restricted using the Material mask in our video tutorial on bit masking.在我們有關位掩碼的視頻教程中,了解如何使用Material掩碼限制貼花投影區域

Intersection Mask
Intersection Mask#

The Intersection mask specifies objects (including objects, nodes, shapes, collision objects, and obstacles) for which intersections will or won't be found. An intersection is found only if the Intersection mask of the object matches the Intersection mask passed as a function argument, otherwise it is ignored. Intersection遮罩指定将(或不会)找到交叉点的对象(包括对象,节点,形状,碰撞对象和障碍物)。仅当对象的Intersection掩码与作为函数参数传递的Intersection掩码匹配时,才找到相交,否则将忽略该相交。

The mask for the object's surface can be specified via UnigineEditor or API.可以通过UnigineEditor或 API 指定对象表面的遮罩。

The Intersection mask can be used to clarify the object search or increase performance by limiting the number of objects that can participate in intersections. Intersection掩码可用于限制对象的数量,以限制对象的参与或通过交叉路口来提高性能。

Our video tutorial on bit masking features two use cases of the Intersection mask: excluding objects from intersection detection and cutting out grass.我们有关位掩码的视频教程介绍了Intersection掩码的两种使用情况: 从交集检测中排除对象剪草

Collision Mask
Collision Mask#

The Collision mask allows you to filter particular shapes and bodies for physical interaction: only objects with the matching Collision mask will collide. If masks do not match, shapes and bodies simply ignore each other by going through. Collision遮罩允许您过滤特定的形状和物体以进行物理交互:只有具有匹配的Collision遮罩的对象才会碰撞。如果蒙版不匹配,则形状和实体将通过相互忽略。

For example, we have four bodies that should collide in the following way:例如,我们有四个物体应该以以下方式碰撞:

Body A Body B Body C Body D
Body A
Body B
Body C
Body D

For that, each colliding body should share 1 in the appropriate bit position:为此,每个碰撞体应在适当的位位置共享1

身體 蒙版
Body A 0001
Body B 0010
Body C 0110
Body D 1111

See how the Collision mask works in our video tutorial on bit masking.在我們 有關位掩碼的視頻教程中,了解Collision掩碼的工作原理。

Exclusion Mask
Exclusion Mask#

An analogue of the Collision mask but working vice versa. It is used to prevent collisions of the shape with other shapes. For shapes with matching Collision masks not to collide, at least one bit of their Exclusion mask should match. 0 enables collisions with all shapes with matching Collision masks. This mask is independent of the Collision mask. Collision掩码的类似物,反之亦然。用于防止形状与其他形状的碰撞。对于具有匹配的Collision蒙版不碰撞的形状,其Exclusion蒙版的至少一位应匹配。 0 启用具有匹配的Collision蒙版的所有形状的碰撞。此掩码独立于Collision掩码。

注意
Can be used for Shape-Shape collisions only.只能用于形状-形状碰撞

See how the Exclusion mask works in our video tutorial on bit masking.在我們 有關位掩碼的視頻教程中,了解Exclusion掩碼的工作原理。

Physics Intersection Mask
Physics Intersection Mask#

Physics intersections (between physical objects with bodies and collider shapes, or ray intersections with collider geometry) use a separate mask, other than the one described above and used for world intersections (i.e., between object bound volumes, or ray intersections with object surfaces). This offers more flexibility enabling you to control them independently. 物理相交(具有物體和碰撞體形狀的物理對象之間,或具有碰撞體幾何形狀的光線相交之間)使用單獨的蒙版,與上述描述的蒙版不同 並用於世界交集(即對象綁定的體積之間或與對象表面的射線交集之間)。 這提供了更大的靈活性,使您可以獨立控制它們。

Physics intersections can be used, for example, to detect collisions of spawned particles with physical shapes and bodies, or static collider surfaces to ensure proper interaction, or as a quick way to detect collisions for raycast-wheels of a simulated ground vehicle, or to check if a destructible object or a player was hit by a projectile.物理相交可用于例如检测生成的粒子与物理形状和物体的碰撞,或用于确保正确交互的静态碰撞器表面,或用作检测模拟地面车辆射线轮的快速方法,或检查是否有可摧毁的物体或玩家被弹丸击中。

The Physics Intersection mask can be specified via the UnigineEditor or via API for a particle system, a shape, a fracture body, a player actor, or a wheel joint to enable selective physics intersection detection or increase performance by limiting the number of objects that can participate in physics intersections. It san also be set for the object's surface (if this object has no body or shape assigned and is to be treated as a static collider) via UnigineEditor or API.可以通過UnigineEditor或通過針對粒子系統shape骨折體playeractor或#的API指定Physical Intersection蒙版。號車輪接頭,可通過限制可參與物理相交的對像數量來進行選擇性的物理相交檢測或提高性能。也可以通過UnigineEditorAPI為對象的表面設置該對象(如果該對像沒有指定實體或形狀,則應被視為靜態碰撞體)。

Physical Mask
Physical Mask#

A bit mask that filters objects interacting with physical nodes: force, wind, water. This mask is set according to the same principle as the collision mask. For example, a body with a mismatching mask placed in the physical water will not float.用于过滤与物理节点交互的对象的位掩码:force, wind, water。根据与collision mask相同的原理设置此掩码。例如,在物理水中放置面罩不匹配的身体不会漂浮。

An example of the Physical mask working with physical effects is shown in our video tutorial on bit masking.有關位掩碼的視頻教程中,顯示了使用Physical掩碼進行物理效果的示例。

Sound Sources Masks
声源口罩#

Masks can be set via both UnigineEditor and API. 掩码可以通过UnigineEditor和 API 进行设置。

To see and hear how sound-related masks are used, watch our video tutorial on bit masking.要查看和听到与声音相关的遮罩的用法,请观看我们的 有关位遮罩的视频教程

Source Mask
Source Mask#

A bit mask that determines to what sound channels the sound source belongs to. For a sound source to be heard, its mask should match the player's sound mask in at least one bit.一个位掩码,用于确定声源所属的声道。要听到声音,其面具应至少与播放器的声音面具相匹配。

Reverb Mask
Reverb Mask#

A bit mask that determines which reverberation zones can be heard. For sound to reverberate, at least one bit of this mask should match the player's reverberation mask. At the same time, the Reverb mask of the player should match the Reverb mask of the sound source (but not necessarily in the same bits).一个位掩码,用于确定可以听到哪些混响区。为了使声音回响,此蒙版的至少一位应与玩家的回响蒙版相匹配。同时,播放器的Reverb掩码应与聲源的Reverb蒙版(但不必在同一位)。

Occlusion Mask
Occlusion Mask#

A bit mask that determines which sound sources are occluded by the selected surface. For a sound source to be occluded by the surface, at least one bit of this mask should match the Occlusion mask of the sound source.一个位掩码,用于确定所选表面遮挡了哪些声源。为了使声源被表面遮挡,此蒙版的至少一位应与声源的Occlusion蒙版匹配。

注意
Source Occlusion must be enabled in the Sound Settings window.必须在Sound SettingsSource Occlusion窗口中启用

Navigation Mask
Navigation Mask#

The Navigation mask is used to specify navigation areas that participate or don't participate in pathfinding. The Navigation mask should match the Navigation mask of the route that is calculated within the navigation area; otherwise, the area does not participate in pathfinding. Navigation掩码用于指定参与或不参与寻路的导航区域Navigation掩码应与导航区域内计算的在導航區域內計算的路線Navigation掩碼; 否則,該區域不參與尋路。

The Navigation mask for the navigation areas can be specified via:导航区域的Navigation掩码可以通过以下方式指定:

  • UnigineEditor in the Navigation Sector/Navigation Mesh section of the Parameters window 窗口的Navigation Sector/Navigation MeshParameters部分中的UnigineEditor
  • Unigine API
注意
The Navigation mask for a route can be specified only via API.只能通过Navigation mask for a 路由API.

Using the Navigation mask, you can limit the number of navigation areas, inside which the specific route can be calculated. For example, you can use the mask to calculate 2 non-intersecting routes inside the intersecting navigation areas. 使用Navigation掩码,您可以限制导航区域的数量,在其中可以计算特定路线。例如,您可以使用遮罩来计算相交导航区域内的2条不相交的路线。

A usage example of the Navigation mask is provided in our video tutorial on bit masking.在我們 有關位掩碼的視頻教程中,了解Navigation掩碼的工作原理。

Obstacle Mask
Obstacle Mask#

The Obstacle mask is used to specify obstacles inside navigation areas that are or aren't bypassed during pathfinding. The Obstacle mask of an obstacle should match the Obstacle mask of the route that is calculated; otherwise, the obstacle is not taken into account. Obstacle掩码用于指定在路径查找过程中已绕过或未绕过的导航区域中的障碍物。障碍物的Obstacle遮罩应与所计算路线的Obstacle遮罩相匹配;否则,不会考虑障碍。

Similar to the navigation mask, the obstacle mask can be specified via:与导航蒙版类似,可以通过以下方式指定障碍蒙版:

  • UnigineEditor in the Obstacle Box/Sphere/Capsule section of the Parameters window 窗口的Obstacle Box/Sphere/CapsuleParameters部分中的UnigineEditor
  • Unigine API
注意
The obstacle mask for a route can be specified only via API. 路线的障碍物遮罩只能通过 API 指定。

A usage example of the Obstacle mask is provided in our video tutorial on bit masking.在我們 有關位掩碼的視頻教程中,了解Obstacle掩碼的工作原理。

Field Mask
Field Mask#

The Field mask defines if an object such as grass, water, or clouds interacts with a field object. The Field mask of a field node should match the Field mask of the grass, water, or cloud layer. Field掩码定义了草、水或云等对象是否与Field对象相互作用。字段节点的Field掩码应与草,水或云层的Field掩码匹配。

The Field mask can be set via UnigineEditor or API.可以通过UnigineEditor或API设置Field掩码。

A usage example of the Field mask is provided in our video tutorial on bit masking.在我們 有關位掩碼的視頻教程中,了解Field掩碼的工作原理。

Particles Field Mask
Particles Field Mask#

The Particles Field mask is used for interaction of particles with Particles Field nodes (Deflectors and Spacers). Emitted particles will be affected by a Particles Field only if their masks match (one bit at least).Particles Field 掩码用于粒子与Particles Field 节点(DeflectorsSpacers)的相互作用。只有当它们的掩码匹配(至少一个比特)时,发射的粒子才会受到Particles Field的影响。

最新更新: 2024-08-16
Build: ()