IG Configuration
All IG configuration parameters (variables such as system settings, connector parameters, date, time and weather, databases, and entity definitions) are stored in a single file named ig_config.xml. It is an ordinary *.xml file with the following structure (example):
<?xml version="1.0" encoding="utf-8"?>
<ig_config>
<variables>
<!-- ==== ADAPTIVE QUALITY SYSTEM ======================= -->
<group name="AdaptiveQualitySystem">
<item name="mode" type="int">0</item>
<item name="debug" type="int">0</item>
<item name="sleep_period_after_world_load" type="float">-1.000000</item>
<item name="cpu_budget" type="float">-1.000000</item>
<item name="threshold" type="float">-1.000000</item>
<item name="change_period" type="float">-1.000000</item>
</group>
<!-- ==== CONNECTOR PARAMETERS ======================= -->
<group name="CIGIConnector">
<item name="version" type="string">3.3</item>
<item name="host">127.0.0.1</item>
<item name="send_port">8889</item>
<item name="recv_port">8888</item>
<item name="view_id">0</item>
</group>
<!-- ==== DATE AND TIME SETTINGS ======================= -->
<group name="SkyMap">
<item name="timezone" type="int">0</item>
<item name="datetime" type="string">2003-12-06T10:30:00</item>
</group>
<!-- ==== WEATHER SETTINGS ======================= -->
<group name="Meteo">
<item name="visibility_transition_time" type="float">3.000000</item>
<item name="precipitations_transition_time" type="float">3.000000</item>
<item name="cloud_transition_time" type="float">3.000000</item>
<item name="visibility_tracker" type="string">ig/weather/tracks/visibility.track</item>
<item name="overcast_preset_tracker" type="string">ig/weather/tracks/clouds_environment.track</item>
<item name="clouds_density_tracker" type="string">ig/weather/tracks/clouds_density.track</item>
<item name="rain" type="string">ig/weather/fx/rain_particles/nodes/rain_particles.node</item>
<item name="snow" type="string">ig/weather/fx/snow_particles/nodes/snow_flakes.node</item>
<item name="lightning" type="string">ig/weather/fx/lightning/nodes/lightning_particles.node</item>
</group>
</variables>
<!-- ==== DATABASE LIST ======================= -->
<databases>
<database id="1" world_name="world_1"/>
</databases>
<!-- ==== ENTITY DEFINITIONS ======================= -->
<entity_types>
<entity id="118" name="a321">
<path>my_project/entities/aircrafts/A321/a321_air_France.node</path>
<component id="0" name="light_outer">
<property>LightAircraftController</property>
<parameter name="state">enabled</parameter>
<parameter name="data1">landing</parameter>
<!-- ..... -->
<parameter name="data6">logo</parameter>
</component>
<!-- ..... -->
<articulated_part id="1" name="aileron">
<node invert_pitch="1">aileron_left</node>
<node>aileron_right</node>
</articulated_part>
<articulated_part id="2" name="rudder">
<node invert_yaw="1">rudder</node>
</articulated_part>
</entity>
<!-- ..... -->
</entity_types>
<!-- =========================================== -->
</ig_config>
Adaptive Quality System#
The variables group with the name "AdaptiveQualitySystem" contains configuration parameters of the Adaptive Quality System, which adapts the image quality if the performance decreases by increasing render_distance_scale and simplifier_distance_scale.
<group name="AdaptiveQualitySystem">
<item name="mode" type="int">0</item>
<item name="debug" type="int">0</item>
<item name="sleep_period_after_world_load" type="float">-1.000000</item>
<item name="cpu_budget" type="float">-1.000000</item>
<item name="threshold" type="float">-1.000000</item>
<item name="change_period" type="float">-1.000000</item>
</group>
The following items are available for the Adaptive Quality System:
- mode — one of the modes in which the Adaptive Quality System operates:
- 0 — to disable the system
- 1 — to enable the system in the degrading mode (without re-improving the quality when the conditions are back to normal)
- debug — 0 to disable the debug mode, 1 to enable displaying the debug info.
- sleep_period_after_world_load — idle time of the Adaptive Quality System, in seconds, after the world is loaded.
- cpu_budget — target CPU Total Time value, in milliseconds. -1 sets the default value of 10 milliseconds.
- threshold — a threshold value, in milliseconds. If CPU Total Time has changed less than this value, no adaptation is performed. -1 sets the default value of 3 milliseconds.
- change_period — update period, in seconds. -1 sets the default value of 0.5 milliseconds.
Connector Parameters#
Configuration parameters for connectors are added to the variables group with the corresponding name, e.g. CIGIConnector for CIGI-connector:
<group name="CIGIConnector">
<item name="version" type="string">3.3</item>
<item name="host">127.0.0.1</item>
<item name="send_port">8889</item>
<item name="recv_port">8888</item>
<item name="view_id">0</item>
</group>
The following items are available for CIGI:
- version — CIGI protocol version
- host — CIGI Host IP-address
- send_port — TCP port number to be used for sending packets to the CIGI Host
- recv_port — TCP port number to be used for receiving packets from the CIGI Host
- view_id — ID of the view to be used
- packet_size — maximum size of the packet
The following items are available for DIS:
- broadcast_address — a broadcast address of the server computer that is used to broadcast messages to IG over the network
- site — the Site ID of this application instance
- exercise — the Exercise ID of the DIS
- app — the Application ID of this application instance
- view_id — ID of the view to be used
Date and Time Settings#
The date and time settings are added to the variables group with the name SkyMap.
<group name="SkyMap">
<item name="timezone" type="int">0</item>
<item name="datetime" type="string">2003-12-06T10:30:00</item>
</group>
The following items are available:
- timezone — UTC timezone, only an integer value is possible (if not set, UTC=0)
- datetime — date and time set for the specified timezone
Weather Settings#
The weather settings are added to the variables group with the name Meteo.
<group name="Meteo">
<item name="visibility_transition_time" type="float">3.000000</item>
<item name="precipitations_transition_time" type="float">3.000000</item>
<item name="cloud_transition_time" type="float">3.000000</item>
<item name="visibility_tracker" type="string">ig/weather/tracks/visibility.track</item>
<item name="overcast_preset_tracker" type="string">ig/weather/tracks/clouds_environment.track</item>
<item name="clouds_density_tracker" type="string">ig/weather/tracks/clouds_density.track</item>
<item name="rain" type="string">ig/weather/fx/rain_particles/nodes/rain_particles.node</item>
<item name="snow" type="string">ig/weather/fx/snow_particles/nodes/snow_flakes.node</item>
<item name="lightning" type="string">ig/weather/fx/lightning/nodes/lightning_particles.node</item>
</group>
The following items are available:
- visibility_transition_time — time, in seconds, for gradual change of visibility conditions (fog, etc.)
- precipitations_transition_time — time, in seconds, for gradual change of precipitation
- cloud_transition_time — time, in seconds, for gradual change of cloudiness
- visibility_tracker — path to the .track file containing visibility transition effect
- overcast_preset_tracker — path to the .track file containing the overcast preset
- clouds_density_tracker — path to the .track file containing gradual change of cloudiness
- rain — path to the node storing rain particles
- snow — path to the node storing snowflake particles
- lightning — path to the node storing lighting
Databases#
The list of databases (worlds with terrains) is enclosed in the <databases/> tag. You can specify as many worlds as required.
<databases>
<database id="1" world_name="world_1"/>
<!-- ..... -->
<database id="n" world_name="world_n"/>
</databases>
The following attributes are available:
- id - ID of the database (used when loading databases)
- world_name - name of the corresponding *.world file
Entity Definitions#
An IG has a number of models, that are used to represent certain entities in the virtual environment. Entity definition section is enclosed in the <entity_types/> tag. To define each entity, the <entity/> tag is used.
Each entity includes the following:
- a *.node file containing the hierarchy of nodes representing the entity in the virtual world. A path to this file is specified in the <path/> tag.
- a set of components (flashing lights, aircraft propellers, afterburners, landing gear, tank tracks, wheels, and like items). Definition of each component is enclosed in the <component/> tag. Component data in packets, received by IG from connectors, is usually represented as a set of a discrete state and up to six values (data1, data2 ... data6). IG component definitions in this section are actually used to map parameters from connectors to corresponding properties (e.g. data1 field of the outer_light component in the example below corresponds to landing light type).
- a set of articulated parts (ailerons, flaps, etc.). Definition of each articulated part is enclosed in the <articulated_part/> tag.
Below is an example of entity definition section:
<entity_types>
<entity id="111" name="b52">
<path>my_project/entities/aircrafts/B52/b52.node</path>
<component id="0" name="light_outer">
<property>LightAircraftController</property>
<parameter name="state">enabled</parameter>
<parameter name="data1">landing</parameter>
<!-- ..... -->
<parameter name="data6">logo</parameter>
</component>
<!-- ..... -->
<articulated_part id="1" name="aileron">
<node invert_pitch="1">aileron_left</node>
<node>aileron_right</node>
</articulated_part>
<articulated_part id="2" name="rudder">
<node invert_yaw="1">rudder</node>
</articulated_part>
</entity>
<!-- ..... -->
Components#
Each entity may have an arbitrary number of components assigned, including custom ones. To define a component of an entity use the <component/> tag:
<!-- ..... -->
<entity id="118" name="a321">
<path>my_project/entities/aircrafts/A321/a321_air_France.node</path>
<!-- ..... -->
<component id="22" name="rotorwash">
<property>rotorwash</property>
<parameter name="data1">wind_percent</parameter>
<parameter name="data2">sand_percent</parameter>
</component>
<!-- ..... -->
</entity>
<!-- ..... -->
Components are added to entities by means of assigning corresponding properties to nodes. By default it is assumed that all properties corresponding to components are assigned to the root node. In fact, a component's property can be assigned to any node in entity's hierarchy. For such a component you should add the <node/> tag to specify a path to this node (the path is specified relative to the root node):
<!-- ..... -->
<entity id="118" name="a321">
<path>my_project/a321_air_France.node</path>
<!-- ..... -->
<component id="22" name="rotorwash">
<property>rotorwash</property>
<node>path_to_node</node>
<parameter name="data1">wind_percent</parameter>
<parameter name="data2">sand_percent</parameter>
</component>
<!-- ..... -->
</entity>
<!-- ..... -->
- <node>path_to_node_reference/^/path_inside_nodereference</node>
Example:
Suppose for a hierarchy shown below we have the comp1 component's property assigned to the aileron_left node, and comp2 component's property assigned to the engine_1_fire node. Definition of components will look like:
|
Articulated Parts#
Each entity may have an arbitrary number of articulated parts (e.g. flaps, slats, etc.). To define an articulated part of an entity use the <articulated_part/> tag:
<entity_types>
<entity id="111" name="b52">
<path>my_project/entities/aircrafts/B52/b52.node</path>
<!-- ..... -->
<articulated_part id="1" name="aileron">
<node invert_pitch="1">aileron_left</node>
<node>aileron_right</node>
</articulated_part>
<articulated_part id="2" name="rudder">
<node invert_yaw="1">rudder</node>
</articulated_part>
</entity>
<!-- ..... -->
For each articulated part a corresponding node should be specified using the <node/> tag. Paths are specified relative to the root node, the same way as for components.
- <node>path_to_node_reference/^/path_inside_nodereference</node>