Credits: Johnny Lee patched by peter power
a copycat patch of Johnny Lee's Headtracking VR Demo.
Move your mouse to simulate your headtracking. This patch could be easily extended with some kinect headtracking or the new facetracker.
i tried to help a student today and patched this to get an understanding of it. PerspectiveLookAtRect does all the work.
I hope this might be of help for someone too.
Thanks... indeed useful.
Johnny Lee docet! :)
@mediadog: that is what I was talking about... can you please contribute the Kinect bit; need to do a head tracking for univ. VR/architectural research, desperado!
@metrowave: If you are using the skeleton tracking facility, then this is pretty easy. I use the Kinect/Xtion up in a corner of the screen though, so I process the point cloud to do the tracking. I did a very clunky but simple head tracker using my own seriously hacked version of the original dynamic Kinect plugin.
In the plugin I subsampled the point cloud data (by about 8 as I recall), and then looked for the highest group of points a certain distance away from the screen (so hands held up touching the screen wouldn't be followed). I also did a test tracking those points near the screen, assumed they were a hand, created a vector from that and the head, and then used Button(3D Mesh) to know what object(s) in the 3D VR space appeared to be behind their hand.
Not code I'm proud of, it has numerous problems and was just a proof of concept to see what VR with rear-projection 3D was like and how a full VR interaction space would work (not like Minority Report, I can assure you!), so I haven't posted it. But I am back to experimenting on something related, so I should be cleaning it up soon and making it more robust. I'm happy to answer any questions though with whatever limited knowledge I've gained so far.
Here's a quick version of u7angel's patch with Kinect head tracking. Just define your monitor/screen size, and set the offset from the center of the screen to where the Kinect is, and this should work. In the patch it is set for a screen 1 meter wide, with the Kinect sitting right underneath it.
YAAARGH! I can only attach a picture. Guess I'll have to make a new submission....
Thanks a lot mediadog: I'm very grateful that you contributed this. Also to u7angel: for starting the patch. I really needed a head tracking for a research project but didn't have a good idea how to approach it. This helped me a lot. best wishes to both...
@mediadog i'm trying to create a headtrack using kinect but the object always drifting or not stay in position, would you share how you do the headtrack with kinect?
anonymous user login