Blender rig exporter/animation importer

I love you.

4 Likes

I love me more

9 Likes

Wouldn’t doubt it .3.
lol

5 Likes

Has anyone been able to rig a roblox model to a .BVH file within blender? I seem to be having a few issues doing so.

5 Likes

With some tinkering, I’ve been able to import custom BVH (motion capture) files into blender and impose them onto a robloxian R15 rig. Meaning we no longer have to rely on mixamo animations and can now create our own actions.

I’ll be posting a Youtube video shortly.

13 Likes

Looking forward to this! :smiley:

7 Likes

I can’t wait. Take my money now!

4 Likes

PST did you ever post that video? :smiley:

6 Likes

Using motion capture equipment you can create your own. Then you can use the makehuman walk plugin to transfer the mocap animations onto the rig.
You can do this by simply going to the makehuman plugin and clicking 46cbf1071923e150367a89ee5facc8023fac08b2.png
Load and Retarget. Make sure to set the frames to 500+ as most mocap animations are a lot of frames.
Then locate the .bvh file and click it.


This here would be the robloxian version of the T-Pose.

Here is the result.ed89f086ba6aa94b70beda8908a622d9f9764a12.gif
You can download the makewalk plugin from here.
http://download.tuxfamily.org/makehuman/releases/1.1.1/makehuman_plugins_for_1.1.1.zip
To install you place the “makewalk” folder into your addons folder in this directory.
\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons
To get to your appdata folder you type in %appdata% in your search bar.

EDIT: The second image is a gif

21 Likes

This is gonna help a lot as I wanna do some rendering in Blender too. Can we get one that would also work with Cinema4D/C4D?

4 Likes

I don’t own a licence for C4D, but it should be very easy to get working if you’re willing to invoke Blender on the fly from C4D. The Blender addon fully supports invoking the actions through a script too, so you can just run Blender from some C4D script to achieve import/export functionality with ease.

To auto-run a script in Blender, just invoke it this way: %BLENDEREXEC% --python <scriptfile>.py --background -- <scriptargs>. Within such a script, call e.g.:

bpy.ops.object.rbxanims_importmodel(filepath=objpath)
bpy.ops.object.rbxanims_genrig()
bpy.ops.export_scene.fbx(filepath=fbxpath)

Then import the created FBX into whatever tool you want (all using a simple C4D plugin?).

To convert a FBX with animation to a string to the clipboard, use this script:

bpy.ops.object.rbxanims_importmodel(filepath=objpath)
bpy.ops.object.rbxanims_genrig()
bpy.ops.object.rbxanims_importfbxanimation(filepath=fbxpath)
bpy.ops.object.rbxanims_bake() # note that this copies to clipboard, the action that generates the raw string is not currently exposed through such an api
6 Likes

Everything works fine from what I’ve done, only one problem I get is that for some animations when I put it into roblox. The legs are in the ground


Is there a way to stop this without editing the hip height? It’s also slightly in the ground in blender too.

5 Likes

When does that offset happen? Doesn’t the animation you try to import have that offset by itself?

4 Likes

I think it’s the animation itself, yeah.

4 Likes

If you want to correct it, you can use this simple script to repeat the last action across all frames after the current one + regenerating the keyframe.

import bpy

for f_idx in range(bpy.context.scene.frame_current+1, bpy.context.scene.frame_end+1):
    bpy.context.scene.frame_set(f_idx)
    bpy.ops.screen.repeat_last()
    bpy.ops.anim.keyframe_insert()

Select e.g. the LowerTorso in pose mode, then move it upwards, then run the script to apply the same transformation on all frames after the current one.

7 Likes

where exactly do I run this script.

4 Likes

Create a panel (drag to the left):
44eaf9e44cc225caae5de7c7546c07c59f9d3337.png

Set panel type to text editor:

Create new text document there, paste the script, then run.

8 Likes

@Den_S I’m really confused I saved the file as 4447b96457fd246acc5ba51c45774888ec73a905.png

and its located at 3436196f7d38430f446812315a6375bce0233104.png

where is it???

https://gyazo.com/4f6aae81aed665642aa0c43027885791

I cant find the file anywhere

3 Likes

Make a compatibility for R6 as the chances of me using R15 are going to be slim.

5 Likes

I believe it’s due to the fact that it’s being saved as a text document instead of a python file, I recommenced changing the file extension from “.txt” to “.py” instead of “.py.txt”. Since blender only searches for python files in your case. aa95bd2ee14fa9f03954399d8ea13e2c544193f3.jpg

5 Likes