Skip to main content

Resources Workflow

  • Importing and exporting resources in the Engine

  • Essential plugins

Installing Plugins

Installing Photoshop Export Plugin

The plugin works with Max 2016 version and Photoshop (CS5-CC 2018) version.

The plugin locates under the directory ...\client\windows\tools\FlexiPluginSetup.exe in the Editor folder.

Run the program “FlexiPluginSetup.exe”.

Select PS Plugins and PBR (MetallicRoughness) in the Installation items panel and the Material Type panel respectively. Click Install to finish the process.

image-20230529160712679

Resource Types

The common types are as follows:

TypeFormat
Texture MapTIF
Static MeshXMOD
Skeletal MeshXMOD
Animation FileXSKT
Effect FileEFFECT
Particle FilePARTICLE
PhysicsCHB, NXX
AudioWAV

Importing Resources to Flexi

Model Resources

Use external softwares to create resource types that can be used by Flexi.

Importing Static Meshes

Select a mesh as needed and export it as an FBX file in external softwares (Note: Multiple files are allowed.).

Create a folder under the resource directory in the Engine Project panel and open it to store resources. Then drag the FBX file to be imported into the Resource Preview window in Flexi.

image-20220929204828082

Make the settings in the pop-up FBX Import Options window.

image-20230526104608290

NO.NameDescription
1MeshWhether to import mesh.
2Convert SceneWhether to convert the scene from the FBX coordinates to the Flexi Engine coordinates. The file units will also be matched.
3Import TexturesWhether to import textures.
4Import All/ImportImport all meshes or a single mesh.

When importing FBX, splitting the sub-nodes of the model is not supported. When the FBX file is imported successfully, an .xmodparams file with the same name will be generated at the same time to record the import information.

Check whether the resource has been imported correctly by viewing it in the Level panel.

image-20220930105723223

Creating Colliders

Collision is very important in the Engine for many interactions depending on it. Physics collisions can be generated in the Engine, but it is still highly recommended to create custom collision geometry in a 3D software and export it together with the render mesh.

Collider naming rules:

Mesh Prefix and NamingDescription
FXSP_[RenderMeshName]_##Generate physics colliders according to the sphere.
FXCP_[RenderMeshName]_##Generate physics colliders according to the capsule.
FXBX_[RenderMeshName]_##Generate physics colliders according to the box.
FXCX_[RenderMeshName]_##Generate physics colliders according to the convex.
FXTA_[RenderMeshName]_##Generate physics colliders according to the triangle.

The naming convention needs to be consistent with the name of the associated render meshes.

## indicates a numeric suffix (if you don't want to see the RenderMesh words, you can also create Empty Objects in the 3D software, and match the Empty Object names to the Collider names, such as in 3DMAX, you can use Dummy or Helper instead, and in Blender, you can create Empty Object instead).

Import the Collider FBX file. Drag the Collider FBX file into the Engine Resource Preview window, and check the Generate Collider option in the pop-up FBX Import Option window.

image-20230529172608631

Creating LODs

How to import static mesh LODs:

The level of detail (LOD) of static mesh can be imported to the Flexi Engine from external 3D modeling softwares such as 3Ds Max, Maya and Blender.

Setting up static mesh LODs:

Autodesk 3Ds Max:

Select all meshes and click Group -> Group to bring up the dialog box.

image-20220930115309328

Enter a name for the new group in the dialog box, and click the image-20220929205207565button to create it.

image-20220930130132294

Click image-20220929205224271to view the Utilities panel and select Level of Detail. Note that if you cannot find it, you can click image-20220929205237996to show more options.

image-20220930115412240

After selecting a group, click the image-20220929205702801button to create a new LOD set and add meshes from the selected group to it. Meshes will be sorted according to their complexity automatically.

image-20220930115604764

In 3Ds Max, select the Actor model that contain the LOD set and export them directly. When exporting, check Smoothing Groups, Tangents and Binormals and Triangulate.

image-20220930115527408

Autodesk Maya:

Select all meshes in the order of their LODs (e.g. LOD0, LOD1, LOD2, LOD3, LOD4 ...). It is important to select them in order, as subsequent groups created need to be sorted according to the order. Then in the Edit menu, clickLOD (Level of Detail) -> Create LOD Group.

image-20220930115810973

All meshes should now be grouped under the LOD group.

In Maya, select Actor models that contain LOD groups and export them directly. When exporting, check Smoothing Groups, Smooth Mesh and Referenced Assets Content.

image-20220930122018189

Blender:

Creating Meshes

Click Add -> Mesh -> Cube in Blender to add a Cube model.

