This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Professional (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Materials and Shaders
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Настройки освещения

Внимание
Функционал, описанный в этой статье, недоступен в Community редакции SDK.
Чтобы использовать этот функционал вам необходимо получить лицензию на Sim SDK.

Light is an integral part of every scene, and the number of light sources in the world can be close to infinite with all aircraft lights and strobes, airport and city illumination, strobes and so on.Свет является неотъемлемой частью каждой сцены, и количество источников света в мире может быть почти бесконечным, включая огни и стробоскопы самолетов, освещение аэропортов и городов, стробоскопы и т.д.

Light sources are categorized by their application — on an aircraft or in the scene:Источники света классифицируются по их применению - в самолете или на месте происшествия:

  • Aircraft lights are controlled via the LightAircraft property and are described in ig_config.xml as entity components.Огни самолета управляются с помощью свойства LightAircraft и описаны в ig_config.xml как компоненты сущности .
  • To manage all ground-based light sources fast and easy, the Light Controller system is used. You can arrange all lights in the scene into the hierarchy using the LightSourceComponent property and enable or disable certain groups of lights, surfaces, or materials according to your needs, adjust their intensity, or make them strobes. For light sources that do not require manual control and depend only on time of day, AutomaticTimeLightingComponent is foreseen. This component manages automatic switching on/off the light depending on the position of the sun and moon.Для быстрого и удобного управления всеми наземными источниками света используется система Light Controller. Вы можете расположить все источники света в сцене в иерархию с помощью свойства LightSourceComponent и включить или отключить определенные группы источников света, поверхностей или материалов в соответствии с вашими потребностями, отрегулировать их интенсивность или сделать их стробоскопами. Для источников света, которые не требуют ручного управления и зависят только от времени суток, предусмотрено AutomaticTimeLightingComponent. Этот компонент управляет автоматическим включением / выключением света в зависимости от положения солнца и луны.

See AlsoСмотрите также#

  • The IG plugin API section for more details on managing IG via code (C++).Раздел API плагина IG для более подробной информации об управлении IG через код (C ++).

LightAircraftОсвещение воздушных судов#

Setting aircraft lights requires the use of two components: LightAircraft and LightAircraftController.Настройка освещения самолетов требует использования двух компонентов: LightAircraft и LightAircraftController.

LightAircraft is assigned to light nodes of an aircraft. The following parameters are available:LightAircraft назначается узлам самолета, отвечающим за освещение. Доступны следующие параметры:

  • Light Type — type of the aircraft light.Light Type - тип света самолета.
  • Source Type — type of the light source.
    • Node Switch — the node can be enabled and disabled. The min and max light intensity in this case is set for light nodes only.Node Switch — the node can be enabled and disabled. The min and max light intensity in this case is set for light nodes only.
    • Emissive Surface — emission is enabled and disabled for the specified surface or surfaces of the node.Emissive Surface — emission is enabled and disabled for the specified surface or surfaces of the node.

      • Emission-Toggled Node — toggling on disables the node if emission of its surface is disabled.Emission-Toggled Node — toggling on disables the node if emission of its surface is disabled.
      • Surfaces — surfaces for which emission is enabled. To add a surface, type its name the same way it is written in the list of surfaces of this node.Surfaces — surfaces for which emission is enabled. To add a surface, type its name the same way it is written in the list of surfaces of this node.
    • Emissive Material — emission is enabled and disabled globally for the specified material.Emissive Material — emission is enabled and disabled globally for the specified material.

      • Materials — materials for which emission is enabled.Materials — materials for which emission is enabled.
    Node Switch — the node can be enabled and disabled. The min and max light intensity in this case is set for light nodes only.Emissive Surface — emission is enabled and disabled for the specified surface or surfaces of the node.Emission-Toggled Node — toggling on disables the node if emission of its surface is disabled.Surfaces — surfaces for which emission is enabled. To add a surface, type its name the same way it is written in the list of surfaces of this node.Emissive Material — emission is enabled and disabled globally for the specified material.Materials — materials for which emission is enabled.
    Source Type - тип источника света.
    • Node Switch — the node can be enabled and disabled. The min and max light intensity in this case is set for light nodes only.Node Switch - узел можно включать и отключать. Минимальная и максимальная интенсивность света в этом случае устанавливается только для узлов типа источник света (light).
    • Emissive Surface — emission is enabled and disabled for the specified surface or surfaces of the node.Emissive Surface - излучение включено и выключено для указанной поверхности или поверхностей узла.

      • Emission-Toggled Node — toggling on disables the node if emission of its surface is disabled.Emission-Toggled Node - отключает узел, если отключена эмиссия для его поверхности.
      • Surfaces — surfaces for which emission is enabled. To add a surface, type its name the same way it is written in the list of surfaces of this node.Surfaces - поверхности, для которых разрешена эмиссия. Чтобы добавить поверхность, введите ее имя так же, как оно написано в списке поверхностей этого узла.
    • Emissive Material — emission is enabled and disabled globally for the specified material.Emissive Material - эмиссия включена и отключена глобально для указанного материала.

      • Materials — materials for which emission is enabled.Materials - материалы, для которых эмиссия включена.
  • Enabled By Default — the state of the light source when the world is loaded.Enabled By Default - состояние источника света при загрузке мира.
  • Min Intensity and Max Intensity — minimum and maximum intensity of the emitting light. For light nodes, the light intensity is adjusted, for emissive surfaces — the Emission parameter.Min Intensity и Max Intensity - минимальная и максимальная интенсивность излучаемого света. Для узлов источников света настраивается интенсивность света , для эмиссионных поверхностей - параметр Emission.
  • Strobe — strobe mode for the light.Strobe - режим стробоскопа для света.

    • Strobe Program — strobe program used by the light source. The program uses a sequence of indicated time periods in seconds to consecutively enable and disable the light source starting from the Enabled state. For example, a sequence of 0.3;0.05;0.1 means that a strobe is enabled for 0.3 seconds, then disabled for 0.05 seconds, enabled for 0.1 seconds, and then continues to be enabled for 0.3 seconds, etc.Strobe Program - программа стробоскопа, используемая источником света. Программа использует последовательность указанных периодов времени в секундах для последовательного включения и отключения источника света, начиная с состояния Enabled. Например, последовательность 0.3;0.05;0.1 означает, что стробоскоп включен на 0.3 секунд, затем отключен на 0.05 секунд, включен для 0.1 seconds, а затем продолжает включаться на 0.3 секунд и т.д.

LightAircraftController should be assigned to the parent node (aircraft) to make this type of lights work correctly via CIGI. Do not change any parameters in this property.LightAircraftController должен быть назначен родительскому узлу (самолету), чтобы этот тип огней работал правильно через CIGI. Не меняйте никаких параметров в этом свойстве.

Light Controller SystemСистема контроллера освещения#

The Light Controller system allows implementing an arbitrary hierarchy of ground-based light sources. This is performed by setting a category in the LightSourceComponent component assigned to a node.Система Light Controller позволяет реализовать произвольную иерархию наземных источников света. Это выполняется путем установки категории в компоненте LightSourceComponent, назначенном узлу.

Примечание
The position of a node in the World hierarchy does not affect the hierarchy indicated as the light source category.Положение узла в мировой иерархии не влияет на иерархию, указанную как категорию источника света.

Suppose, we have the following hierarchy of scene lights:Предположим, у нас есть следующая иерархия источников света сцены :

  • City
    • Airport
      • runway
        • runway_1
          • PAPI
          • touchdown
        • runway_2
          • PAPI
          • touchdown
    • Downtown
      • street_lights
        • lamppost_1
        • lamppost_2
      • buildings
    • District_2
      • street_lights
        • lamppost_1
        • lamppost_2
      • buildings

Using this hierarchy, you can manage any light or group of lights via the console. To generalize, the asterisk symbol (*) is used. Asterisk inside the path means that all categories on this level are checked; at the end of the path — all categories are selected.Используя эту иерархию, вы можете управлять любым источником света или группой источников света через консоль. Для обобщения используется символ звездочки (*). Звездочка внутри пути означает, что отмечены все категории на этом уровне; в конце пути - выделены все категории.

Shell-команды
lights City/Airport/runway/runway_1/PAPI 1 — enables the PAPI light on runway_1.
lights City/Airport/runway/*/touchdown 1 — enables touchdown lights on runway_1 and runway_2.
lights City/Downtown/* 0 — disables all lights in the downtown area.

To control intensity, values between 0.0 and 1.0 are used:Для управления интенсивностью используются значения от 0.0 до 1.0:

Shell-команды
lights City/District_2/street_lights/lamppost_1 0.4

To enable the strobe mode for the light, 2 is used. For this purpose, the strobe mode should be added to the light component via UNIGINE Editor.Чтобы включить режим стробоскопа для света, используется 2. Для этого нужно добавить режим стробоскопа к световому компоненту через UNIGINE Editor.

Shell-команды
lights City/District_2/street_lights/lamppost_1 2

LightSourceComponentLightSourceComponent#

LightSourceComponent is the basis of the Light Controller system. This component allows setting all conditions describing the light source.LightSourceComponent - это основа системы Light Controller. Этот компонент позволяет задать все условия, описывающие источник света.

The parameters are the same as in the LightAircraft component with the only exception:Параметры такие же, как в компоненте LightAircraft, за исключением:

  • Category — the full path in the hierarchy of lights. The hierarchy of lights is developed by a user to consider all lights in the project and assign the corresponding category to a light. This hierarchy does not have any correlation with the World Nodes hierarchy.Category - полный путь в иерархия огней . Иерархия источников света разрабатывается пользователем, чтобы рассмотреть все источники света в проекте и присвоить источнику света соответствующую категорию. Эта иерархия не имеет никакого отношения к World Nodes hierarchy.

AutomaticTimeLightingComponentAutomaticTimeLightingComponent#

AutomaticTimeLightingComponent is designed for lights that do not require manual control and need to be switched on and off depending on time of day. This component should be assigned to a node that is always enabled in the scene.AutomaticTimeLightingComponent предназначен для светильников, которые не требуют ручного управления и должны включаться и выключаться в зависимости от времени суток. Этот компонент должен быть назначен узлу, который всегда включен в сцене.

This example component enables car daytime running lights from 6:00:00 to 23:12:35, and all downtown lights and car headlights — from 23:12:35 to 6:00:00Этот пример компонента включает автомобильные дневные ходовые огни от 6:00:00 до 23:12:35, а все огни в центре города и автомобильные фары - от 23:12:35 до 6:00:00.

Time of day can be defined either using the Sun position or the sunrise and sunset time — the approach is selected via the Control Type parameter.Время суток можно определить либо с помощью положения Солнца, либо с помощью времени восхода и захода солнца - подход выбирается с помощью параметра Control Type.

  • Disabled — automatic control of lights depending on time of day is disabled.Disabled - автоматическое управление освещением в зависимости от времени суток отключено.
  • Celestial — the Sun position is used to define time of day. The Sun Zenith Threshold parameter is available for fine-tuning.Celestial - положение Солнца используется для определения времени суток. Параметр Sun Zenith Threshold доступен для точной настройки.
  • Time — the Sunrise and Sunset Time is set to define time of day in hours, minutes, and seconds.Time - Sunrise и Sunset Time установлены для определения времени дня в часах, минутах и секундах.

Four categories of automatically controlled light sources are provided:Предусмотрены четыре категории автоматически управляемых источников света:

  • Categories Day Enabled — categories of the light sources hierarchy that should be enabled during the day-time and disabled during the night-time.Categories Day Enabled - категории иерархия источников света которые должны быть включены в дневное время и отключены в ночное время.
  • Categories Night Enabled — categories of the light sources hierarchy that should be enabled during the nignt-time and disabled during the day-time.Categories Night Enabled - категории иерархия источников света которые должны быть включены в ночное время и отключены в дневное время.
  • Materials Day Enabled — materials that should be enabled during the day-time and disabled during the night-time.Materials Day Enabled - материалы, которые должны быть включены в дневное время и отключены в ночное время.
  • Materials Night Enabled — materials that should be enabled during the nignt-time and disabled during the day-time.Materials Night Enabled - материалы, которые должны быть включены в ночное время и отключены в дневное время.

Controlling Light via CIGIУправление светом через CIGI#

To make light control available via CIGI, the corresponding components should be added to the configuration file as Global Terrain components.Чтобы сделать управление освещением доступным через CIGI, соответствующие компоненты должны быть добавлены в файл конфигурации как компоненты Global Terrain.

Исходный код (XML)
<?xml version="1.0" encoding="utf-8"?>
    <property version="2.14.0.0" name="WaterDropAircraftController" manual="1" parent_name="node_base">
		<cigi_global_terrain_components>
		   <component_light id="0" name="city_all">CITY/*</component_light>
		   <component_light id="1" name="city_airport">CITY/AIRPORT/*</component_light>
		   <component_light id="2" name="city_streetlights">CITY/DOWNTOWN/STREET_LIGHTS/*</component_light>
		</cigi_global_terrain_components>

Then these components should be passed to CIGI via the ComponentControl packet as follows:Затем эти компоненты должны быть переданы в CIGI через пакет ComponentControl следующим образом:

  • Component Class: Global Terrain
  • Instance ID: --- (в настоящее время не поддерживается)
  • Component ID: соответствующий идентификатор component_light из файла конфигурации.
  • Component State: 1 (вкл.) или 0 (выкл.)
  • Component Data 1: (FLOAT) от 0 до 1 для интенсивности
  • Component Data 2: (INT32) 1 (вкл.) или 0 (выкл.) для стробоскопа
Последнее обновление: 10.10.2022
Build: ()