A gent calling himself PaulStormblader has posted a script to do Razer Hydra motion capture with Blender. I’m playing with it right now. I’m not sure if it’s specific to Windows or not. Possibly it is. Anyway, it’s spiffy.
Useful things to know:
- As a Hydra owner, MotionCreator is definitely worth having installed – if only to remove previous sculpting-oriented Hydra profiles you created years ago and forgot about. 🙂
- Read the README of the plug-in. It explains everything – how to install it properly, for instance.
- Also watch this video.
- Today I learnt that Blender on Windows can put its plug-ins into user space and doesn’t need to run as admin. Noice.
- At the time of writing, the plug-in is currently limited to recording data from the Hydra into a set of push-button-there-they-are Empty objects.
- It currently records All The Things. You may not wish for it to record All The Things but, annoyingly, it does.
- You can copy the animation from the Empties to other objects by using constraints (copy rotation, copy location, transforms – works for bones as well as full objects) or the ever-popular drivers
Remember how I said it recorded all the things? That means if you want to do multiple passes (not just multiple takes but multiple passes to animate separate things simultaneously), you have to get clever. Fortunately, today I also learned Blender has a Bake Action feature…
To “save” a motion (from go to whoa):
- Go to the “Animation” tab and look for the “Motion Capture” panel.
- If you haven’t already done so, hit “Add Controller Objects” to drop the Hydra’s magic Empties into your scene.
- Hit the “Activate Hydra” button to make Blender keep watch on the Hydra.
- Use trigger/stick a bit to make sure the empties are responding. They should move at this point.
- Go to your first frame and hit the “Start” button (the little thin one) on the controller you want to use. This will drop a keyframe.
- If you plan to record motion from the trigger, you’re good – holding the start button of that controller down with your thumb is easy. Motion is captured as 0-1 Y.
- If you want to record motion, you’ll need to hold down the bumper button AND the start button. Motion comes in as quaternions for rotation and X/Y/Z offset for position.
- If you want to record the thumbstick movement.. well.. it’s tough to do with one hand because traditionally on the controller you’ll be using your thumb to work the thumbstick.. but you have to hold down Start too. Under the current design, it’s basically a two-handed job per controller at the moment. Would probably be less painful if the controller could treat the thumbstick button the same way it reads Start. Motion is captured in +/-1 X/Y.
- Hit play in Blender and record your motion! (Don’t forget you need to hold down Start to set keyframes.)
- Once you’re done, stop playback in Blender.
- In the Motion Capture panel, hit “Off”. This will stop the Hydra from being able to input data into Blender. (If you don’t do this, you might notice flickering motion like some sort of depsgraph glitch.)
- Create an Empty. Name it something useful, like Bubbles.
- Go to the Constraints tab in the Properties window and select “Copy Transforms” (or just whatever you want to copy). Pick the Hydra empty with the data you want to copy.
- Alternatively, do the same thing with drivers if you know how.
- Hit Play at least once to ensure you’re saving the right data.
- With the Empty selected and in the 3D View window, hit Space bar and run “Bake Action”.
- You’ll get a modal dialogue box. Check things are OK and confirm it.
- Wait for the bake to finish (should be more or less instant)
- Remove the constraint (or driver). You won’t be needing it anymore, for voilá – you now have one Empty with your mocap data saved.
- Clear animation data from the hydra_* Empties using your favourite method – in either Dope Sheet or Graph Editor, select all the animation channels on the objects and hit X to wipe the data out.
So far from my initial tests I’ve mainly discovered that I suck at puppetry – which is fine because I’ve never actually learnt how to be a puppeteer before. It’s a very cool little tool full of possibilities even at this early stage and I’m definitely going to have more of a play with it as time permits.
Also today, I came up with a great design for Gronky that should be a really easy build aside from one interesting technical challenge concerning his mouth. We’ll see how I get on. 🙂