Brekel Kinect -> Blender Mocap Script (almost there)

I’m very close to being able to use Brekel Kinect to feed mocap data to Blender over TCP.
I believe the problem I am having is somehow related to shoulder rotations.

If anyone has a Kinect and would be willing to take a look at this I would appreciate it greatly.

Just run Brekel-Kinect (I use v.40) and turn NITE tracking on. Then load this .blend and run the game (‘P’) (make sure GAMEempty BOOL game property is ‘FALSE’ or server will not start)
brek_cap_HELP.blend (81.3 KB)

You’ll see the legs seem to work fine but the arms are wacky.

I’m sure there is something simple I’m missing… Thanks!

First of all can i say well done! I installed Brekel and all that other Jazz and my i have loaded up your model in Blender and given it a shot.

I too have found the arms a little whackey. What i have noticed is that when i move my legs closer together the legs on the model move further apart. This could perhaps be a problem with how the co-ordinate system is set up in your script… or something.

However… forward movement of the legs are fine, it just appears to be the left-right stuff. So maybee its just a matter of putting in a negative here and there…?

I will try and get my head around your script a bit more (nice work btw) and see if i can offer some suggestions.

Keep up the good work!

The day you get this done is the day I’m down the cost of a kinnect! Microsoft should be paying you!

Hey teldredge,

I have had some limited success

in your script i have change all the elements in the apply rotation and translation section over to the other side… i.e Everything that was left, is now right and visa-versa.

Also, i have chucked a negative in front of jdex[4][0] amd jdex[7][0] to make the shoulder_L and shoulder_R bits respectively the in the translation section the opposite direction of what they were (remember i have swap their sides around!!).

I think the shoulder rotation elements are out of phase. If you can somehow subtract pi radians from their value (and aplly the modifications i have outlined) they might line up correctly.

Im still learning how to use these forums, but if you like i would be happy to email you my blender file with the adjustments. Just contact me in Private and ill send you my contact details.

I will buy both the xbox and the kinnect just to get the mocap capabilitys

No need to buy the xbox, just buy the kinect.

I might as well get the xbox anyway for the games.

ooooooh nice, just what i’ve been lookin for… can’t wait to try it
any chance on getting that fixed script?
i could try to make these changes myself but my python skills are VERY limited.
i’ll report back as soon as i have tried it.

EDIT:
ok i tried it and it works, altho its very funky in a bad way…
as has been stated before, some of the movements are inverted.
wasn’t able to fix it myself but i haven’t really tried too hard yet.
i seriously hope this will be updated.

thanks alot for your effort!

teldredge,
thanks for your hard work on trying to bring us a cool feature such as MoCap to Blender.

I’ve tried it myself with Brekel Kinect 0.48 (the latest on brekel’s webpage) and made it work, although some axis are inverted (arms or shoulders, couldn’t try legs, little space where i am XD ).
Anyway, looks promising and I’ve been wondering, how do i record the animation to a armature or any other way, like actions or some ipo info?

If i can help feeding some output data from the Brekel Kinect, let me know how and i’ll send you it.

@cara-rj - thanks, glad you’re interested in this. I’ll have to try with the newer brekel version.

as far as recording - you can use Game>Record Animation to record the objects loc/rot. Then to hookup to an armature you can use copy loc/rot constraints with the game objects set as the targets. It would be best to make this all hooked up via the program but I need to get past the shoulder rotation issue first.

Thanks for the quick reply teldredge :slight_smile:

I’ve tried the record animation from the Game options but the result wasn’t what i expected: the model parts aren’t animated but the whole model kinda fly on the scene.

I’ve attached the .blend with the resulted animation. I don’t know if I’ve done something wrong…

Thanks for the attention

Edit: I was making some tests with an armature copying the position of some objects with the constraints and recorded the game engine movements but the armature does not recognize the the object moving the bones to make an use of auto key-frame.

Attachments

MoCap_result.blend (117 KB)

@cara-rj - Oops, I just remembered record animation only records movements of dynamic objects, not static.

I’ll have to add keyframes via the program then… darn. I’ll see what I can do. Sorry about that.

does anyone know an easier way to make ‘record animation’ from the bge record static objects too?

@teldredge
Can’t an armature be used for the output instead of the mesh? Like the way Brekel Kinect outputs a BVH file?

Just wanted to point out microsoft officially released the kinnect SDK today: http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/default.aspx

@LiquidApe
that’s sound cool. Let’s see what comes from the official SDK.

I honestly don’t know how teldredge can use the SDK on helping him in his MoCap code.

sorry this necropost resurrection

any1 have news about this script working with v2.66 ?

ty