Add an Ico Sphere and a Cylinder in turn as above.

Modify the names of the Cube, Ico Sphere, and Cylinder to mesh_LOD0, mesh_LOD1, and mesh_LOD2 respectively.

Note:

The LOD level of the Actor is not determined by the naming, but only by the creation time order. The Mesh created first has the highest LOD level (LOD0). The later the Mesh is created, the lower the LOD level is. Therefore, the Cube has the highest LOD level (LOD0), and the Cylinder has the lowest LOD level (LOD2) here.

If the time order of Meshes created here is wrong, the easiest and direct way is to copy and paste them in time order and delete the original ones.

The Meshes created in this documentation are used for subsequent demonstration of the different LOD level effects.

Creating Empty Objects

Click Add -> Empty -> Plain Axes in Blender, or press the shortcut key Shift + A to create a new Plain Axes empty object with no naming requirement.

After creating:

image-20230310104116607

Binding LOD Models with Empty Objects to Parent-child Relationship

Select Empty in the Scene Collection panel first, then hold down Shift and click mesh_LOD2 to select all four items. Right-click in the operation interface to open the Shortcut Menu. Click Parent -> Object, or press the shortcut key Ctrl + P and select Obejct in the pop-up Shortcut Menu. Empty is the parent, while three Meshes are its children with the parent-child type as Object.

After Completing:

Adding Custom Properties

Select Empty in the Scene Collection panel. Click Object Properties -> Custom Properties -> New in the Property Bar below. Click the button on the right side of the prop to open the Edit Property window. Change the Float type to String in the Type column, and Property Name to fbx_type. Click OK.

image-20230310133505763

Change the fbx_type to LodGroup (Case should be standardized, otherwise errors may occur).

Exporting

Click File (Menu Bar) -> Export -> FBX (.fbx). Select the export path of the file, modify its name, and check Custom Properties. Change Forward to -Y Forward, Up to Z Up. Check Apply Transform as needed, then select Export FBX.

133229107077274564

Importing Static Mesh LOD Files into Flexi

Drag the exported FBX file into the Resource Preview window of the Flexi Engine (You can first select the directory where the file is to be located in the Project panel).

In the pop-up FBX Import Options window, check Mesh, Automatically Generate Screen Ratio, Import Textures, and click Import or Import All.

Double-click the generated XMOD file to enter the Model Preview window to check if the LOD is correct.

Simplygon LOD:

Create the LOD of the model by Simplygon.

Install the two necessary runtime libraries before using Simplygon for the first time.

Run and install the \tools\simplygon\vcredist_x64.exe.

Run and install the \tools\simplygon\vcredist_x86.exe.

Register before using. Note: Don’t need to register repeatedly.

Open the \tools\simplygon\LicenseApplication.exe.

If you do not have a Microsoft account, click Create to register an account. It is recommended to pre-register a Microsoft account on the web page, which is much faster. Then you can directly log in here.

image-20220930122724743

Active indicates that the account is activated. After activated, open the Model Editor and make LOD settings in the window.

image-20220930112524697

Importing Skeletal Meshes

Export skeletal mesh from external 3D modeling softwares.

The skeletal mesh is formed by two parts:

  1. A set of polygons that forms the surface of the skeletal mesh.

  2. A hierarchical set of associated bones used to animate polygon vertices.

In the Flexi Engine, Actors are often used to represent characters or other Actors with animations. 3D models, bindings and animations are created in external modeling and animation softwares such as 3Ds Max, Maya, Blender, etc. Then import them to the Flexi Engine through settings in the Editor.

Drag the exported FBX file to the Resource Preview window.

image-20220930095932193

Make settings in the pop-up FBX Import Options window.

image-20230526104915924

NO.NameDescription
1MeshWhether to import mesh.
2YAdjust the Actor's orientation. In general, we need to rotate the Y-axis by 180 degrees.
3Convert SceneWhether to convert the scene from the FBX coordinates to the Flexi Engine coordinates. The file units will also be matched.
4Import TexturesWhether to import textures.
5Import SkeletonWhether to import the skeleton. The file suffix of the imported skeleton is _tpose.xskt.
6Import All/ImportWhether to import all meshes or a single mesh.

Check whether the resource has been imported correctly by viewing it in the Level panel.

image-20220930095945949

Importing Animations

Drag the exported FBX file to the Resource Preview window.

image-20220930131135881

Make settings in the pop-up FBX Import Options window.

image-20230526111110266

