This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

3D Models Requirements

This article describes the recommended methods of importing 3D geometry (3D models) to UNIGINE by means of UnigineEditor.

Geometry

The FBX file format is recommended for working with 3D geometry. Export to .fbx is supported by the most popular 3D editors: Autodesk Maya, Autodesk 3ds Max, Blender, Modo, Softimage, etc.

After importing the .fbx file into UNIGINE it is automatically converted into an internal MESH file format. The created .mesh file is saved to the meshes folder that is created in the same directory as the source .fbx file.

Imported geometry (same as any object in the scene) becomes the node and can be seen in the Nodes window. Any material, assigned to this geometry, becomes the single surface of this node (surfaces can be found in the Surfaces tab, Nodes window). The maximum number of vertexes per surface:

For example, in the 3D editor we have the car model consisting of five parts (the frame and four wheels). Two materials (car paint and glass) are assigned to the frame, one material (rubber) is assigned to each wheel. After exporting the model to .fbx and then importing to UNIGINE, five .mesh files will be created (according to the amount of car parts in the 3D editor). Each of the four wheels will have one surface, as one material has been assigned; the frame will have two surfaces (as two materials have been assigned). The names of the surfaces will correspond to the names of materials, assigned in the 3D editor. UNIGINE materials will be created automatically on the .fbx file import; their names will also correspond to the names of the 3D editor materials.

Texture Coordinates

UNIGINE supports two UV channels for geometry. To specify whether to use 1st or 2nd channel use materials settings. For example, you can use the 1st channel for tiling, and the 2nd channel for the light map.

Level of Details

If you want to create several variations of one object with different levels of detail (LOD), it is recommended to create them as separate surfaces. This will allow you to reduce the amount of nodes in the hierarchy and simplify the settings of the LODs visibility. The amount of polygons in the neighboring LODs should differ at least 2-3 times. The recommended amount of LODs is 2 or 3 (more LODs will cause big CPU load).

To import LODs (different objects) to UNIGINE as different surfaces of one node, choose the merge static meshes option.

Textures

UNIGINE supports the most popular bitmap texture formats: .dds, .tga, .png, .jpg, .tif, .psd, .ppm, .pgm, .sgi, .rgb, .rgba, .hdr with support for:

  • 8, 16 and 32 bit precision per channel.
  • Alpha channel.
  • Baked MIP-levels.

In the project you should create the uncompressed folder for the source textures. When assigning texture from this folder, UNIGINE automatically creates the .dds file of this texture with compression and MIP-levels.

Texture resolution should be power of two, for example: 128×128, 256×256, 512×512, 1024×1024, 2048×2048, etc. Both square and rectangular textures are supported (for example, 256×1024 pixels).

The texture postfix is important as it defines the compression algorithms and used color channels. The examples of postfixes:

  • texture_alb for albedotextures.
  • texture_d for diffusetextures.
  • texture_n for normal textures.
  • texture_s for specular textures.
  • texture_met for metalness textures (R channel for metalness, G channel for roughness, B channel for fibers.
  • texture_a for ambient occlusion textures.
  • texture_h for height maps (parallax effect).
  • texture_l for light maps.
  • texture_e for emission textures.

Animation

UNIGINE supports skinned mesh animation (3D model vertices have corresponding bones and their weights ). The animated 3D model can be stored in two ways:

  • In a single .mesh file containing both geometry and animation. This variant is usually used for simple objects (for example, lift doors).
  • In separate files: .mesh (containing only geometry) and .anim (containing bones and their weights). Separate files are usually used for complex objects with a number of animation (for example, characters).

To export animation to .fbx from 3D editor choose Animation and Bake Animation and specify which frames should be exported. When importing the animated .fbx file to UNIGINE, separate .mesh (containing geometry) and .anim (containing animation) files will be created.

Maximum amount of bones per surface — 128. Maximum amount of weights per vertex — 4.

Names

For file and surface names it is recommended to use English, low case, without spaces.

Last update: 2017-07-03
Build: ()