This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

OpenFlight Import Plugin

OpenFlight import plugin streamlines import of models from *.flt format into Unigine engine. Assets are loaded and converted on-the-fly in native Unigine format:

  • Polygonal geometry
  • Full node hierarchy with groups
  • Level of detail
  • Degree of freedom
  • Materials
  • Lights

If any, multiple external references nodes that refer to one node, will refer to one mesh in Unigine.

OpenFlight plugin in Unigine engine

OpenFlight plugin in Unigine engine

See Also

  • Functions of the OpenFlightImport class that can be used when the OpenFlight import plugin is loaded

How to Load OpenFlight Plugin

To load OpenFlight plugin in the Unigine engine, open the SDK browser, go to Tools -> Plugins for 3D Editors -> FBX Plugin and click Run.

Another variant is to specify OpenFlight plugin on the engine start-up:

  1. In the launcher for your Unigine project (*.bat or *.sh file), specify the following engine plugin:
    Shell commands
    main_x86d -extern_plugin OpenFlight
  2. Open Tools -> Plugins and press Core button to see the list of available editor plugins.
  3. Choose import/openflight.cpp to load the plugin interface.

OpenFlight import plugin is now shown:

OpenFlight plugin interface

OpenFlight plugin interface

How to Import OpenFlight Assets into Unigine

To load a OpenFlight asset into the Unigine engine:

  1. Copy OpenFlight model into <UnigineSDK>/data folder. This step is recommended if you want to save the Unigine world with converted meshes and textures.
  2. Click Load button in the OpenFlight plugin window to load a OpenFlight scene into the memory.
  3. Specify the path to the *.flt file.
  4. Check import options (if LODs should be baked, materials need to be loaded, etc.).
  5. Click Add to scene button to add a loaded scene into Unigine world.
  6. If materials are imported, specify the path to the existing Unigine material library file (*.mat).

Load assets

Plugin Options

Load Loads an OpenFlight asset into the memory. After it is loaded, you can click Add to scene button.
Info Displays information on the loaded file:
  • File name
  • Format revision for the OpenFlight version
  • Creator for the name and version of the application in which OpenFlight file was created
  • Edit revision/date for the creation date of OpenFlight file
  • Coordinate units used
  • Projection type for geographic attributes specified in OpenFlight file
  • Database origin for placement of the database
  • Earth model type specified in OpenFlight file
  • UTM zone specified in OpenFlight file
  • Southwest database coordinates by X and Y
  • Delta X, Y and Z to place the database
  • Southwest corner latitude and longitude
  • Northeast corner latitude and longitude
  • Origin latitude and longitude
  • Lambert upper latitude
  • Lambert lower latitude
Add to scene Adds a loaded OpenFlight asset into the Unigine world. Loaded data is saved from memory to the disk (a source *.flt file should be stored under data directory for that) depending on the set import options:

To add the same OpenFlight asset as already loaded via a Load button, but with different options, click Add to scene button again. You can choose to rewrite nodes, or add another asset without rewiring the previously imported variant.

Merge object nodes Merges the whole object into one mesh (with surfaces).
Merge group nodes Merges the whole group into one mesh (with surfaces).
Merge LOD nodes Merges all mesh LODs into one mesh, where one LOD is a surface.
Dynamic mesh Loads the OpenFlight asset as a dynamic mesh and stores it in the memory (allows for faster loading). If this option is unchecked, meshes are saved onto the disk.
Vertex cache Performs vertex cache optimization. This option is available only if a Dynamic mesh option is unchecked. It reorders an indexed triangle list to improve vertex cache utilization in run time. It should always be turned on if saving the production version of assets; however, during development, it can be turned off for a quicker saving.
Import lights Imports light sources from a OpenFlight asset into Unigine:
  • Infinite lights are converted into world light sources
  • Local lights are converted into omni light sources
  • Spot lights are converted into projected light sources.

The following parameters are supported for imported lights:
  • Light color
  • Light radius and attenuation (for local and spot light)
  • Light FOV (for spot light)
  • Light source position and orientation
Import materials Creates materials for the imported scene. They include the following textures:
  • Diffuse texture
  • Detail diffuse texture
  • Normal map or bump map (need to be converted into RG channel for Unigine)
  • Specular texture
  • Light map
Material parameters are also imported:
  • Diffuse color
  • Specular color and power
  • Emission color
  • Alpha blending value
  • Polygon offset (based on subface nodes)

If Import textures option is unchecked (by default it is enabled), source textures are used, without automatic compression and conversion. In this case, make sure that you convert a normal map into a 2-channel format (RG), since usage of RGB normal maps results in incorrect lighting of the model.
Instance materials Creates instanced materials (per each created mesh) rather than saving materials into the material library. This option is for development time only, since it provides faster preview but prevents materials from being instanced. When adding the production version of assets, it should be turned off.
Import textures Converts textures into Unigine-ready DDS format are saves them into the textures folder. This option requires Import materials option also to be checked.
Compress textures Compresses textures and creates mipmaps, if necessary. This option requires Import textures option to be checked as well.
Verbose operations Displays a dialog if meshes or textures need to be rewritten (when a OpenFlight asset is added into the Unigine world for the second time or more).

Mesh Adds a prefix to the name of created meshes. For example, with a prefix my_, a mesh MeshName will be imported as my_MeshName.
Material Adds a prefix to the name of created materials. For example, with a prefix prefix_, an imported material will be named as prefix_MeshName.
Texture Adds a prefix to the name of created textures. For example, with a prefix prefix_, an imported texture will be named as prefix_TextureName.

Scale Scales the imported asset.
Last update: 03.07.2017
Build: ()