Here is a quick video of the results before we get on to the discussion:
Basically this started because a colleague at Georgia Tech, Alex Trevor (soon to be Dr,), had an Oculus Rift and mounted a camera on top of it to see the Kinect output with the Oculus Rift. I thought that was really cool and had previously worked on a game that used the Kinect Skeleton to throw fireballs (though I lost all the source code for the first version). I really wanted to combine those ideas and had to start over.
Luckily, Dr. Brian Peasley (now at Microsoft) came to my rescue as always and gifted me an Oculus Rift.
Luckily, Dr. Brian Peasley (now at Microsoft) came to my rescue as always and gifted me an Oculus Rift.

To explain a bit, the Oculus Rift is an immersive virtual reality headset. The two images are displayed on the screen above because one is projected to the left eye and one to the right eye. As you rotate your head, the images change and it feels like you are looking at a real environment (it is pretty amazing). This is why there are two images in the video (and pretty much all Oculus Rift demos). To appreciate it fully, I recommend wearing an Oculus Rift while watching the video.

The Kinect everyone should know by now. It can yield a really good skeletal estimation of a persons joints from the depth data, which can then be used to represent gestures.
I had some time this week so I grabbed the Unity third person MMO example, added the Kinect scripts provided by CMU here, created my own fireball and fireball related prefabs and scripts, added the Oculus package, changed all the camera stuff to make it first person, and tweaked a lot of stuff. Daniel Castro (also at Georgia Tech) was nice enough to help me film me making a fool of myself.
It was obviously a bit more complicated than that. Lots of tinkering and scripting was involved to get things working but that is the output. Here at RIM, we are working on lots of other cool things and if you are interested, check out some of my other projects.
Ive uploaded the source for public use and you can find it here (just make sure to please cite me):
https://github.com/StevenHickson/UnityKinectOculus
The fireball script just takes two Game objects (the Vikings left hand normalized by your hip) and uses a velocity measurement to determine if you want to throw the fireball, then it creates a fireball and sets its velocity to your hands velocity whenever you throw. This can be done easily with a small amount of code as below:
void Update () {
Vector3 norm_hand = HandPosition.transform.position - HipPosition.transform.position;
Vector3 velocity = (norm_hand - lastPos) / Time.deltaTime;
float dist = velocity.magnitude;
if (Input.GetButtonDown("Fire1") || (dist > THRESH && dist < MAX_THRESH)) {
Rigidbody clone;
Vector3 pos = HandPosition.transform.position;
pos.z += 1;
clone = (Rigidbody)Instantiate(Projectile, pos, transform.rotation);
clone.velocity = velocity * SPEED;
}
lastPos = norm_hand;
}
And thats it for the fireball. Then there are some scripts destroying the fireball and vikings when they collide.
For the mapping of the joints to the main Viking, each joint position of the Viking is mapped to the corresponding Kinect Skeleton joints with GameObjects in the KinectControllerScript.
Then the Oculus SDK is used to create the camera and player control mapped to the main viking.
Then the Oculus SDK is used to create the camera and player control mapped to the main viking.
For all the code, see the Github project
Im using a friends version of Unity Pro because Im a poor graduate student. So please donate if you liked this work so I can continue doing it. All of these gadgets are expensive and I do all this and post it for free.
So please consider donating to further my tinkering!!
Places you can find meRelated Post:
and
- MOOC Research and Innovation
- Collection of SQL queries with Answer and Output Set 2
- PiAUISuite Update and Voicecommand v3 1
- Sign in to edx org with Google and Facebook and
- IT Laws and Patents notes for BSc IT Mumbai University
- How To Bypass Megaupload Wait Time And Download At Maximum Speed !!!
- The rise of the Bots Robots Surgeons and Disruptive Technology
- The Computer Science Pipeline and Diversity Part 2 Some positive signs and looking towards the future
- Collection of SQL queries with Answer and Output Set 4
- Skill maps analytics and more with Google’s Course Builder 1 8
- Why Watson and Siri Are Not Real AI
- PPT Presentation on Memory Management in Winnows2000 and WindowsXP
- Moore’s Law Part 1 Brief history of Moores Law and current state
- Information sharing for more efficient network utilization and management
- A year and a bit with Inbox Zero
- Explore the history of Pop and Punk Jazz and Folk with the Music Timeline
- Tips on Choosing Apt Web Templates and Service Providers
- Remembering to forget
- See through the clouds with Earth Engine and Sentinel 1 Data
- Teaching machines to read between the lines and a new corpus with entity salience annotations
- The Computer Science Pipeline and Diversity Part 1 How did we get here
- Getting your fridge to order food for you with a RPi camera and a hacked up Instacart API
- Google’s Course Builder 1 9 improves instructor experience and takes Skill Maps to the next level
- Sudoku Linear Optimization and the Ten Cent Diet
computer
- Take a better selfie with Lily
- Free Lecture The Psychology of Computer Insecurity
- MOOC Research and Innovation
- Calculating Ada The Countess of Computing
- When can Quantum Annealing win
- Creating a templated Binary Search Tree Class in C
- Projecting without a projector sharing your smartphone content onto an arbitrary display
- Will a robot take your job
- Facebook Introduces ‘Hack ’ the programming language of the future
- High Resolution Scary Haunted House Wallpapers for Desktop
- TYBSC IT Sem V Question Papers 2009 Mumbai University
- Home automation update
- Very easy to download youtube videos audio mp3 format
- HD Dark Desktop Background Wallpapers Download
- Launching the Quantum Artificial Intelligence Lab
- Syrias children learn to code with the Raspberry Pi
- Running omxplayer from the command line easily using alias
- Largest collection of Google Logos on the web Set 7
- Collection of SQL queries with Answer and Output Set 2
- Prevent access to specific partition or drive
- Summer Games Learn to Program
- PiAUISuite Update and Voicecommand v3 1
- Sign in to edx org with Google and Facebook and
- Large Scale Machine Learning for Drug Discovery
- Hacker Tricks from Insiders A Threat to ERP Systems
0 comments:
Post a Comment