The method currently given to Roblox developers to allow users to import FBX animations does not function as expected.
First, the method Plugin:ImportFbxAnimation
takes in two arguments, but the only really important one is the first argument, which allows you to specify the rig. Unfortunately, the behavior between choosing an empty model and choosing the correct rig seems to have no effect on the final animation, meaning that the animation itself is often imported wrong.
It is important to note, however, that this has been considering FBX files that solely contain the Armature and the baked animation, and do NOT contain the rig in any shape or form. You might assume that this obviously would make the animation import incorrectly, but there are two important facts that show this as the primary bug:
- Selecting the correct rig in the function arguments should make it import correctly.
- Importing with the Animation Editor functions perfectly fine. Why? Because it instead uses
AvatarImportService:ImportFBXAnimationUserMayChooseModel()
, which is a locked, CoreScript function that actually imports animations correctly with the correct rig chosen.
In the case that the rig is included within the FBX file, the Animation will import correctly, but the caveat there is that it re-uploads the contained MeshParts onto ROBLOX, using up space on ROBLOX servers, and clogging my own inventory, making it difficult to search through MeshParts if need be.
Steps of Reproduction:
- Create a plugin, or use
PluginManager():CreatePlugin()
in the command bar to emulate a plugin. - Have this plugin use
Plugin:ImportFbxAnimation()
, with both an empty model and the correct rig as the first argument. - Play the animation back, either using the Animation Editor, or using
AnimationClipProvider
to create a temporary animation, or even upload it and play it in a live game. The end result is not even close to being correct.
Images:
Plugin:ImportFbxAnimation()
with first argument set to the correct rig:
Plugin:ImportFbxAnimation()
without correct first argument (empty model):
Animation Editor Import FBX Animation:
This shows that, seemingly, Plugin:ImportFbxAnimation()
always defaults to the Rig attached to the FBX file, regardless of if there is a specified rig in the function or not. Instead, the Animation Editor uses a different method that correctly chooses a model.
In the cases that an FBX file has the rig attached, again, it will import correctly, but will upload the MeshParts to Roblox again (this isn’t necessarily a bug, but it is somewhat annoying to see, especially since even the Animation Editor will upload the rig to Roblox as well):
Plugin:ImportFbxAnimation()
without correct first argument (empty model) with correct rig in FBX file:
A private message is associated with this bug report