Blender mhx2 movement

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

Blender mhx2 movement

Postby cch » Fri Nov 09, 2018 3:21 am

I'm trying to animate mhx2 rig to a set of desired motions, but I'm not sure how to go about this. I do NOT have a mocap file that is going to be imported, but should I be making my own bvh file? Or is there any way to write a script of motion paths or joint angles to set the movements?

Thank you.
cch
 
Posts: 2
Joined: Fri Nov 09, 2018 3:16 am

Re: Blender mhx2 movement

Postby joepal » Fri Nov 09, 2018 10:27 am

I guess you could make the animation visually in blender (by moving around bones and setting keyframes), select the rig and then do file->export->BVH. That'd probably be the easiest way, depending on what your end goal is.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 3405
Joined: Wed Jun 04, 2008 11:20 am

Re: Blender mhx2 movement

Postby cch » Fri Nov 16, 2018 6:38 am

I'm trying to eventually simulate specific movements of the leg, either from video data or from a set list of joint positions. Is there a way to script the desired joint angles, rotations, or motion path?
cch
 
Posts: 2
Joined: Fri Nov 09, 2018 3:16 am

Re: Blender mhx2 movement

Postby joepal » Fri Nov 16, 2018 8:09 am

Blender python is pretty competent. A structured way to do this scripting is to write your own addon, but if you go to the text/script view you can run arbitrary scripts.

If you have a selected rig object containing a bone called "leftleg", you can access it through:

Code: Select all
import bpy
obj = bpy.context.scene.objects.active
armature = obj.armature
bpy.ops.object.mode_set(mode='POSE')
bones = self.armature.pose.bones
leftleg = bones['leftleg']


The variable leftleg is then an instance of this: https://docs.blender.org/api/blender_py ... eBone.html

(the above is out of my head and not tested, might contain typos)
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 3405
Joined: Wed Jun 04, 2008 11:20 am


Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest