I've developed a plugin for Roblox that can export any Roblox rig into Blender and generate a Blender Armature (rig) equivalent to the Roblox one using the accompanying Blender addon. Then, in Blender an animation can be designed. When done, the Blender addon can be used to generate Roblox animation data equivalent to the animation designed in Blender. Using the Roblox plugin, this can be imported back into Roblox again.
Use this Roblox plugin: https://www.roblox.com/library/716953901/Blender-rig-exporter-animation-importer
Use this Blender addon (save as "something.py"):
Old Blender addon version
(Older version) https://gist.githubusercontent.com/anonymous/08965641f2fe3825c480eb7faacf9fb6/raw/429fed6ff0670e2612feca8e9d537c1b9dfe4b62/rbxblender.py
Install Blender addon though File -> User preferences -> Add-ons -> Install from file -> (select that one)
Example use cases
- Using a more sophisticated animation editor than Roblox Animation Editor plugin. You can use all constraints in Blender to help designing animation, most notably the inverse kinematics constraints.
- Record physics simulations in Blender to an animation which can then be played in a reliable way in Roblox.
- Motion capture animations.
- Import animations from external sources into Blender, then import back into Roblox.
Cool Mixamo animation I've stolen from @Santa_Root
Very basic how-to-use guide
- In Roblox, enable the plugin, click a Rig
- If successful, the GUI will appear
- Click "Export rig", save the .obj file somewhere
- In Blender, on the left panel in the 3D view (press T if invisible), open the Animation tab, under Rbx Animations, select Import model. Import the .obj file.
- Click Rebuild rig in the left panel. (Bones should be visible now)
- Select the created Armature, enter Pose mode.
- Move/rotate a bone, then create a keyframe (Make sure to select the LocRot keying set) (Or enable auto keying):
- Create another keyframe at another timestamp.
- Click Export animation in the left panel. This copies text to the system clipboard.
- In Roblox, click "Load large animation", paste the text copied to the system clipboard. The animation will now be loaded in Roblox.
- Click "Upload animation" to upload it to Roblox as a Roblox animation.
Video tutorial of the above steps: https://www.youtube.com/watch?v=rksbvwG7x9o (by @Santa_Root)
Importing FBX animation data into the generated armature
(Thanks to @Santa_Root for the awesome idea to use Mixamo animations!)
Just use the "Import FBX" button. The FBX file should contain one rig/armature with animation data. That animation data is then loaded and mapped to the generated armature. Technique used to convert is the same as described in the next section, but animation length is automatically derived too during import.
See also http://devforum.roblox.com/t/blender-rig-exporter-animation-importer/34729/30?u=den_s
Mapping arbitrary armatures to the generated armature (
Mapping arbitrary armatures to the generated armature (`__Rig`) (Advanced)
If you export the Blender armature to another tool to animate using something other than Blender, then later import the armature back again (for example, Mixamo animations), you cannot just replace the original
__Rig armature. This armature contains some important metadata.
The utility script below can map bones from one armature (called
__Rig2) to the
__Rig armature (based on bone names). This mapping is done in armature space. This script will also convert transformations done on the HumanoidRootPart to all childs of the HumanoidRootPart (In Roblox, the HRP should be stationary). It is assumed that all bones existing in
__Rig also exist in
Before running the script, go to
__Rig its Pose mode and select all the bones you want to create keyframes for (typically all).
Just use the "map keyframes by bone name" button within Blender. It will map the selected armature onto the generated armature by bone name. You have to set the frame range properly first though, as only frames during the set frame range will be mapped!
Generate IK constraints
In the left panel, click "Create IK constraints" to quickly generate IK constraints. In Pose mode, first select one or more bones at the end of the IK chain (e.g. feet, hands), then use the tool to generate the constraints. You can optionally generate pose bones too (recommended for long chains). You probably need to tune some constraint parameters after generating one, though...
The scene frame start and end times determine how long the animation is in frames. The frames per second value determines how long each frame is during the conversion. The frame step parameter can be increased to reduce the sampling rate. For high quality animations, use a step rate of 1 at 30 fps. Increasing the value to a value between 2 and 5 results in smoother animations, typically (but it varies depending on the type of animation you create).
If you just want to try it out, you can use this place file containing a single R15 rig: RigSample.rbxl (20.3 KB)