Skip to content

Import mixamo 3D model to Urho3D

fredakilla edited this page Jan 25, 2017 · 2 revisions

Import mixamo 3D model to Urho3D

Mixamo characters are great rigged 3D models with animations ready to use and are perfects to fit with the UrhoTournament gameplay. However models are not yet ready for games because geometries and materials are too complexes and not fully compatibles with game engines.

Here is described the process used to import and prepare Mixamo 3D animated models for Urho3D engine using Blender and Urho3D import tools. Example model used here is Galtrilian, the first character for UrhoTournament.

Create and download asset on mixamo.com

On mixamo.com prepare an asset pack by selecting the character and adding animations.

Important : Some animations relatives to character motions have an option "In place" to check to keep model at origin when animating.

Image of Yaktocat

Download animation pack with default settings.

Image of Yaktocat

Downloaded archive contains the 3D model and animations in fbx format.

Prepare 3D model for game

Steps for Galtrilian model are :

  • Remove unwanted geometries (beards, moustaches, eyelashes).
  • Merge sub-geometries and UV maps.
  • Model is already unwrapped but UVs islands need to be repacked into the new UV Map.
  • Generate baked textures (diffuse, normals).
  • Simplify mesh to reduce polygon count (Decimate)
  • Remove built-in materials and create a simple one with a diffuse and a normal textures.
  • Export fbx model ready to import in Urho3D.

All of these steps are performed using the Blender tool in this video. (sorry no sound.)

IMAGE ALT TEXT

When exporting use these settings in the fbx export panel :

Version: FBX 7.4 binary (default)
Scale: "0.01"
Forward: "Z Forward"
In the geometries tab, check "Tangent space" to add tangent data to mesh.

Import FBX model to Urho3D

Use the Urho3D AssetImporter command line tool to convert fbx model to native Urho3D model, using the following syntax :

AssetImporter model Galtrilian.fbx Galtrilian.mdl

AssetImporter will generate Galtrilian.mdl native 3D file model. AssetImporter will also create a directory "Materials" with Material.xml inside and another directory "Textures" with Diffuse.png and Normal.png (textures created in Blender bake process).

Import FBX animations to Urho3D

Mixamo animations are ready to use and can be directly converted for Urho3D using the AssetImporter tool. Each .fbx in downloaded pack contains one animation, and each fbx must be converted to Urho3D .ani format using this example syntax :

AssetImporter anim Standing_Run_Forward_inPlace.fbx Standing_Run_Forward_inPlace.ani

UrhoTournament use a script to batch all files to convert (see tool directory).

Use model in Urho3D

Place generated files in Urho3D Data directory and adjust textures path in Material.xml if necessary. Animated model with material, textures and differents animations is now ready to use in Urho3D engine.

Screenshot