Blender rig exporter/animation importer


#63

I love you.


#64

I love me more


#65

Wouldn’t doubt it .3.
lol


#66

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.


#67

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.


#68

Looking forward to this! :smiley:


#70

I can’t wait. Take my money now!


#71

PST did you ever post that video? :smiley:


#72

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
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.


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


#73

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?


#74

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

#75

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.


#76

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


#77

I think it’s the animation itself, yeah.


#78

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.


#79

where exactly do I run this script.


#80

Create a panel (drag to the left):

Set panel type to text editor:

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


#81

@Den_S I’m really confused I saved the file as

and its located at

where is it???

I cant find the file anywhere


#82

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


#83

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.