This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine 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
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
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.

FBX Import Guide

FBX is a file format owned by Autodesk that is used to provide interoperability between various Digital Content Creation (DCC) applications. Most of modern 3D modelling applications support export to FBX: Autodesk Maya, Autodesk 3ds Max, Blender, Modo, etc.

UNIGINE's FBX import pipeline allows simple transfer of content from any DCC application that supports this format.

The advantages of using FBX Import over other importing methods are:

  • Static meshes, skeletal meshes, animations, and morph targets are combined in a single file format.
  • Multiple assets can be contained in a single file.
  • Import of multiple LODs and morph targets in a single import operation.
  • Materials and textures can be imported with and applied to meshes.
  • Cameras and light sources can also be imported.

Along with importing data from FBX containers, UNIGINE also provides an ability to export data to .fbx files.

Notice
For the FBX asset to be imported, the FbxImporter plugin must be loaded.

Importing FBX Asset#

When you import an FBX asset (just like importing any other asset), the import settings window appears:

Notice
To simplify sequential import of multiple similar assets, Asset Browser remembers previous asset import settings and offers to use them by default. To reset import settings to system defaults use the Restore Defaults button.

The list of available import options covers all components that can be imported from an FBX scene and includes the following:

Mesh Import Options#

Import Meshes Import geometry meshes from the file.
Use Instances Imports FBX with mesh instances. When enabled, a single mesh is imported instead of several identical ones. If you add such FBX to the scene, all meshes in the World Hierarchy will refer to the single mesh stored inside the imported FBX container.
Merge Static Meshes Merges all of the children static meshes into a single one (named after the parent mesh). All surfaces of all meshes surfaces will be copied and shown in the Surfaces hierarchy.
Merge Surfaces by Materials Enables merging surfaces that have the same materials.
Split by Grid

Enables splitting of imported meshes. Too large models having sizes, that exceed 10000 units may have various artefacts (jitter, etc.) associated with positioning errors. You can eliminate such artefacts by splitting your mesh into multiple separate meshes. To do so, just enable this option and set the size of the grid cell (see the Grid Size parameter below) to be used for mesh splitting.

Notice
This option does not split surfaces.
Grid Size Size of the grid cell to split imported meshes, in units.
Repivot to Center Places a pivot of generated mesh to its center. Can be used for meshes having their geometry located too far from their pivot, as this may lead to various artefacts (jitter, etc.) associated with positioning errors.
Optimize Vertex Cache Enables vertex cache optimization. This option reorders an indexed triangle list to improve vertex cache utilization at runtime. It can be turned off to accelerate saving process; however, it should always be turned on if saving the final version.
Correct Triangulation

Enables correct triangulation of meshes, NURBS and patches.

Notice
Disabling this option decreases import time, but may lead to triangulation errors resulting in incorrect geometry.
Import Tangent Space

Imports built-in tangent space data instead of recalculating it.

Notice
If the option is checked, but an FBX asset has no tangent space, it will be calculated with orientation for the right-handed coordinate system.
Import Morph Targets Enables importing morph targets from the file.
Combine by Postfixes Enables automatic creation of the Levels of Detail (LODs).

Levels of Detail#

To create several variations of one object with different level of detail (LODs) you should have them as separate surfaces of the object. This will allow you to reduce the number of nodes in the hierarchy and simplify the settings of the LODs visibility.

UNIGINE provides automatic creation of LODs based on the name postfixes. So you can create and export different meshes for different LODs of you model in a single FBX file. When naming these meshes, you should add a postfix to specify the LOD each mesh represents.

Notice
See the video tutorial on how to configure LODs for more details.

You can also enable the Merge Static Meshes option for more optimization.

  1. Enable the Combine by Postfixes parameter.

    This will show additional LODs settings:

    Max Count Number of Levels of Detail.
    Postfix Surface name postfix that determines the current LOD.
    Min Visibility

    The minimum distance on which this LOD is visible in camera local axes.

    -inf — the LOD is visible by default.

  2. Select the number of LODs that are stored in the FBX container.
  3. For each LOD, define a postfix that will be used to group objects in an FBX file into a corresponding LOD.

    Notice
    The postfix must be the same as the one used when creating objects in a 3D editor.

    The names of generated surfaces will be as follows: material_name + LOD_postfix.

  4. Specify minimum visibility distance for each LOD. Maximum visibility distance of each LOD is equal to the minimum visibility distance of the next LOD. Maximum visibility distance of the last LOD is equal to inf.

