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版本。

实体相关属性

警告
本文介绍的功能在 Community SDK 版本中不可用。
您应该升级到 Sim SDK版本才能使用它。

Each time you add a new model representing an entity to the world you should assign all necessary properties and adjust their parameters to ensure proper integration into the simulation environment.每次您添加代表实体对于世界,您应该分配所有必要的属性并调整其参数,以确保正确集成到仿真环境中。

Before you start configuring properties, check that all pivot axes for the model are set properly:在开始配置属性之前,请检查是否正确设置了模型的所有枢轴

  • The main pivot for the aircraft model should be set close to its center, with X axis pointing to the right and Y axis pointing forward.飞机模型的主枢轴应设置在其中心附近,其中X轴指向右侧,而Y轴指向前方。
  • Horizontal parts should have their pivot axes oriented along the +X (left-to-right relative to the plane), while vertical ones — along the +Z (bottom-to-top). Initial rotation angles of parts do not matter, important is that they should be in neutral position: extended — for gears, and retracted — for flaps.水平零件的枢轴应沿+X(相对于平面从左到右)定向,而垂直零件的枢轴应沿+Z(从下至上)定向。零件的初始旋转角度无关紧要,重要的是它们应处于中间位置:伸出(用于齿轮)和缩回(用于风门)。

Model Simplification模型简化#

The Simplifier component can help optimize rendering of your entities. This component, when assigned to an entity, enables you to define which parts of its model can be neglected starting at certain distance levels (e.g., hide flaps, ailerons, and rudders at 1km, engines at 5 km, etc.) and which substitutes can be used to represent an entity at a large distance (e.g., a flashing strobe light, when the plane is just a point on the screen).Simplifier组件可以帮助优化实体的呈现。通过将此组件分配给实体,您可以定义从某个距离级别开始可以忽略其模型的哪些部分(例如,在1 km处的皮革襟翼,副翼和方向舵,在5 km处的引擎等)以及可以替代的部分可以用于表示远距离的实体(例如,当平面只是屏幕上的一个点时,频闪灯闪烁)。

Basically there are 3 layers of LODs:基本上有3层LOD:

  1. Surfaces Layer — UNIGINE's standard LOD SystemSurfaces Layer — UNIGINE的标准LOD系统
  2. Simplifier Nodes — when nodes change their enabled flag and detached from parentSimplifier Nodes —当节点更改其enabled标志并与父节点分离时
  3. Billboard Nodes — whole nodes become disabled (hidden) and only substituting billboards are shownBillboard Nodes —禁用(隐藏)整个节点,仅显示替换广告牌

To configure model simplification, assign a property inherited from the Simplifier to the node, and indicate which nodes are to be hidden at which distance, and when to substitute your model with an impostor:要配置模型简化,请将从Simplifier继承的属性分配给该节点,并指示要在哪个距离隐藏哪些节点,以及何时用冒名顶替者替代模型:

Surface LODs can be combined with Simplifier LODs:曲面LOD可以与Simplifier LOD结合使用:

  • At a distance of 1000 and closer, flaps are represented by separate meshes.在1000或更近的距离处,襟翼由单独的网格表示。
  • If the plane is at a distance of 1000+, we can hide all flaps and enable a surface LOD for wings with flaps.如果飞机的距离为1000+,我们可以隐藏所有襟翼并为具有襟翼的机翼启用表面LOD。

The last Billboard node replaces all model's geometry at a certain distance.最后的Billboard节点将在一定距离处替换所有模型的几何图形。

The Simplifier component has its own distance scale value which enables quick tuning of the simplification process while balancing between quality and performance.Simplifier组件具有其自己的distance scale值,该值可以快速调整简化过程,同时在质量和性能之间取得平衡。

Prespawned Entities预先产生的实体#

You can create entities not only from code, but via UnigineEditor as well. This is achieved by assigning the EntityComponent property to an object. The entity in this case will already exist in the world, and all settings attributable to its type will be uploaded on the world load.您不仅可以从代码中创建实体,还可以通过UnigineEditor创建实体。这是通过将EntityComponent属性分配给对象来实现的。在这种情况下,实体将已经存在于世界中,并且归因于其类型的所有设置都将在世界负载中上载。

注意
The type of such entity cannot be changed at run time.此类实体的类型无法在运行时更改。

Aircraft Effects飞机效果#

