Import External Models

July 4, 2022

Import External Models

Make Model Resources

Currently only support the resource files needed to create actor in external 3D modeling software (3ds Max is recommended), including building skeletons, modeling, skinning, and making animations. In the Blockman editor, these externally produced models can be converted into resources required by the actor and assembled into a actor.

Production Specification

When making a model through external 3D modeling software, the following specifications must be followed (3ds Max is taken as an example below):

Specification Legend Necessary(If the file does not meet the specifications, it cannot be imported into the editor)
All textures used by the model must be in tga, png or jpg format. Yes
The names of all level nodes (including but not limited to skeleton layer nodes, polygon layer nodes, etc.) and resources (map, etc.) can only consist of English, numbers, spaces, and underscores. Yes
Polygon layer nodes cannot add sub-levels. Yes
All hierarchy nodes are not allowed to have the same name. Yes
A skin cannot bind bones under multiple skeletons at the same time, but can only bind different bones under the same skeleton. Yes
All models need to be converted to editable polygons. Yes
If it prompts “A certain model has not detected uv” when importing, you need to do the following two steps:
1. Unfold the uv on the model in the modeling software; 2. If it is a skin, you need to right-click on the skin and select “collapse to”, if it is not a skin, you need to convert the model into an editable polygon again.
  Yes
The number of bones bound to a single skin is not more than 70. Yes
When making a model, the system unit needs to be set to “cm” (100 cm in 3ds Max corresponds to 1 unit length in the engine). No, but if the unit is not “cm”, the model size may be incorrect after import.
When skinning, each vertex is bound to 3 bones at most. No
The name of the hanging point should be prefixed with “s_” (if you want to use a bone or virtual auxiliary object as the hanging point, you need to name it s_XXX). No, the hanging point is not necessary.
The front of the model should face the positive direction of the Y axis, the positive direction of the Z axis means up, and the positive direction of the X axis means right. No
The conversion value (displacement, rotation) of the model root bone should be reset to zero ((0,0,0) point is the reference point. If the root bone is offset when making the model, then after importing it into the editor, the bone will be corresponding Ground offset). No
The total number of bones in a skeleton is recommended to be no more than 90. No, but the number of bones greater than 90 will cause a significant performance degradation.
When making an animation, the degree of rotation between two adjacent key frames should not be greater than 180°. No, but because the engine automatically calculates the transition frame, if it is greater than 180°, the animation may not be restored accurately when playing the animation.
The number of triangle faces for a single polygonal model should be less than 21845 faces.
Note: The faces of the polygonal model should all be triangular, otherwise errors may occur.
No, too many faces may cause the model to deform.

Export FBX Settings

After the model is made by external 3D modeling software, the model needs to be exported to FBX format. Take 3ds Max as an example, the following settings need to be made when exporting:

Setting Item Legend
When exporting FBX files, the file name can only consist of English, numbers and underscores.
If you want to export a model with textures, you need to check “Embedded Media”.
The FBX file version must be a version above “2011”.
If you want to export a model with animation, you need to check “Animation” and check “Bake Animation”, and you must start baking from frame 0.
If there is a geometry type that is not supported by the FBX file in the model (the prompt in the figure on the right appears when exporting), such as a circle used to make an ik animation, do not export the object when exporting the FBX.

Keep the default values for other setting items.

Import FBX File

The Blockman editor supports importing FBX files made by external software. The editor will convert FBX files into resources readable by the engine, including skeleton files, skin files, mesh model files, map files, and animation files mentioned in [above](#Actor Resources Introduction). If the FBX file includes a skeleton, the actor file can also be automatically generated when importing.

Please make sure that the FBX file complies with Production Standards and Correct Settings are performed when exporting FBX, otherwise it will not be imported. Here is a sample FBX file that meets the requirements, which can be download for reference.

The steps to import the FBX file into the editor are as follows:

1.Click the import button in the resource management panel (if the resource management panel is not displayed in the editor, please open it in the editor’s view menu), and select “Import FBX file”.

2.Select the FBX file to be imported, multiple selections are possible.

3.The editor will check the FBX file to be imported. If all the FBX files pass the check, the import setting interface will be displayed. Otherwise, you will be prompted that there is a problem with the FBX file. It is recommended to check whether the FBX file complies with the Production Specification.

4.FBX import settings are as follows:

Setting Item Function
import skeleton files Whether to import skeleton files, if you check this option, if there are several skeletons in the FBX file, several skeleton files will be imported. In addition, If you want to automatically generate a role file after importing, you must check this option.
import skin files Whether to import skin files.
import mesh model Whether to import mesh model files.
import map file Whether to import texture files, pay attentionOnly diffuse maps will be imported.
import animation files Whether to import animation files.
animation import options Animation length: There are two ways to select the length of the imported animation: “Total length” means that the animation between the first key frame and the last key frame will be automatically imported, and “Custom” can customize the frames that need to be imported Scope.

Usually if there is only one action (such as running) in the FBX file, select “Total Length”; if there are multiple actions in the FBX file (such as running, standby, jumping, etc.) in the FBX file, you need to select “ Custom” to manually select the appropriate frame range.

If you select “Total Length”, you need to specify the name of the animation.

If you choose “Custom”, in addition to specifying the animation name, you also need to specify the start and end frames. In addition, click the “+” sign after the skeleton name to add a new animation segment, each animation segment Will be imported into independent animation files.

automatically assemble actor Whether to automatically generate a actor file, if you want to check this option, please check “Import bone file” first. There are several skeletons in FBX that will generate several actors files.

When importing models with bones, it is recommended to check this option to avoid the cumbersome actor assembly process.

assemble actor options Create multiple appearance groups: If checked, multiple appearance groups will be created, and each group contains only one appearance part; otherwise, only one appearance group will be created, and all appearance parts will exist in the same group. If the actor needs to be dynamically changed in the game, it is recommended to check this option.

Automatically create action: Whether to automatically create an action, an animation file will create an action accordingly. If you want the actor to play animation, it is recommended to check this option.

5.After the setting is completed, the FBX file will be imported into the editor, and a folder with the same name as the FBX file can be found in the resource management panel (all resources after a certain FBX conversion are located in this folder with the same name).

6.If “Auto-Assemble Roles” is checked in [Import Settings] (#FBX Import Settings), then a role file will be automatically generated in the FBX folder with the same name, which can be opened in the role editor to check the import result.