Documentation/Articles/Overview of Model Import Editor

From NeoAxis 3D Engine Wiki

Jump to: navigation, search
Go to higher level

Contents

Introduction

Model Import Editor is a component of the Resource Editor that enables import of various mesh formats into NeoAxis Engine. Note that special exporting software have been created for 3dsMax and Maya to import meshes from them. It also possible to use easy 3D model import and next continue importing with this editor.

Overview of Model Import Editor

Model Import Editor supports a large number of popular formats, including:

For the full list of supported formats, see below.

In order to import a three-dimensional model into the engine, you have to perform the following steps:

  • create an import configuration file,
  • open and configure the import configuration file (specify the necessary parameters for object position, configure animation, etc.),
  • generate meshes and materials.

In detail this procedure is described in Tutorial Importing a Static Mesh and in Tutorial Import of Animated Model.

Generated meshes and materials will be synchronized with their source files. If a source file is modified, the generated meshes and materials will be updated automatically. If you manually edit a mesh or a material in Resource Editor, synchronization with the original model file will be removed and resources will no longer be automatically generated on update.

Unfortunately, import of vertex (morph) animation is not currently supported.

Supported Formats

The column Export indicates formats to which engine models can be converted. To access this function, right-click on a .mesh file and select the Convert to another format option.

Format Static Meshes Skeleton animation Export
3d
Yes.jpg
No.jpg
No.jpg
3ds
Yes.jpg
No.jpg
No.jpg
ac
Yes.jpg
No.jpg
No.jpg
ac3d
Yes.jpg
No.jpg
No.jpg
acc
Yes.jpg
No.jpg
No.jpg
ase
Yes.jpg
No.jpg
No.jpg
ask
Yes.jpg
No.jpg
No.jpg
b3d
Yes.jpg
Yes.jpg
No.jpg
blend Not all modifiers are supported. It's recommended that you import via FBX or DAE format from Blender.
No.jpg
No.jpg
bvh
Yes.jpg
No.jpg
No.jpg
cob
Yes.jpg
No.jpg
No.jpg
dxf
Yes.jpg
No.jpg
No.jpg
dae
Yes.jpg
Yes.jpg
Yes.jpg
enff
Yes.jpg
No.jpg
No.jpg
hmp
Yes.jpg
No.jpg
No.jpg
ifc
Yes.jpg
No.jpg
No.jpg
irr
Yes.jpg
No.jpg
No.jpg
irrmesh
Yes.jpg
No.jpg
No.jpg
fbx
Yes.jpg
Yes.jpg
Yes.jpg
lwo
Yes.jpg
No.jpg
No.jpg
lws
Yes.jpg
No.jpg
No.jpg
lxo
Yes.jpg
No.jpg
No.jpg
md2
Yes.jpg
No.jpg
No.jpg
md3
Yes.jpg
No.jpg
No.jpg
md5
Yes.jpg
Yes.jpg
No.jpg
mdc
Yes.jpg
No.jpg
No.jpg
mdl
Yes.jpg
No.jpg
No.jpg
mot
Yes.jpg
No.jpg
No.jpg
ms3d
Yes.jpg
May cause a critical error
No.jpg
ndo
Yes.jpg
No.jpg
No.jpg
nff
Yes.jpg
No.jpg
No.jpg
obj
Yes.jpg
No.jpg
No.jpg
off
Yes.jpg
No.jpg
No.jpg
pk3
Yes.jpg
No.jpg
No.jpg
ply
Yes.jpg
No.jpg
No.jpg
x
Yes.jpg
Yes.jpg
No.jpg

Editor Settings

In order to access Model Import Editor settings, select Tools -> Options in the main menu. Then select the Model Import Editor option in the opened window.

ModelImportEditor 02.jpg

The General tab contains four parameters:

Parameter Description
General
Background Color Background color.

Note: The background color is only visible when you are not using Sky Box.

Show Axes If this parameter is set to True, the engine displays coordinate axes.
Show Grid If this parameter is set to True, the engine displays the grid. The default cell size is 1 meter.
Sky Box Sky Box. A sky (skybox) to be displayed as background of the editor.

