Razer Hydra Motion capture Addon for Blender 3D

I wrote a mocap plugin for realtime animation using Razer Hydra controller. It caps quaternion + xyz position, trigger and joystick channels. (It also lets you keyframe at specific places if that’s what you want.)

Download Version 003. It has all the demo scenes in the video, except the storm cloud, to get you up and running in no time.

It cuts through the hours of keyframing and lets you jump right into the action - and the hydra’s low latency and 0 drift make it a pleasure to work with. It’s making animation a lot more fun for me. Now I’ll probably waste a lot of time making a movie about an inchworm and storm cloud. =)

It’s great working with the hydra because I get rotation and position and triggers and joysticks. This gives a lot of freedom to create complex rigs and puppets.

Eventually it’ll be updated so it’s far easier to record animations, and a lot more features, but for now it’s stable and fun! If you’ve got a hydra, go play with it! You might even use it for something.

PM me if you’d be up for helping me code it.

This is really cool. I’ve got a Razer Hydra at home so I’ll definitely try this out. :slight_smile: Thanks!

cool script!!

Wow ! nice ! Thx.

OK, my first impressions are very positive. It’s a bare but already really useful implementation, like you said. (Classic Blender!) I’ve long been jealous of my friend’s ability to puppeteer stuff in 3DS Max using an XBox controller too… now I have no need for jealousy. This is great. :slight_smile:

What would be great to see in future versions (from highest to lowest annoyance factor):

  • use the thumbstick button as a secondary record button along with Start, if possible – otherwise you have to have two hands on one controller
  • a way to control specifically which data gets recorded (tickboxes?) instead of recording all the things from one controller at once – it’s possible to copy just what you want to a separate object using constraints/drivers and then Bake Action to save it permanently, but it’s a bit tedious
  • a way to quickly clear mocapped data channels on object - they’re annoying to delete by hand if you want to go back for a second try quickly
  • specify which object the data gets recorded to (maybe using an object selector?)

Also is it just me or does the thumbstick’s circle of movement clip against its boundary a bit? Is that hardware or software?

I dropped a quick blog post here with some workflow tips for the add-on in its current state if anyone’s interested.

The thumbstick goes to +/- 1, so it doesn’t feel like it’s clipping to me.
Thanks for writing up the post! I know how to use this plugin better… Yeah, there are way too many annoying workarounds that could be solved by me actually knowing programming and pluggin in some cool stuff. In the end, it’s going to be super easy and intuitive for anyone to animate with.

The hydra rocks any gamepad for controlling stuff - but I’d really like to see mouse / gamepad / midi / everything built easily into blender for quick animation.

I’m actually planning to do all the things you suggested, except using the thumb sticks as record buttons. That makes sense.

You can easily add thumbstick support right now if you’d like.

Line 422: add “or hy[‘bStickR’]”


if hy['bStartR'] or hy['bStickR']:

line 428: add “or hy[‘bStickL’]”


if hy['bStartL'] or hy['bStickL']:

Having tick boxes to specify which channels to record, have a dropdown to select different objects to record to (or a per object property) and have frame ranges to specify when to drop new keys in for the new channels are en route. I was going to let you add custom driver like functions to alter the influence, but it’s easier to use drivers. (and the driver management / speaker tools plugin is really useful here)

However, I don’t know much about programming so it’s slow going. I estimate progress in 2 weeks time.

For a professed non-coder you have still coded a sweet plug-in. :slight_smile:

Tru dat! Gamepad support would probably be even nicer to have than Hydra support - loads more people have gamepads.

You rock. :smiley:

OMG!! What did I just see? That is amazing. Great work for non animators like me :slight_smile:

It’s great until you have to clean the data up. Then it gets not fun.

That said, you can still use it to pose things quickly - instead of recording the movement as Blender plays, you could advance manually between your intended keyframes then hit Start to set a keyframe.

Isn’t there a keyframe cleaner in the f-curve modifiers?

Yes but it is somewhat powerless against mocap data.

Seems like it needs a noise removal pass.

There’s a “smooth keys” tool but there’s no parametric control on it unfortunately (e.g. how much to smooth).

Blender in general could probably benefit from an automatic redundant key remover, not just for this tool either; you have to manually get rid of redundant keys in the F-Curve editor after you go from blocking to splining in normal character animation. It’s usually visually obvious which ones you can drop, so it can probably be automated too (including threshold as a parameter, c.f. Remove Doubles).

Could you calculate a median curve derived from that noisy one?

Possibly, with more maths knowledge than I’ve got taking into account things like splines. :slight_smile:

Have a demo:

Excellent mash up. Was this a single capture or a couple overlayed?

The head movement and the mouth were done in one pass, the blinks were done in a subsequent pass.

Another little test, this time more complicated lipsync done in a single thrilling pass:

.blend file here

The controls are as follows: joystick up closes the mouth, joystick down opens the mouth, joystick left spreads the lips and joystick right rounds them. Trigger in and out curls the bottom lip up.

This takes a while. From a couple of hours of mucking around I’m learning that using this system, words are now gestures. It would be great if the Hydra’s joystick and trigger had a bit more weight on them - precise and delicate movements are tricky.

Ha! These are grand. I really expected this to be used for lip syncing - mainly because that’s one of the projects I want to use it for. I’d suggest using hand movement position rather than trigger / joystick, because you can use flicks of your wrist or quick arm movements or really subtle movements.

No matter how fast you go, it’ll always stick the track =)
(careful that you don’t break your desk!)

Due to popularity of the plugin, I’m going to accelerate development and try to get something useful out next week.

Also, one thing I did not show in the demo video is that you can connect it to the physics sim and knock stuff around in a rigid body world. =)

They are coming up with a full body motion tracker and is compatible with hydra, will your script work with that as well?