Skeletal Animation Importing Tutorial

From Luma's Workshop
Jump to navigation Jump to search
This page is in progress and may contain incomplete information or editor's notes.

Todo:

  • Images/Gifs

This tutorial will teach you how to import skeletal animations.
The animations are usually stored in BCK files.

There are mutliple ways to import animations.

Importing with special SuperBMD version

Preparing

Requirements:

(This special SuperBMD version was created only for converting animations and therefore should not be used for model importing.)

Set Up

Since SuperBMD is a line command tool, we simply create a .bat file to make everything easier and faster:

  • Create a text file (.txt) in the SuperBMD folder (give it a recognizable name like "Fbx2Bck")
  • Open the text file and paste the following:
@echo off
"%~dp0SuperBMD.exe" %1 --rotate -a
IF %ERRORLEVEL% NEQ 0 pause
pause
  • Save the text file and change its extension from "txt" to "bat"

Conversion

  • In Blender delete all meshes so that only the armature remains (so that we convert only the animations)
  • Go to File -> Export -> FBX (.fbx)
  • In the "Export FBX" tab be sure that Add Leaf Bones in the Armatures tab is unchecked!
  • Choose a destination to save your FBX file and click on Export FBX
  • Drag and drop your FBX file onto the .bat file you just created

All animations will now appear in BCK format in the same folder as the fbx file. The animations are set to loop by default.

Additionally, you can now set some configurations for your animations (looping settings and more) with j3d-animation-editor. After starting the tool, either go to File -> Load and select your BCK animation or just drag the BCK into the editing window.

Settings:

  • Loop Mode: Set if you want your animation be played either:
    • Loop
    • Play once
    • Play Once - Stop at 1st Frame
    • Mirror once (Play once then play animation backwards)
    • Mirror Loop (same as above, except it repeats endlessly)
  • Tangent Interpolation: Set if you want the translation/rotation be either smooth or linear

Don't forget to save your file with File -> Save.

Importing with FBX format

With this method the animations are converted exactly, but it requires some small extra steps.

Preparing

Requirements:

  • Blender or another modelling tool that can export FBX files
  • j3d-animation-editor
  • Python 3 installed
  • FBXSDK Python Bindings installed

Conversion

Clearing the bones
(Click on the image in case it doesn't play in your Browser)

Before exporting, double the length of the animation. The J3D animation tool currently imports it unintentionally at double speed.

  • In Blender go to File -> Export -> FBX (.fbx)
  • In the "Export FBX" tab be sure that Add Leaf Bones in the Armatures tab is unchecked!
  • Choose a destination to save your FBX file and click on Export FBX
  • Start j3d-animation-editor and go to Convert -> Import .fbx to select your FBX file. (Drag and Drop works too!)

All your animations as well as some empty dummy animations (usual for the fbx format) will appear on the left side with their names.

  • Click on your animation to load them in the editing window
  • There will be many extra bones, that needs to be removed (often named RootNode and skeleton_root). These appear before and after the correct bones.
    • Select all the rows of these bones and press Delete to clear them. The tool will remove them when saving.
    • This can be done by holding Shift and clicking on the left side panels (shown right).

You can now set some configurations for your animation and save by going to File -> Save

  • Loop Mode: Set if you want your animation be played either:
    • Loop
    • Play once
    • Play Once - Stop at 1st Frame
    • Mirror once (Play once then play animation backwards)
    • Mirror Loop (same as above, except it repeats endlessly)
  • Tangent Interpolation: Set if you want the translation/rotation be either smooth or linear

Importing with BVH format

The easiest and fastest way to import animations. However it is currently experimental and might has some bugs.

The bvh format is a very handy file format as it only stores frame and armature information. Only disadvantage is, that it doesn't support scaling. More detailed info about the format can be found here.

Preparing

Requirements:

  • Blender or another modelling tool that can export BVH files
  • j3d-animation-editor
  • Python 3 installed

Model Info

Keep this in mind in your modelling tool before animating:

  • Your model needs to have its bones unrotated ("looking up") (in t-pose, not in the animation itself). This is due to a currently missing feature by j3d-animation-editor's bvh importer.

Conversion

  • In Blender go to File -> Export -> Motion Capture (.bvh)
  • In the "Export BVH" tab be sure that:
    • Rotation is set to the rotation format you used for animating
    • Root Translation Only is unchecked
  • Choose a destination to save your BVH file and click on Export BVH

(There appear to be sometimes problems with the rotations which has something to do with the rotation format; investigation needed)

  • Start j3d-animation-editor and go to Convert -> Import .bvh to select your BVH file. (Drag and Drop works too!)
  • Go to Edit -> Remove Duplicate Frames. This will heavily decrease the filesize.

You can now set some configurations for your animation and save by going to File -> Save

  • Loop Mode: Set if you want your animation be played either:
    • Loop
    • Play once
    • Play Once - Stop at 1st Frame
    • Mirror once (Play once then play animation backwards)
    • Mirror Loop (same as above, except it repeats endlessly)
  • Tangent Interpolation: Set if you want the translation/rotation be either smooth or linear

Importing with Maya

(This is unfinished)

Preparing

Requirements:

  • Autodesk Maya with animImportExport plugin (Maya LT doesn't have it!)
  • j3d-animation-editor
  • Python 3 installed

Be sure that the animImportExport plugin is checked

Conversion

Maya

  • Select the Maya objects to export animation from.
  • Go to File -> Export All or File -> Export Selection.
  • Set the file type to animExport.
  • Enter or select the .anim file to export

j3d-animation-editor

  • Start j3d-animation-editor
  • Go to Convert -> Import Maya .anim and select your .anim file
  • Go to File -> Save/Save As to save your BCK file