Tutorials

In this section we will provide you with two tutorials on importing static and animated models to the engine.

The best formats to be used for model import is FBX and Collada. Read more about making file in an intermediate format in Export models from Blender, Autodesk Softimage and other packages.

Tutorial - Importing a Static Mesh

In this tutotial you will learn how to import static meshes into the engine.

First, create a configuration file for mesh import. To do this, select the original mesh file. In our tutorial it is ColladaTest.dae, which you can find in the following folder "Data\_ResourceEditorSamples\Importing3DModel\Stone". Next, right-click the file and select the Import Model.

ModelImportEditor 03.jpg

Now, you have to proceed to import settings editing. To do this, double-click on the settings file (in our case it is ColladaTest.modelImport) or bring up the context menu and select the Edit.

ModelImportEditor 04.jpg

When you proceed to editing, the Objects list containing all importable objects appears in the upper right corner. Select a source in the window. You can also select a source by clicking on it in the editor working area.

ModelImportEditor 05.jpg

Right-click and select Create Mesh with Selected Sources in the context menu. This will add the mesh to the object list, as well as it will add a source to it. It is important to distinguish between the mesh and its sources. The mesh is an object created as a .mesh file, which is, in fact, an engine format model. On the other hand, sources are made into submeshes of the resulting mesh.

ModelImportEditor 06.jpg

Now, you may need to adjust the position of the resulting mesh. Select the created mesh in the Objects window.

ModelImportEditor 07.jpg

Let us set up the pivot for the mesh to be imported. To do this, select the "movement" tool in the main panel. In order to lower the pivot, pull Z axis down. This way you can adjust the mesh center.

ModelImportEditor 08.jpg

You can also adjust position of a source in mesh coordinates. This may be useful when the resulting mesh contains several sources. Select a source in the Objects window.

ModelImportEditor 09.jpg

Rotate the source. To do this, select the "Rotation" tool in the main panel. Pull the rotation axis in order to rotate the source 90 degrees around the Z axis.

ModelImportEditor 10.jpg

Now, save your import settings by clicking on the Save button in the main menu.

Once import settings have been configured, proceed to generating the resulting files: mesh and material. To do this, click the Create Files button under the Properties window.

ModelImportEditor 11.jpg