This section contains actions to be performed to set up various aircraft effects (engine or landing gear fire, smoke, contrail, etc.).本节包含为设置各种飞机效果(引擎或起落架起火,冒烟,降落之类的东西)而要执行的操作。

  1. Assign the EffectAircraftController property to the parent node (aircraft) and leave all parameters unchanged.EffectAircraftController属性分配给父节点(飞机),并保持所有参数不变。
  2. Assign the EffectAircraft property to each node representing visual effects of various types.EffectAircraft属性分配给表示各种类型的视觉效果的每个节点。

    The following property parameters are available:可以使用以下属性参数:

    • Node — a node to be enabled/disabledNode —要启用/禁用的节点
    • Emitter Node — a node emitting particles for the effectEmitter Node —为该效果发射粒子的节点
    • Default Enable — indicates whether the effect should be enabled by defaultDefault Enable —指示是否应默认启用效果
    • Effect Type — aircraft effect type selection (engine or landing gear fire, smoke, contrail, etc.)Effect Type-飞机效果类型选择(引擎或起落架起火,冒烟,降落等)
    • Wind Dependent — indicates whether the effect is affected by wind or notWind Dependent —指示效果是否受风影响

Landing Gears起落架#

  1. Assign the LandingGears property to the parent node (aircraft).LandingGears属性分配给父节点(飞机)。

    The following property parameters are available:可以使用以下属性参数:

    • Gear — indicates that gears are extendedGear —表示齿轮已伸出
    • Time Covers — cover opening time, in secondsTime Covers —封盖打开时间,以秒为单位
    • Time Gears — gear extension time, in secondsTime Gears —齿轮伸出时间,以秒为单位
    注意
    Make sure all pivots are set up properly.确保所有枢轴均设置适当地。
  2. Define which nodes represent parts of landing gears and assign the LandingGearPart property to them.定义代表起落架零件的节点,并将LandingGearPart属性分配给它们。

    The following property parameters are available:可以使用以下属性参数:

    • Node — the node to be moved (usually the node to which this property is assigned)Node —要移动的节点(通常是分配了此属性的节点)
    • Is Cover — indicates whether the part is a cover or not (a cover is opened prior to gear extension)Is Cover —表示零件是否是盖子(在扩展齿轮之前打开盖子)
    • Use Dummy Cover — indicates whether the wheel well is to be covered with a dummy cover after gear retraction. When enabled, an additional When Extended option is displayed. It is used to specify whether the dummy cover shall be visible when the gear is extended.Use Dummy Cover —指示在收起齿轮后是否用假人盖覆盖轮舱。启用后,将显示附加的When Extended选项。它用于指定在扩展齿轮时是否应能看到伪装盖。

      注意
      If this option is enabled, the Node field should not contain the node to which this property is assigned, as the component will be disabled forever after retraction.如果启用此选项,则Node字段不应包含分配了此属性的节点,因为收回该组件后,该组件将永远被禁用。
    • Rotate — indicates whether the part should rotateRotate —指示零件是否应该旋转
    • Axis — coordinates of the part's rotation axisAxis —零件旋转轴的坐标
    • Extension Angle — rotation angle of the part, when the gear is extended, in degreesExtension Angle —延伸齿轮时零件的旋转角度,以度为单位
    • Retraction Angle — rotation angle of the part, when the gear is retracted, in degreesRetraction Angle —撤回齿轮时零件的旋转角度,以度为单位
    • Cover Closable — indicates whether the cover should close after gear extension, or to stay openCover Closable —指示在延长齿轮后盖应该关闭还是保持打开状态

Wheels轮圈#

The Wheel property is intended for wheels or groups of wheels to fine-tune their behavior to make them look more natural:Wheel属性用于车轮或车轮组以微调其行为,使它们看起来更自然:

  • Always on Ground — is used for optimization: if the vehicle is not intended to fly, it doesn't require any ground contact checks, therefore some effort can be saved.Always on Ground —用于优化:如果车辆不打算飞行,则不需要进行任何地面接触检查,因此可以节省一些精力。
  • Take-off Speed Damping — gradual slowing down of the wheel rotation after take-off to avoid its abrupt stop that looks unnatural.Take-off Speed Damping —起飞后逐渐放慢车轮旋转,以避免其突然停止看起来不自然。
  • Contact Point Offset — the value (in meters) that allows fine-tuning the ground contact point for the wheel.Contact Point Offset —允许微调车轮接地点的值(以米为单位)。
  • Wheel Steering — enables automatic steering of the wheel at the vehicle turning without any additional coding. You can also make the wheel rotate to the opposite direction by using the Invert Steering parameter and set the required Max Steering Angle.Wheel Steering —在车辆转弯时自动方向盘转向而无需任何其他编码。您还可以使用Invert Steering参数使砂轮向相反的方向旋转,并设置所需的Max Steering Angle
  • Emitter Node — a node that emits particles to create a certain effect such as dust, mud, or splashes generated by the wheels.Emitter Node —一个节点,该节点发出粒子以产生某种效果,例如轮毂产生的灰尘,泥土或飞溅。