Lightmaps Options#

UV For Lightmap UV channel to be used for lightmaps.
Lightmap Target Resolution Resolution of lightmap texture.
Unwrap UV Channel 0 Enables automatic unwrapping for UV Channel 0.
Unwrap UV Channel 1 Enables automatic unwrapping for UV Channel 1.

Hierarchy Options#

This auxiliary section is available in the Parameters window when selecting an imported FBX asset in the Asset Browser. It enables you to preview the content of the FBX asset according to the current Mesh Import Options.

Nodes List of nodes obtained from the FBX asset.
Surfaces List of surfaces of the selected node.
Use Custom Settings Enables custom Lightmaps options for the selected surface(s).

Material Import Options#

Import Materials Enables importing materials from the file.
Assets Mode

Enables to choose whether to use existing materials or to overwrite them with the ones imported. Available options:

  • Take From Assets — use existing materials (if any).
  • Overwrite Assets — overwrite existing materials (if any).
Base Material Mode

Enables to choose the base material for imported materials. Available options:

  • Inherited Material Graphs — autoselected graph-based material is used as the base material. This mode finds the most suitable autogenerated graph-based material with the appropriate functionality and inherits the imported materials from it. If such graph-based material isn't found in the project, then it will be autogenerated and used as the base one.
    Notice
    This mode allows to reuse the existing graph-based base materials and avoid the creation of a lot of unique base materials when importing FBX files.
  • Unique Material Graphs — autogenerated graph-based material is used as the base material. In this mode all imported material will be inherited from unique autogenerated graph-based materials.
  • Inherited Mesh Basemesh_base is used as the base material. This mode uses the default mesh_base material as the base one for the imported materials.
Workflow

Provides an interface to choose a workflow for the imported physically based materials (if any). Available options:

  • Metalness workflow — uses the new standard of textures (albedo, metalness, roughness).
  • Specular workflow — uses the old standard of textures that was used in mesh_base material (diffuse, specular, gloss).
Add Asset Name as Prefix Enables to add a prefix for imported materials to avoid collision of names.
Add Prefix Enabling this option makes the name of each material have the name of the imported FBX asset as a prefix.
Merge Similar Materials Enables to merge materials with the same settings, but different names.

Animation Import Options#

Import Animations Enables importing animations from the file.
Import Bones Without Skin Enables import of bones that are not attached to the skeleton and do not affect the animation's skin, for example, a weapon held in the character's hands. If disabled, such bone is not imported and bones connected to it, if any, become orphans.
Create Transform Bones for Joints Imports the hierarchy of the joints (bones) for animated FBX assets as a list of World Transform Bones. If this option is disabled, imported animations for a mesh will still work.
Joints Reorientation Enables changing orientation of bones for animations and animated geometry. When enabled, all bones will have the same forward axis as the geometry. This simplifies work with animations via code for programmers reducing excessive axis manipulations: if a mesh has +Y as a forward axis, the bones will have +Y as well.
Animation FPS Number of frames per second of imported animation.
Force Loop

Forced smoothing of looped animation playback.

Looped Frames Number of frames to be used for smoothing of looped animation playback. The specified number of frames is taken from the beginning and from the end of the animation. If the specified value exceeds the (total_number_of_frames)/2, the latter is used instead.

Other Import Options#

Import Textures Enables importing textures from the file.
Import Lights Imports light sources from an FBX scene.
Import Cameras Imports cameras from an FBX scene.
Skip Empty Nodes Enables skipping empty nodes. Complex CAD models may contain a lot of empty nodes, resulting in an overloaded world hierarchy. You can enable this option to simplify generated hierarchy by ignoring nodes, that do not contain any useful information.
Front Axis Provides an interface to choose an axis to be considered as the forward vector of the World Coordinate System.
Up Axis Provides an interface to choose an axis to be considered as the up vector of the World Coordinate System.
Scale

Geometry scale multiplier.

When added to the scene in UNIGINE, your mesh might require scaling to fit properly. However, applying the Scale transformation to the mesh affects its physics — the mesh cannot participate in collision properly in this case. Therefore, it is recommended to define the required scale value using the scale manipulator and then re-import the mesh using the resulting value, which is displayed in the Common Parameters.

Specific options for various types of data stored in an FBX container are described below.

Geometry#