If importing succeeds, a corresponding text message will be displayed. New files will appear in the resource tree (in this tutorial they are ColladaTest.mesh and ColladaTestStoneStatic.highMaterial.

So, you have completed model exporting. In order to ensure that the files have been generated correctly, open the the mesh file. You can see that the model have been successfully imported. On this stage, our tutorial on import of a static model is complete.

ModelImportEditor 12.jpg

Tutorial - Import of Animated Model

In this tutorial you will learn how to import an animated model into the engine. The file PigA.x will be used as a testing mode, which you can find in the following folder "Data\_ResourceEditorSamples\Importing3DModel\Animated".

The first part of this tutorial is the same as importing a static model as described in the previous tutorial. For this reason we omit it now.

After having set up mesh import, you have to configure animation. To do this, select the mesh and click the "..." button in the Animations field.

ModelImportEditor 13.jpg

In the window that will appear, click Add to add a new animation track.

ModelImportEditor 14.jpg

Now, specify an animation name, as well as start and end frames for it.

ModelImportEditor 15.jpg

Use the same procedure to add the remaining animations. Click OK to proceed.

ModelImportEditor 16.jpg

Next, you have to set the CreateSkeleton property value to True in order to create the skeleton during file generation.

ModelImportEditor 17.jpg

Save your import settings by clicking on the Save button in the main panel.

Now, you only have to generate mesh, skeleton and material files. To do this, press the Create Files button under the Properties window.

ModelImportEditor 18.jpg

If importing succeeds, a corresponding text message is displayed.

On this stage, model importing is complete. In order to ensure that files have been generated correctly, open the mesh file. You can see that model importing was successful.

ModelImportEditor 19.jpg

Import Properties

This section contains description of import properties for scenes, meshes and sources.

Scene Import Properties

Property Description
_General
SourceFile Path to a source file of the model.
Materials
GenerateMaterials Creation of material files. If this parameter is set to True, .highMaterial is created.
MaterialsNamePrefix Prefix used with the names of created materials.
OverrideMaterialDirectory Override the directory for materials. If the directory is not specified, all generated materials are saved to the directory with the original model. If the directory is specified, generated materials are saved to it.
RenameMaterials Renamed materials list. The list includes initial names of materials as well as their new names.
Meshes
MaxTextureCoordChannelCount Maximum number of used texture channels. Default value is 4.
OverrideMeshDirectory Override the directory for meshes. If the directory is not specified, all generated meshes are saved to the directory with the original model. If the directory is specified, generated materials are saved to it.
Textures
BaseMapFormat The file format of base maps. If this parameter is set to Original, the initial texture format is used. If you specify a different value, the texture will be converted to the specified format.
GenerateTextures If this parameter is set to True, textures are created.
NormalMapFormat The file format of normal maps. If this parameter is set to Original, the initial texture format is used. If you specify a different value, the texture is converted to the specified format.
OverrideTextureDirectory Override the directory for textures. If the directory is not specified, all textures will be copied to the directory with the original model. If the directory is specified, the textures will be copied to it.
Transform
OutputScale Scaling factor.

Mesh Properties

Property Description
_General
AllowMergeSubMeshes If this parameter is set to True, submeshes with the same material and vertice format are merged into one.
EdgeList Import of the edge list. If this parameter is set to True, meshes will be generated with an edge list. This data is required for stencil shadows.
MergeCloseVertices Allow merging close vertices.
The maximum radius between two close vertices. It is used with the tab MergeCloseVertices. If the radius between two vertices is less than the set value, the vertices are considered to be close to each other and can be merged.
Name Mesh name.
Tangents Import tangent vectors. If this parameter is set to True, meshes will be imported with tangent vectors. This data is required for normal maps.
VertexColors Import vertex colors. If this parameter is set to True, meshes will be imported with vertex colors.
_Transform
PivotPosition Coordinates of the mesh pivot after import.
PivotRotation Rotation of the mesh pivot after import.
Animation
Animations The animation list of the imported mesh. Each animation has a name, a number of opening and closing frames.
AnimationSpeed If this parameter is set to 1, the original animation speed is used.
CreateSkeleton If this parameter is set to True, a mesh skeleton (if it is available) is also imported.
FrameStep Sampling frequency for animation frames. If this parameter is set to 0, sampling is turned off.
InterpolationError Interpolation error for animation. This parameter is used for animation optimization (reduction of the number of key frames). If this parameter is set to 0, the optimization is turned off.
RemoveUnusedBones If this parameter is set to True, bones of the mesh skeleton that are not conected with vertices are removed.
LODs
LODsCount Number of levels of detail for the model. You can learn more about LOD creation in description of meshes editor. By default, LOD generation is turned off.
LODsDistance Camera distance for the next LOD level.
LODsReduction Percentage of polygons removed at the next LOD level in comparison to the previous one.

Source Properties

Property Discription
General
AllowCollision If this parameter is set to True, submesh collisions are allowed. In future this parameter will be used with the Physics System.
TextUserDictionary User text information addded to the generated submesh. The information is a list of elements in the key - value form.
UVUnwrapChannel A channel containing UVUnwrap. If set to None, the UVUnwarp channel will not be specified. Otherwise, the specified channel will be used. UVUnwrap is required for static lighting.
Geometry
InvertNormals If this parameter is set to True, normals are inverted.
Material
InvertUCoordinate If this parameter is set to True, the U texture coordinate for this source is inverted.
InvertVCoordinate If this parameter is set to True, the V texture coordinate for this source is inverted.
OverrideMaterial Ovverride the material name. If material is not specified, the material of the original model is used. Otherwise, the specified material is used.
Source
Name Name of the source.
Transform
Position Position relative to the parent mesh. This parameter is ignored if a skeleton file is generated.
Rotation Rotation relative to the parent mesh. This parameter is ignored if a skeleton file is generated.
Scale Scale relative to the parent mesh. This parameter is ignored if a skeleton file is generated.