The ground contact check is fine-tuned via the WheelControl property that allows setting the update period for this check in times per second:地面接触检查通过WheelControl属性进行了微调,该属性允许设置每秒更新此检查的时间:

Aircraft Lights飞机灯#

This section contains actions to be performed for controlled aircraft lights (landing, taxi, beacon, navigation, etc.).本节包含对受控飞机灯(着陆,滑行,信标,导航等)要执行的操作。

  1. Assign the LightAircraftController property to the parent node (aircraft) and leave all parameters unchanged.LightAircraftController属性分配给父节点(飞机),并保持所有参数不变。
  2. Assign the LightAircraft property to each node representing aircraft lights of various types.LightAircraft属性分配给表示各种类型的飞机灯的每个节点。

  3. Set up the light parameters.设置灯光参数

Aircraft Lights Control飞机灯控制#

Aircraft lights are controlled automatically by the IG. In case you implement some custom IG logic, you can control lights of an aircraft via code as follows:飞机灯由IG自动控制。如果实现某些自定义IG逻辑,则可以通过以下代码控制飞机的灯光:

Aircraft lights control example:飞机灯控制示例:

源代码 (C++)
// getting an aircraft entity by its ID (see data/ig_config.xml)
Entity *entity = ig_manager->getEntity(__entity_id__);

// getting a property for the component by its ID (see data/ig_config.xml)
PropertyPtr p_light_outer = entity->getComponent(__component_id_from_config__)->getProperty();

// enable all lights (landing, taxi, etc.) for the aircraft
p_light_outer->getParameterPtr("landing")->setValueToggle(1);
p_light_outer->getParameterPtr("taxi")->setValueToggle(1);
p_light_outer->getParameterPtr("navigation")->setValueToggle(1);
p_light_outer->getParameterPtr("beacon")->setValueToggle(1);
p_light_outer->getParameterPtr("strobe")->setValueToggle(1);
p_light_outer->getParameterPtr("logo")->setValueToggle(1);

Lights#

Lights available in the scene and not referring to any aircraft can also be controlled.也可以控制场景中可用的且不指向任何飞机的灯光。

It is possible to control lights manually by assigning LightSourceComponent to them or automatically depending on time of day — in this case AutomaticTimeLightingComponent should be used.可以通过为灯光分配LightSourceComponent来手动控制灯光,也可以根据一天中的时间自动控制灯光-在这种情况下,应使用AutomaticTimeLightingComponent

Interaction with Water与水的相互作用#

For objects and entities that are able to float on water, the WaterClamp property is available.对于能够在水上漂浮的对象和实体,可以使用WaterClamp属性。

The following parameters are available:可以使用以下参数:

  • Clamp Enable — enabling the option identifies that the entity has the possibility to interact with the water surface (float on it), which is implemented according to IG commands. The Forced value makes the entity always be clamped to the water surface, which is suitable for boats, for example.Clamp Enable —启用该选项可标识实体有可能与水表面(浮在水上)交互,这是根据IG命令实现的。 Forced值使实体始终固定在水面,例如,它适用于船。
  • Point Front Center — front waterline point.Point Front Center —前水线点。
  • Point Back Left — rear left waterline point.Point Back Left —左后水线点。
  • Point Back Right — rear right waterline point.Point Back Right —右后水线点。
  • Intertia — relative weight value: the more the value, the heavier the object seems.Intertia —相对重量值:该值越大,物体看起来越重。
注意

The following adjustments should be done to make water clamping work properly:为了使锁水工作正常,应进行以下调整:

  • Intersection Mask of the Global Water object should be enabled and correlate with the IG terrain_intersection_mask.Intersection Global Water对象的掩码应启用,并与IG terrain_intersection_mask相关。
  • The entity should have the Ground Clamp attribute set to one of the following values:实体应将Ground Clamp属性设置为以下值之一:

    • NON_CONFORMAL — the entity takes into account only the water height.NON_CONFORMAL-实体仅考虑水位。
    • CONFORMAL — the entity takes into account both the height and the normals of the water surface.CONFORMAL-实体同时考虑了水面的高度和法线。

Synchronization同步化#

When running IG with Syncker, it is required to synchronize entities to have their movements displayed both on the master and slave computers. This can be done either via code (Master::addSyncNode()), or using the property: in the Editor, assign the AddSyncNode property to the nodes that should be synchronized.当使用Syncker运行IG时,需要同步实体以使其活动显示在主计算机和从计算机上。这可以通过代码(Master::addSyncNode())或使用属性来完成:在编辑器中,将AddSyncNode属性分配给应同步的节点。

最新更新: 2022-04-20
Build: ()