LEAP Motion + Oculus Rift Particle Interactions

LEAP Particles

I recently put together a demo for the art hop in Burlington. This demo renders 2.5 million particles and colors them based upon their velocity.

This demo was written in C++ using Direct3D 11. The particles are simulated on a compute shader that I pass finger positions reported by the LEAP motion in world space. The LEAP is velcroed to the front of my Oculus Rift DK1 (waiting on my DK2). The finger positions are used as attractors for the particles. I ended up using no distance falloff on the force that the fingers exert on particles. Instead of using just the tips of fingers as attractors I use all finger joints reported by the LEAP v2 SDK and give more weight to the attractors as they move further up the fingers.

The hands in the picture are my own hands captured using the infrared cameras on the LEAP motion which give a black and white video feed. The hands are rendered by just putting a textured quad that is offset on the Z axis in camera space using the palm position reported by the LEAP. The black and white color is then shifted to be closer to my skin color and any pixels with a brightness below 0.9 are clipped. This is a quick hack that works decently. I want to try rendering screen aligned quads spanning between each of the joints on my fingers using screen space texture coordinates. This will probably provide somewhat higher occlusion quality.

Lining up the images of the hands to match the positions reported by the LEAP was somewhat difficult, especially since most of the sample code provided by LEAP for the infrared image integration is pretty obfuscated by a lot of complex code to manually attempt to account for the Oculus Rift’s chromatic aberration shaders, distortion shaders, and other stuff like color grading. It’s still not quite accurate and because of how I’m attempting to compensate for the difference of IPD between the stereo infrared cameras in the LEAP and my eyes (about a 30mm difference) if the video feed is shown without clipping all of the video apart from the hands appears to distort when you move your hands close to your face. It’s actually a pretty interesting effect since visually it seems like the hands are the only things unaffected by the warping.

Something I forgot to do in this demo was twirl my fingers which gives a pretty cool effect.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>