The most commonly used type of data stored in an FBX container is polygonal geometry.

To import 3D geometry data contained in an FBX scene, you should enable the Import Meshes option.

Imported geometry (same as any object in the scene) after being added to the world, becomes a node and can be seen in the World Hierarchy window. This node will have the same name as the imported FBX asset and a hierarchy of child nodes representing the hierarchy of static meshes contained in the imported scene.

You can combine all child objects into a single one by enabling the Merge Static Meshes option. In this case, all surfaces of child meshes will be copied to the single parent mesh and will appear in its Surfaces hierarchy.

Surfaces of a single mesh generated instead of separate meshes with device_calculator and glass_mat materials assigned

You can also merge the surfaces having the same material assigned by enabling the Merge Surfaces by Materials option.

Surfaces merged by materials

Notice
When importing geometry keep in mind the limitations set in UNIGINE for the maximum number of vertices per surface. It is 4294967295 for any type of mesh.

Different measurement systems can be used in different 3D modelling applications. To adjust the scale of imported geometry, you can use the Scale parameter.

It is also possible to optimize the vertex cache when importing geometry. To do so, use the Optimize Vertex Cache option.

The Import Tangent Space option allows importing built-in tangent space data instead of recalculating it.

Materials#

An FBX container can also store materials assigned to the surfaces of the objects in a 3D editor.

To import materials from an FBX container, you should enable the Import Materials option. In this case, the surfaces of the imported model will have the corresponding materials assigned.

Notice
If materials are imported, the material assets are created in the materials subfolder of the folder where the .fbx asset is stored.

The following textures will be imported and assigned (if any):

  • Diffuse (albedo) texture
  • Normal map or bump map (needs to be converted into 2-channel (RG) for Unigine)
  • Specular texture
  • Light map

The following material parameters will also be imported (if defined):

  • Diffuse color
  • Specular color and power
  • Emission color
Notice
You should adjust other material settings manually.

When the Import Materials option is disabled, all surfaces of the model will have the default mesh_base material assigned.

When importing materials, you might have a situation when a material with a given name already exists in the project. You can choose whether to overwrite existing materials (the corresponding assets will be overwritten) or not. For this purpose, the Overwrite Existing Materials option is used. When unchecked, existing materials will be used.

In case when a source model contains lots of objects with many identical materials that just have different names (often happens when an FBX file was exported from a CAD system), it makes sense to combine such materials into a single one. To do so, you should enable the Merge Similar Materials option.

UNIGINE supports two workflows for PBR materials: Metalness and Specular. Use the Workflow option to set the desired workflow.

Textures#

When reading the materials data, you are also able to import textures stored in an FBX container. To do so, enable the Import Textures option.

Notice
If textures are imported, the corresponding texture assets are created in the same folder, where the .fbx asset is stored.

Animation and Morph Targets#

You can import skeletal animations and morph targets from an FBX file.

To import animations from an FBX container:

To import morph targets just enable the Import Morph Targets option. Morph targets will be imported as child nodes.

If you have an FBX file containing skeletal animation without any geometry, you can import it to your UNIGINE project via the Import Bones Without Skin and use generated .anim files.

Lights#

You can import light sources from an FBX scene (if any) by simply enabling the Import Lights option. Imported light sources will be added as child nodes to the root node. The following conversion will be performed:

  • 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 radius and attenuation
  • Light source position and orientation

Cameras#

Cameras can also be imported from an FBX scene (if they exist) by simply enabling the Import Cameras option. They are converted into PlayerDummy (cameras without physical properties). Both types of projection are supported in UNIGINE:

  • Orthographic (with Z near and far clipping planes support)
  • Perspective (with FOV support)

To view the scene through the imported camera choose its name in the drop-down list in the top left corner of the Editor Viewport window.

Adding Imported FBX Asset to the World#

To add a new imported FBX asset to the scene, as any other asset, simply drag it from the Asset Browser to the Viewport window. The corresponding node will be created and displayed in the World Hierarchy window. This node will have the same name as the imported FBX asset and a hierarchy of child nodes representing separate objects contained in the 3D model.

Non-native geometry asset types (fbx, obj, dae, etc.) are containers for meshes. If you double-click such asset in the Asset Browser (or use the right-click Open command), the generated runtime .mesh, .anim and .node files stored in the container asset will be displayed:

Opening FBX Container

Video Tutorial: Importing 3D Models#

Last update: 2021-12-13
Build: ()