This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Программирование на C#
Рендеринг
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
API
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
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Entity-Related Properties

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Sim SDK edition to use it.

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.
  • 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.

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).

Basically there are 3 layers of LODs:

  1. Surfaces Layer - UNIGINE's standard LOD System
  2. Simplifier Nodes - when nodes change their enabled flag and detached from parent
  3. Billboard Nodes - whole nodes become disabled (hidden) and only substituting billboards are shown

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:

Surface LODs can be combined with Simplifier LODs:

  • At a distance of 1000 and closer flaps are represented by separate meshes
  • If the plane is at a distance of 1000+ we can hide all flaps and enable a surface LOD for wings with flaps.

The last Billboard node replaces all model's geometry at a certain distance.

The Simplifier component has its own distance scale which enables quick tuning of the simplification process while balancing between quality and performance.

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.

Notice
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.
  2. Assign the EffectAircraft property to each node representing visual effects of various types.

    The following property parameters are available:

    • Node — a node to be enabled/disabled
    • Emitter Node — a node emitting particles for the effect
    • Default Enable — indicates whether the effect should be enabled by default
    • Effect Type — aircraft effect type selection (engine or landing gear fire, smoke, contrail, etc.)
    • Wind Dependent — indicates whether the effect is affected by wind or not

Landing Gears#

  1. Assign the LandingGears property to the parent node (aircraft).

    The following property parameters are available:

    • Gear — indicates that gears are extended
    • Time Covers — cover opening time, in seconds
    • Time Gears — gear extension time, in seconds
    Notice
    Make sure all pivots are set up properly.
  2. Define which nodes represent parts of landing gears and assign the LandingGearPart property to them.

    The following property parameters are available:

    • Node — the node to be moved (usually the node to which this property is assigned)
    • Is Cover — indicates whether the part is a cover or not (a cover is opened prior to gear extension)
    • 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.
      Notice
      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.
    • Rotate — indicates whether the part should rotate
    • Axis — coordinates of the part's rotation axis
    • Extension Angle — rotation angle of the part, when the gear is extended, in degrees
    • Retraction Angle — rotation angle of the part, when the gear is retracted, in degrees
    • Cover Closable — indicates whether the cover should close after gear extension, or to stay open

Wheels#

The Wheel property is intended for wheels or groups of wheels to fine-tune their behavior to make them look more natural:

  • 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.
  • Take-off Speed Damping — gradual slowing down of the wheel rotation after take-off to avoid its abrupt stop that looks unnatural.
  • Contact Point Offset — the value (in meters) that allows fine-tuning the ground contact point for the wheel.
  • 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.
  • Emitter Node — a node that emits particles to create a certain effect such as dust, mud, or splashes generated by the wheels.

The ground contact check is fine-tuned via the WheelControl property that allows setting the update period for this check in times per second:

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.
  2. Assign the LightAircraft property to each node representing aircraft lights of various types.

  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:

Aircraft lights control example:

Source code (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.

Interaction with Water#

For objects and entities that are able to float on water, the WaterClamp property is available.

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.
  • Point Front Center — front waterline point.
  • Point Back Left — rear left waterline point.
  • Point Back Right — rear right waterline point.
  • Intertia — relative weight value: the more the value, the heavier the object seems.
Notice
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.
  • The entity should have the Ground Clamp attribute set to one of the following values:
    • NON_CONFORMAL — the entity takes into account only the water height.
    • CONFORMAL — the entity takes into account both the height and the normals of the water surface.

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.

Last update: 17.04.2021
Build: ()