UDN
Search public documentation:

FBXSkeletalMeshPipeline
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > FBX Content Pipeline > FBX Skeletal Mesh Pipeline
UE3 Home > Character Artist > FBX Skeletal Mesh Pipeline

FBX Skeletal Mesh Pipeline


Overview


Skeletal Mesh support in the FBX import pipeline provides a streamlined workflow for getting animated meshes from 3D applications into Unreal for use in games. In addition to the meshes being imported, animations and morph targets can be transferred using the FBX format all within the same file if desired. Also, the textures (diffuse and normal map only) used in the materials applied to those meshes in the 3D application will be imported and materials will be automatically created and applied to the imported meshes.

Features supported for importing static meshes using FBX:

Note: Currently, only a single animation for each skeletal mesh can be imported in a single file. Multiple morph targets can be transferred for a skeletal mesh in one file, though.

This page is a technical overview of using the FBX content pipeline to import skeletal meshes into UnrealEd. See the FBX Best Practices page for more information, tips, and tricks on working with the FBX content pipeline in a development environment.

ALERT! IMPORTANT: As of September 2011 the UE3 FBX import pipeline uses FBX 2012. Using a different version during export may result in incompatibilities.

General Setup


Single Mesh vs Multi-Part Mesh

Skeletal meshes can be comprised of a single, contiguous mesh or they can be made up of several separate meshes all skinned to the same skeleton.

multipart.jpg

Using multiple meshes makes it possible to LOD individual parts differently as well as exporting parts separately for use in modular character systems. There is no performance penalty for creating your skeletal meshes this way. The individual parts are all combined when being imported into Unreal Editor.

Rigging

Rigging refers to the binding of a mesh to a skeletal hierarchy of bones/joints. This allows the bones/joints of the underlying skeleton to influence the vertices of the mesh, deforming it as they move.

Skeleton

There are various ways to go about creating the skeleton depending on your preference and the 3D application you use.

3dsMax

How you go about creating skeletal hierarchies in 3dsmax is up to you. You may use the standard Bones Tools as they work quite well, or create your own hierarchy of objects to allow for completely custom geometry and controls. There are many ways to skin a cat (pardon the pun) and tons of tutorials out there that show how to create animation rigs for game characters. You can also refer to the 3dsMax Help for complete details on how the tools work.

max_rig.jpg

Maya

In Maya, you will generally use the Joint Tool to create the skeleton for your skeletal mesh. Again, there are endless tutorials on using this tool and creating rigs in Maya. The Maya help is also a good source of information on the subject.

maya_rig.jpg

Binding

The process for binding a mesh to a skeleton differs depending on which 3D application you use.

3dsMax

In 3dsMax, the mesh(es) must be bound to the skeleton using the Skin modifier. The process is the same whether the skeletal mesh consists of a single complete mesh or is made up of multiple mesh parts.

  1. Select the mesh to be bound.
    max_skin_1.jpg
  2. Add a Skin modifier from the Modifier List.
    max_skin_2.jpg
  3. In the Parameters rollout of the Skin modifier, click the skin_add_button.jpg button to add the bones that will influence the mesh. The Select Bones window will open.
    max_skin_3.jpg
  4. Select the bones in the Select Bones window and click the skin_select_button.jpg button to add the bones.
    max_skin_4.jpg
  5. The bones are now displayed in the Bones list of the modifier.
    max_skin_5.jpg
  6. Now you can adjust the weights of the vertices of the mesh for each bone to determine which vertices are influenced by which bones and to what degree. This can be done using envelopes, directly entering the weights for the vertices, or whichever method you prefer.
    max_skin_6.jpg

Maya

In Maya, the mesh(es) are bound to the skeleton using the Smooth Bind command. The process is the same whether the skeletal mesh consists of a single complete mesh or is made up of multiple mesh parts.

  1. Select the mesh(es) to be bound.
    maya_skin_1.jpg
  2. Shift + Select the root joint of the skeleton.
    maya_skin_2.jpg
  3. Select Smooth Bind from the Skin > Bind Skin menu.
    maya_skin_3.jpg
  4. Now you can adjust the weights of the vertices of the mesh for each joint to determine which vertices are influenced by which bones and to what degree. This can be done using the Paint Skin Wieghts Tool or whichever method you prefer.
    maya_skin_4.jpg

Pivot Point

The pivot point of the mesh in Unreal Engine determines the point around which any transformations (translation, rotation, scale) will be performed.

pivot.jpg

The pivot point of a skeletal mesh is always located at the root bone/joint of the skeleton. This means it does not matter where the root of the skeleton is located within the scene. It will be as though it is at the origin (0,0,0) when exporting from a 3D modeling application.

pivot_root.jpg

Triangulation