NO.NameDescription
1YRotation. This part needs to be consistent with the parameters when importing Skeletal Mesh and Skeleton are imported.
2Convert SceneWhether to convert the scene from the FBX coordinates to the Flexi Engine coordinates. The file units will also be matched.
3Import AnimationWhether to import the animation. When importing an animation, a matching skeleton file must be selected. The animation file is suffixed with .xskt after being imported.
4Select Skeleton FileYou can drag and drop a skeleton file (.xskt file) from the Resource Preview window, or select a skeleton file from the drop-down box as matching skeleton data when importing an animation. Please refer to the Animation Import feature for details. (This is a Tpose for testing the imported skeletal mesh.) This operation is to judge whether the bone topology in the animation file is consistent with the skeleton.
5Import All/ImportImport all animations or import a single animation. The Import All button allows you to import multiple FBX data at one time when dragging in several FBX files.

View the imported animation in the Resource Preview window.

image-20220930130901158

Check whether the imported animation is correct:

Select the folder to import the skeletal mesh. Right-click theResource Preview window and select Create Res -> Actor. View the new Actor in the Resource Preview window.

image-20220930101156304

image-20220930101203554

Double-click the new Actor to enter the editing window. Drag the action file into the area under the Action List and check whether it is imported correctly.

image-20230526111819868

image-20230526111324540

Click the Skin List and drag the file to the area under it. Check whether it is imported correctly.

image-20230526111931839

image-20230526112106437

Under the Action List, click to switch between Tpose and the imported action to check whether it is correct.

image-20230526112156061

Importing Speedtree Resources

Exporting Resources from Speedtree

Pay attention to the settings of the Scale factor when exporting. The default unit in the Flexi Engine is meter (m), while that of Speedtree is foot (ft). For 1ft equals 0.3048m, the Scale factor of the model should be 0.3048(rounded to 0.305) when exporting.

Importing Speedtree Resources to Flexi

Create a folder in the Project panel directory and open it, for example, Speedtree. Drag the ST file to be imported to the Resource Preview window in the Engine (folders can be dragged).

image-20220930132157525

Properties of the panel importing .st files.

image-20220930123931013

NO.NameDescription
1AO BrightnessAdjust AO brightness.
2Skip TextureWhether to skip texture. Textures will not be dumped when checked.
3Import ColliderWhether to import colliders.
4ImportImport files.
5AddAdd several .st files.

Check whether the resource has been imported correctly by viewing it in the Level panel.

image-20220930113507478

Other details will be processed automatically during the dumping:

  • If the material in the original ST file contains subsurface scattering property and map, the material of the converted model will also automatically have the subsurface scattering property.
  • Roughness maps stored in Channel Alpha of the normal maps in PNG files are automatically split into maps with an suffix "_m" when converted to TIF files. Roughness is stored in Channel B.
  • AO in Speedtree is available in the Flexi Engine. It is stored in the RGB Channel of vertex. Note that AO can be adjusted in Speedtree.
  • Collider models in Speedtree are available in the Flexi Engine. See the picture below.

Map Resources

Map Standards

PBR is available in the Flexi Engine. We need to follow the mapping standards of PBR.

Rules for suffixing common maps are shown in the table below. Note: When the PS plug-in FlexiTIFPlugin exports in TIF format, the corresponding map type will be automatically selected according to the file suffix.

Original Image (TIF)SuffixDescription
Diffuse Map/Albedo Map/Base Color_DRGB/RGBA
Normal Map_N
Mix Map_MR: MetallicG: RoughnessB: Specular levelA: Ambient Occlusion
Height Map_HRGBA (From Channel A, initial color is 128)
Emissive Map_ERGB
SubSurface Strength_SSS
Flow Map_FM
Mask_Mask
ImageSequence_SequenceOnly the first 5 levels of the MipMap are retained
Exporting from Substance Painter

Substance Painter export settings:

Exporting from Photoshop

After you create the map resources in Photoshop, export them by the installed Photoshop plugin.

Color Settings:

Exporting maps:

Chinese is not allowed to appear in the export path and file name of the map.

After mapping, the map will be saved in FlexiTIFPlugin (*.TIF, TIF) format.

Select the corresponding texture type and adjust its size in the pop-up panel.

Click File -> Save as. Select FlexiTIFPlugin (*.Tif), and save.

Photoshop FlexiTIFPlugin panel is shown as the picture below.

image-20220930124354645

NO.Description
1Select map type.
2Select the corresponding platform for separate settings.
3Modify texture size.
4Select OK to export TIF files, select Export DDS to export DDS file

Exporting Resources from Flexi

Exporting Resources to the Specified Folder by Reference Relationship

Select the resource file to be exported and right-click it. Click Resource Export and select export path in the Select Directory window. Click OK to export.

image-20220930105100131