This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Collada Import Plugin

Collada import plugin allows to load assets created in various 3D editors directly into Unigine engine. Files in DAE format are imported as a full package:

  • Polygonal geometry
  • Full node hierarchy
  • Materials
  • Animations
  • Lights
  • Cameras
Conversion into a Unigine native format is done completely automatically. Set up a scene as a DAE file once, and it's all ready to be used in the Unigine editor.

Collada plugin in Unigine engine

Collada plugin in Unigine engine

See Also

  • Functions of the ColladaImport class that can be used when the Collade import plugin is loaded

How to Load Collada Plugin

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

Another variant is to specify Collada 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 Collada
  2. Open Tools -> Plugins and pressCore button to see the list of available editor plugins.
  3. Choose import/collada.cpp to load the plugin interface.

Collada import plugin is now shown:

Collada plugin interface

Collada plugin interface

How to Import Collada Assets into Unigine

After loading the plugin, you can start creating your world from Collada assets right away. To load a Collada scene into the Unigine engine:

  1. Copy Collada assets under <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 Collada plugin window to load a Collada scene into the memory.
  3. Specify the path to the DAE file.
  4. If necessary, load an additional animation from another DAE file by clicking Animation button.
  5. Check import options (if materials, animations, joints, etc. do not need to be loaded).
  6. Click Add to scene button to add a loaded scene into Unigine world.

Load assets

Plugin Options

Load Loads one scene from a DAE file into the memory. After it is loaded, you can click Add to scene button.
  • For mesh geometry, the plugin performs automatic conversion from Collada to Unigine coordinate basis. It does not matter what up vector is used (X, Y or Z), in Unigine the node will be properly oriented.
  • Full node hierarchy is supported for exported meshes.
Animation Loads an additional animation stored in a separate file. This option is available only after an assets is loaded. (To load animation baked into the current DAE file, see Import animations.)
Info Displays information on the loaded file:
  • File name
  • Tool used to create the asset and its version
  • Meter, a unit of measurement used for an asset
  • Up axis (up vector) used to orient the asset
  • Time for asset's animation in the format: animation start time/animation end time
Add to scene Adds a loaded scene into the Unigine world. Loaded data is saved from memory to the disk (if a source Collada file is stored under data directory). What data is saved depends on the selected import options (such as Import materials, Import animations).
  • Folder meshes is added with *.mesh, *.smesh and *.sanim files.
  • Folder textures is added with textures.

If you want to add the same Collada scene as already loaded via a Load button, but with different options, simply click Add to scene button again. You can choose to rewrite nodes, or add another scene without rewiring its previously imported variant.

Vertex cache Performs vertex cache optimization. This option reorders an indexed triangle list to improve vertex cache utilization in run time. It can be turned off for a quicker saving; however, it should always be turned on if saving the final version.
Import joints Imports the hierarchy of the joints (bones) for animated Collada assets. Joints are imported as a hierarchy of Dummy nodes. If this option is disabled, imported animations for a mesh still work.
Import lights Imports light sources from a Collada scene into Unigine:
  • Ambient light in Collada scene is converted into the ambient color in Unigine.
  • Directional lights are converted into world light sources.
  • Point lights are converted into omni light sources.
  • Spot lights are converted into projected light sources.

The following parameters of lights are automatically imported into Unigine, so there is no need to set them up twice:
  • Light color
  • Light source position and orientation
  • Light attenuation (it is converted into a Radius parameter)
Import cameras Imports cameras from a Collada scene. They are converted into PlayerDummy (cameras without physical properties). Both types of projection are supported in Unigine:
  • Orthographic
  • Perspective

To view the scene through the imported camera:
  1. Click Camera on the editor panel Camera icon on the Unigine editor panel, and
  2. Choose its name in the drop-down list in the top left corner.
Import materials Creates materials for the imported scene. They include:
  • Diffuse texture
  • Normal map (need to be converted into RG channel for Unigine)
  • Specular texture
  • Diffuse color
  • Specular color
  • Specular power

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 with RGB normal maps models are not lit correctly.
Import textures Converts textures into Unigine-ready, optimized for real-time DDS formats:
  • Diffuse texture
  • Normal map (automatically converted into RG format required for Unigine)
  • Specular texture

Created textures are saved into the textures folder. This option requires Import materials option to be checked as well.
Compress textures Compresses textures and creates mipmaps, if necessary. This option requires Import textures option to be checked as well.
Import animations Imports animation for animated Collada assets. This option imports animation baked into the current DAE file. (To load animation baked into a separate DAE file, see Animation.) The following types of animation are supported:
  • Step,
  • Linear,
  • Bezier, and
  • Hermite
interpolations.

To control the animation for the last loaded scene, drag the slider at the bottom of the plugin window.

Baked animation
Baked animation
Verbose operations Displays a dialog if meshes or textures need to be rewritten (when a Collada scene 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 scene.
FPS Sets FPS for the imported animation.
Time Sets the frame for the imported animation. You can also set it on a time line by dragging a slider.
Last update: 2017-10-20
Build: ()