Meshes in Unreal Engine must be trinagulated as the graphics hardware only deals with triangles.

tris.jpg

There are several ways you can ensure your mesh is triangulated.

  • Model the mesh with only tris - best solution, provides the most control over the end result
  • Triangulate the mesh in the 3D app - good solution, allows cleanup and modification before export
  • Allow the importer to triangulate the mesh - okay solution, allows no cleanup but can work for simple meshes
  • Allow the FBX exporter to triangulate the mesh - okay solution, allows no cleanup but can work for simple meshes

Note: Allowing the FBX exporter to triangulate the mesh results in completely random smoothing when Split Non-Matching Triangles is checked. Importing an FBX-triangulated mesh back into Maya and re-exporting shows proper smoothing.

It will always be best to manually triangulate the mesh in the 3D application, controlling the direction and placement of edges. Automatic trinagulation can lead to undesirable results.

tris_bad.jpg

Creating Normal Maps

Normal maps can be created for your meshes directly inside of most modeling applications by creating both a low-res render mesha nd a high-res detail mesh.

SideBySide.jpg

The geometry of the high-res detail mesh is used to generate the normals for the normal map. See the documentation for your software for details on the exact process for generating the normal map.

Materials

The materials applied to meshes modeled in external applications will be exported along with the mesh and then imported into UnrealEd. This streamlines the process as textures do not need to beimported separately in Unreal Ed, materials do not need to be created and applied, etc. The import process is capable of performing all of these actions when using the FBX pipeline.

These materials also need to be set up in a specific way, especially when the mesh has multiple materials or the order of the materials on the mesh is important (i.e. for character models where material 0 needs to be the body and material 1 needs to be the head).

For complete details of setting up materials for export, see the FBX Material Pipeline page.

Vertex Colors

Vertex colors (one set only) for skeletal meshes can be transferred using the FBX pipeline. No special setup is necessary.

vertex_color.jpg

Export Mesh from 3D App


Skeletal Meshes can be exported individually or multiple meshes can be exported to a single FBX file. The import pipeline will separate multiple skeletal meshes into multiple assets within the destination package.

3dsMax

  1. Select the mesh(es) and bones to be exported in the viewport.
    max_export_1.jpg
  2. In the File menu choose Export Selected (or Export All if you want to export everything in the scene regardless of selection).
    max_export_2.jpg
  3. Choose the location and name for the FBX file to export the mesh(es) to and click the max_save_button.jpg button.
    max_export_3.jpg
  4. Set the appropriate options in the FBX Export dialog and then click the max_ok_button.jpg button to create the FBX file containing the mesh(es).
    max_export_4.jpg

Maya

  1. Select the mesh(es) and joints to be exported in the viewport.
    maya_export_1.jpg
  2. In the File menu choose Export Selection (or Export All if you want to export everything in the scene regardless of selection).
    maya_export_2.jpg
  3. Choose the location and name for the FBX file to export the mesh(es) to and set the appropriate options in the FBX Export dialog and then click the maya_export_button.jpg button to create the FBX file containing the mesh(es).
    maya_export_3.jpg

Import Mesh


  1. Click the import_button.jpg button in the Content Browser. Navigate to and select the FBX file you want to import in the file browser that opens. Note: you may want to select import_fbxformat.jpg in the dropdown to filter out unwanted files.
    import_file.jpg
  2. Choose the appropriate settings in the Import dialog. The defaults should be sufficient in most cases. See the FBX Import Dialog section for complete details of all of the settings.
    import_settings.jpg
  3. Click the import_ok_button.jpg button to import the mesh(es). The resulting mesh, material(s), and texture(s) will be displayed in the Content Browser is the process was successful.
    import_result.jpg

    By viewing the imported mesh in the AnimSet Editor, you can determine that the process worked as expected. If you already have compatible animations imported, you can select one and play it to ensure the mesh imported properly

    import_anim.jpg

Skeletal Mesh LODs


Skeletal meshes can make use of levels of detail (LODs) in-game in order to limit the impact of meshes as they get farther from the camera. Generally, this means each level of detail will have a reduced number of tris, simpler skeleton, and, perhaps, a simpler material (or materials) applied to it.

The FBX pipeline can be used to export/import these LOD meshes.

LOD Setup

General

In general, LODs are handled by creating models of varying complexity going from the full-detail base mesh to the lowest-detail LOD mesh. These should all be aligned and occupying the same space with the same pivot point and should all be skinned to the same skeleton. It is also possible for skeletal meshes to be made up of multiple individual meshes within the 3D application. Each of these parts can have LODs independent of the rest of the mesh. This means that some parts can have simplified versions in different LODs while other parts continue to use higher detail versions. Each LOD mesh can have completely different materials assigned, including different amounts of materials. This means the base mesh could use multiple materials to give the desired amount of detail up close, but the lower-detail meshes could use a single material since details will be less noticeable.

