Leap motion, game integration with blender.

So how would someone go about implementing motion tracking via the leep motion controller, into a blender game?

The leap motion controller is basically a kinect for the pc but it tracks your hands, and is said to be 200x more accurate. https://leapmotion.com/

Would you have to specifically code different aspects to do specific things, or could you code once to get blender to recognize it and then be able to control all aspects?

It is able to sense velocity and force, also.

Could someone write a simple addon or script to do this?

It supports phyhon,c++, and many other major languages, java script is coming soon.

Also a side note, im trying to figure out how you would control player movement, like walking and such, in a way you dont have to use the mouse and keyboard at all. the only thing i could think of is closing your left fist will start walking and moving it around will control the camera, and if you open you fist a little you stop walking but can still use your left hand to move around. This leaving your right hand the whole time to do other things.

Well, if they already offer a python api, then it’s just a matter of mapping the relevant data to the proper bones.

Get the information that you need, to create the simulation that you want.

@mrn - You might want to mention what the Leap motion controller is (i.e. post a video about it, for those who don’t know what it is), so that you can get more responses. Since nobody owns the device yet, I couldn’t say for sure just how difficult it would be to write a script to make it interact with the BGE, but I doubt it would be simple. Wraaack (?) wrote a script for Razor Hydra -> BGE interactivity and made a game around the concept, if I recall. Check the Work-in-progress section. He would probably be able to give you an idea of how simple or complex the implementation would be.

I’d imagine that it wouldn’t be very well-suited to traditional gaming (i.e. a game where you would need to press more than one thing at a time). It might do well at casual or first-person view-based gaming, but even then, it really depends on the implementation.

Im sorry, your right. (Updated main post)

The leap motion controller is basically a kinect for the pc but it tracks your hands, and is said to be 200x more accurate. https://leapmotion.com/

@SolarLune, thats what i was thinking is more casual games, like I was saying, it would be hard to figure out a way to do, say hardcore fps games.

so would it require any extra software running beside the game engine? Or since its python would it just work with a script?

Cause I know there is openCV people have been doing with there webcams to track face movement, but this requires extra software to be running.

What exactly do you mean by “extra software”? Any python API can be referred to as “extra software”.

I had to use ctypes-opencv to call into the OpenCV shared lib via python, but I didn’t have to run an additional process, or anything like that. I think one of the demos posted by martinsh required running a server of some sort, that would send data to the BGE via sockets, but I didn’t need anything like that.

I assume that this Leap device will come with its own driver, just like the webcam, and that, given a python api, you’ll just be able to get data from it with a few simple functions, like:


point_data = leap.getPointData()

Or something like that.

oh, ok, well i meant like one setup, i dont know if it was yours or not, but it required a program called track-noir or something like that, to be running along side blender.

So i just got my leap dev unit today, but i didnt come with any software or api, does anybody know where i could get this?

I don’t personally, but I would imagine that there are some instructions that came with the device. Did it mention anything about developing with it? Also, I’d imagine that there are dev forums for it.

ya it didnt come with anything other then a ceo letter.

I don’t know what you have been doing since you sent in to join the Leap Motion Developer team, but I went to:

Leap Motion Developer Portal

and downloaded everything I could, and printed it all out, started a Leap Motion binder and filled it up with all correspondence and news about Leap Motion. All the software is there for downloading also, and you can run the compiled versions found in the Examples folders. Software is available for Python 3.3.0 use in Blender text window as demos on how to program in Python for Blender, even the latest versions. If you expect someone else to do it for you, it’s not going to happen. There is going to be a Leap Motion App Store where you can sell your software and receive a cut of the profits, much like Apple’s App Store, where you get 70% of the sales.