Blender rig exporter/animation importer

This is really helpful if I would like to maybe work on some animations for my new game.

2 Likes

This is caused by the spaces in the model name, the roblox exporter removes those spaces, causing the addon to fail to map the parts.

This would make animating a whole lot easier than it is inside studio.

Removed spaces in the model name, still got an error.

Go back to object mode first, then re-import.

1 Like

For Mixamo users: I made some small modifications to the original script so that animations imported from Mixamo look cleaner.

  • When the rig is rebuilt:
    • All body parts (sans the lower torso) have their location constrained.
    • For knees and elbows, only rotation along the x-axis is allowed.
    • For wrists, all rotations are disabled.
    • for ankles, only rotations on the x- and z- axis are allowed.
  • The functionality of is_transformable is split into is_translatable and is_rotatable. This is useful for jumping animations, where you want to disable changes to the location of the of the hip (Lower Torso) while still allowing its rotation.

Before:

2018-01-10_23-39-40

After:

2018-01-10_23-32-53

Some caveats:

  • For animations that involve a tool, you may want to disable the rotation constraint on the right hand.
  • If foot planting is unsatisfactory, you may want to disable the rotation constraint on both ankles.

DL: https://pastebin.com/raw/fKtXPwKx

37 Likes

AAAAAAAAAAAAAH!!! Job well done mate. Im actually going to start using this. That splefunking thing going on with jutting out/twisted body parts was ticking me off. Now no longer!!!11!!11!!

4 Likes

If your imported animation appears shaky or jittery, there’s also a way to smooth it:

  1. Import the animation you want into your rig.

  2. Open both the dope sheet panel and the graph editor panel.

    image

  3. On the left-hand side of the dope sheet panel, select all the bones. You may have to expand some arrows in order to show all bones. This should cause some lines and dots in the graph editor to appear.

  4. On the graph editor, select all the nodes by pressing A. All the nodes should be highlighted.

  5. Open the toolbox by pressing space, then type in Smooth Keys. Only one option should appear. Click this option.

  6. Do step four several times until the shakiness disappears. Overdoing it will cause the animation to appear sluggish, so don’t overdo it.

Video:

Before:

After:

16 Likes

Thanks for sharing that!
I’ve added a link to this in the OP. I’ll probably merge those changes into the main module at some point and add an option for it. Definitely makes blocky R15 rig animations look much better.

3 Likes

I hand-modified a rig such that it can be imported to mixamo with its mesh intact:

It’s attached to this post as an fbx. I can probably give the blend file if anyone wants it. All I did was assign each imported mesh to its own vertex group, join all the meshes into a single mesh, and parent it under the armature with the armature modifier. I also offsetted the root bone a bit because re-importing the exported fbx into a rig was causing some issues. It may just be a fluke.

Now that I think about it, joining all the meshes probably wasn’t necessary. I just copied the structure of the characters I downloaded from mixamo.

roblox-rig-experiment.fbx (162.8 KB)

19 Likes

Did you ever make the video tutorial?

3 Likes

Going to re-shoot this in a few days, I would like to do some edits :slight_smile:

1 Like

Alrighty!

So how do I know what parts of the model will be animated and which one(s) won’t be?

Edit: Also @Den_S, what does this mean?


As well as:

I get the first image when trying to import an animation from the Load button, and the second one from when I try to load an animation from the “Load Large Animation” button.

1 Like

The plugin does not have a visual way to do that currently.
It does dump the animation sequence when you export the animation in some location, which you can still process externally to remove the joint animations you don’t want. Or simply delete the joints of the parts you don’t want to animate at all before exporting the rig, that will also work.

You should use the “large animation” button (still have to remove the other one, which only causes confusion). Make sure to paste the data on the 2nd line, for some reason it stopped putting the caret automatically at that line.

1 Like

I am attempting to import animations (from Mixamo) but all of them are flipped 180 degrees (like the NPC normally will face the camera but the animation will face away from it). I don’t know how to fix this…

1 Like

Rotate the rig before exporting it, the plugin does not transform the armature itself to match the HumanoidRootPart transform currently (which always faces a fixed direction in world space). That causes Mixamo to think the rig is facing the other way around.

3 Likes

What would you recommend for setting up a custom IK rig? (Mainly to limit rotation on an axis)

(just additional info, apparently clicking on the lock button does the exact same thing)

3 Likes