3dsMax

  1. Select all of the meshes (base plus LODs - the order is not important) and then select the Group command from the Group menu.
    max_lod_group.jpg
  2. Enter a name for the new group in the dialog that opens and the click the max_lod_ok_button.jpg button to create the group.
    max_lod_group_name.jpg
  3. Click the max_utilities_button.jpg button to view the Utilities panel and then choose the Level of Detail utility. Note: You may need to click max_utility_more_button.jpg and select it from the list.
    max_lod_utility.jpg
  4. With the group selected, click the max_lod_create_button.jpg button to create a new LOD Set and add the meshes in the selected group to it. The meshes will automatically be ordered according to their complexity.
    max_lod_contents.jpg

Maya

  1. Select all of the meshes (base plus LODs) in order from the base LOD down to the last LOD. This is important so that they are added in the correct order in terms of complexity. Then select the Level of Detail > Group command from the Edit menu.
    maya_lod_group.jpg
  2. You should now have the meshes all grouped under the LOD Group.
    maya_lod_contents.jpg

Multi-Part LODs

Setting up LODs for multi-part skeletal meshes is almost identical to setting up LODs for a full mesh with the exception that each indidual part that has LODs will have an LOD group created for it. The process for setting up those individual LOD groups is identical to the process outlined above.

Export LODs

To export the skeletal mesh LODs:

3dsMax

  1. Select the Group(s) of meshes that comprise the LOD Set and the bones to be exported.
    max_lod_export_select.jpg
  2. Follow the same export steps used for the base mesh (described above in the Export Mesh section).

Maya

  1. Select the LOD Group(s) and the joints to be exported.
    maya_lod_export_select.jpg
  2. Follow the same export steps used for the base mesh (described above in the Export Mesh section).

Import LODs

Static Mesh LODs can be imported along with the base mesh in the Content Browser or they can be imported individually through the AnimSet Editor.

Mesh with LODs

  1. Click the import_button.jpg button in the Content Browser. Navigate to and select the FBX file you want to import in the file browser that opens. Note: you may want to select import_fbxformat.jpg in the dropdown to filter out unwanted files.
    import_file.jpg
  2. Choose the appropriate settings in the Import dialog. Make sure that Import LODs is enabled. Note: When importing LODs, the name of the imported mesh will follow the default Naming Rules. See the FBX Import Dialog section for complete details of all of the settings.
    lod_import_settings.jpg
  3. Click the import_ok_button.jpg button to import the mesh and LODs. The resulting mesh, material(s), and texture(s) will be displayed in the Content Browser if the process was successful.
    lod_import_result.jpg

    By viewing the imported mesh in the AnimSet Editor you can cycle through the LODs using the lod_mesh_buttons.jpg buttons in the toolbar.

Individual LOD

  1. Open the base mesh in the AnimSet Editor by double-clicking it in the Content Browser or right-clicking and choosing Edit Using AnimSet Viewer.
  2. In the File menu of the AnimSet Editor, select Import Mesh LOD.
    lod_mesh_menu.jpg
  3. Navigate to and select the FBX file containing the LOD meshes in the file browser. Note: You may need to set the file format to lod_mesh_fbx_button.jpg to see your file.
    lod_mesh_file.jpg
  4. In the Import LOD dialog, select the LOD level of the mesh you wish to import from the dropdown menu. Then press the lod_mesh_ok_button.jpg to import the LOD mesh.
    lod_mesh_dialog.jpg
  5. You will be notified if the import process was successful and the button for the LOD that was imported should be enabled in the lod_mesh_buttons.jpg toolbar buttons.
    lod_mesh_success.jpg
  6. Repeat the process for each LOD mesh you want to import.
  7. Once all LOD meshes have been imported, you can preview the LOD meshes by using the lod_mesh_buttons.jpg buttons in the toolbar.

Export to FBX from Unreal Editor


Skeletal meshes previously imported into Unreal Editor can be exported back to an FBX file from within the Content Browser.

ALERT! Note: Assets in cooked packages cannot be exported as the source data which has been cooked out is required for the export process.

  1. In the Content Browser, select the SkeletalMesh you want to export.
    export_select.jpg
  2. Right-click on the SkeletalMesh and choose Export to File.
    export_context.jpg
  3. Choose a location and name for the file to export in the file browser that appears. Note: make sure FBX File (*.FBX) is selected as the file type.
    export_file.jpg

Animations


For complete details on using the FBX content pipeline to create and import animations, see the FBX Animation Pipeline page.

Morph Targets


For complete details on using the FBX content pipeline to create and import morph targets, see the FBX Morph Target Pipeline page.