This page has been translated automatically.
编程
Fundamentals
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
应用程序接口
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
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

MeshImport

MeshImport is a tool for converting formats of geometry and animation data.

MeshImport tool is used:

  • To convert meshes of external formats to Unigine-supported mesh formats.
  • To upgrade the Unigine-based project meshes, which are outdated, to the up-to-date mesh formats.

You can use the Unigine upgrade script for batch upgrading of the outdated meshes.

Usage

To invoke MeshImport, run meshimport_x86.exe (in Windows), meshimport_x86 (in Linux) or meshimport_x86.macos (in Mac OS X) from the command line (the Windows command prompt and the Linux/Mac OS X Terminal) (the 64-bit version has x64 postfix).

  • Under Windows, type at the command prompt:
    Shell commands
    meshimport_x86.exe OPTIONS FILE
  • Under Linux, type into the Terminal:
    Shell commands
    meshimport_x86 OPTIONS FILE
  • Under Mac OS X, type into the Terminal:
    Shell commands
    meshimport_x86.macos OPTIONS FILE

Command-Line Options

MeshImport recognizes the following command-line options:

  • -o NAME— name of the output file.
    Notice
    If the -o option is not specified, the default .mesh extension is used.
  • -s SCALE— scale a mesh. The default is1.0, no scaling. The option value is float.
  • -tx VALUE— translate a mesh along theX axis. The option value is a float number.
  • -ty VALUE— translate a mesh along theY axis. The option value is a float number.
  • -tz VALUE— translate a mesh along theZ axis. The option value is a float number.
  • -f — flip the Y and Z mesh axes.

Input Data Formats

The following formats of geometry and animation data can be converted by MeshImport:

  • Wavefront (.obj)
  • COLLADA (.dae)
  • FBX (.fbx)
  • Unigine mesh (.mesh)

Output Data Formats

The following output formats are supported:

  • Unigine mesh (.mesh)
  • Wavefront (.obj)

Examples

Convert an External Mesh

Let's suppose that you want to convert a mesh called mesh.obj to the Unigine-supported data format. If it is located, for example, in the D:\my_project\external_meshes folder, you need to invoke MeshImport as follows:

Shell commands
meshimport_x86.exe "D:\my_project\external_meshes\mesh.obj"
The external mesh file is converted to the Unigine-supported mesh format file with the same name:
Output
D:\my_project\external_meshes\mesh.obj -> D:\my_project\external_meshes\mesh.mesh
Notice
The tool supports batch files conversion. You can specify a list of files to convert them at once. But if you use the -o option, you can specify only one file to convert.
For example, to convert my_mesh1.obj and my_mesh2.obj use the following:
Shell commands
meshimport_x86.exe "D:\my_project\meshes\my_mesh1.obj" "D:\my_project\meshes\my_mesh2.obj"

Upgrade an Outdated Mesh

Assuming that you need to upgrade the Unigine outdated mesh called my_mesh.mesh to the up-to-date mesh format. For example, if the file is located in the D:\my_project\meshes folder, then you need to invoke MeshImport as follows:

Shell commands
meshimport_x86.exe "D:\my_project\meshes\my_mesh.mesh"
Now, my_mesh.mesh file is upgraded.
Notice
The tool supports batch upgrade of mesh files. You can specify a list of files to upgrade them at once. But if you use the -o option, you can specify only one file to upgrade.
For example, to upgrade my_mesh1.mesh and my_mesh2.mesh use the following:
Shell commands
meshimport_x86.exe "D:\my_project\meshes\my_mesh1.mesh" "D:\my_project\meshes\my_mesh2.mesh"
Last update: 2017-07-03
Build: ()