Head tracking Unity3D/other integration
-
- Two Eyed Hopeful
- Posts: 55
- Joined: Sat Sep 01, 2012 9:23 am
Head tracking Unity3D/other integration
I've been working on optical tracking system
(http://www.youtube.com/watch?feature=pl ... BRGOyzjMfA),
I would like to expose the tracking information from this app to anything that might be interested, for example Unity3D.
Absolute position, orientation information...
Does anyone know how to do this?
(http://www.youtube.com/watch?feature=pl ... BRGOyzjMfA),
I would like to expose the tracking information from this app to anything that might be interested, for example Unity3D.
Absolute position, orientation information...
Does anyone know how to do this?
-
- Cross Eyed!
- Posts: 119
- Joined: Tue Oct 09, 2012 2:36 pm
- Location: Ohio
- Contact:
Re: Head tracking Unity3D/other integration
The easiest way is to make a tcp socket and stream the data over that. Other option is to make more of a dll or plugin to put into unity
- brantlew
- Petrif-Eyed
- Posts: 2221
- Joined: Sat Sep 17, 2011 9:23 pm
- Location: Menlo Park, CA
Re: Head tracking Unity3D/other integration
MemeBox wrote:I've been working on optical tracking system
(http://www.youtube.com/watch?feature=pl ... BRGOyzjMfA),
I would like to expose the tracking information from this app to anything that might be interested, for example Unity3D.
Absolute position, orientation information...
Does anyone know how to do this?
I'm working on a low level IPC dll for doing exactly this - transmitting high speed tracker data between two separate processes. Should be done by the end of the week if you want the library.
But this is a custom solution. If you want something more generalized you could also look at VRPN. It's a bit of an overkill solution but it's the only thing close to a standard that I am aware of.
-
- Binocular Vision CONFIRMED!
- Posts: 237
- Joined: Thu Jun 07, 2012 8:40 am
- Location: New York
- Contact:
Re: Head tracking Unity3D/other integration
Or better yet UDP as you probably don't need the overhead of TCP and will throw out old missing packets anyways, no need to retry.RoadKillGrill wrote:The easiest way is to make a tcp socket and stream the data over that. Other option is to make more of a dll or plugin to put into unity
Ibex 3D VR Desktop for the Oculus Rift: http://hwahba.com/ibex - https://bitbucket.org/druidsbane/ibex
-
- Cross Eyed!
- Posts: 119
- Joined: Tue Oct 09, 2012 2:36 pm
- Location: Ohio
- Contact:
Re: Head tracking Unity3D/other integration
I forgot the /ip part, tcp/ip sockets could refer to either a udp or tcp socket, I wasn't too worried about protocol specifics.druidsbane wrote: Or better yet UDP as you probably don't need the overhead of TCP and will throw out old missing packets anyways, no need to retry.
When I used Unity before was using python script to make a loopback to stream orientation data from the sensor into Unity. If i did it again I would like try to get it working in C# as working examples in C# are often requested.
-
- Two Eyed Hopeful
- Posts: 59
- Joined: Wed Aug 08, 2012 8:19 am
Re: Head tracking Unity3D/other integration
If you want others to use your tracking or whatever devices the defacto is VRPN
http://www.cs.unc.edu/Research/vrpn/
It is very very well documented and widely used "baseline" of all VR communication between devices.
http://www.cs.unc.edu/Research/vrpn/
It is very very well documented and widely used "baseline" of all VR communication between devices.
-
- Two Eyed Hopeful
- Posts: 55
- Joined: Sat Sep 01, 2012 9:23 am
Re: Head tracking Unity3D/other integration
VRPN looks like it is the way to go, thanks for the knowledge. Once I have my hands on the Oculus, it won't be long before I have a simple model loaded into my lounge space. I will be able to move around it, look at it from different angles. For me that is cool enough.
But the next/real issue is how do you turn that into a game?
Food for thought...
But the next/real issue is how do you turn that into a game?
Food for thought...
- brantlew
- Petrif-Eyed
- Posts: 2221
- Joined: Sat Sep 17, 2011 9:23 pm
- Location: Menlo Park, CA
Re: Head tracking Unity3D/other integration
I finished my IPC head tracker interface if you want it. It's a custom/Windows-only solution instead of a generic interface like VRPN, but it's really fast and simple to use.
-
- Two Eyed Hopeful
- Posts: 55
- Joined: Sat Sep 01, 2012 9:23 am
Re: Head tracking Unity3D/other integration
@brantlew
I'm not really sure of what I need to do at the moment. I'm a bit confused about how this could fit together, or indeed where I need to pipe the data to.
I remember trying to do IPC with shared memory, the experience was quite unpleasant. I'm a bit hesitant to put you to the trouble of sharing the code when I'm not entirely sure where I will need to be using it.
If I could get back to you later when I'm nearer to requiring it, that would be great, thank you.
I'm not really sure of what I need to do at the moment. I'm a bit confused about how this could fit together, or indeed where I need to pipe the data to.
I remember trying to do IPC with shared memory, the experience was quite unpleasant. I'm a bit hesitant to put you to the trouble of sharing the code when I'm not entirely sure where I will need to be using it.
If I could get back to you later when I'm nearer to requiring it, that would be great, thank you.
-
- Two Eyed Hopeful
- Posts: 59
- Joined: Wed Aug 08, 2012 8:19 am
Re: Head tracking Unity3D/other integration
Just to link also here a nice tutorial for the VRPN by MiddleVR author Sébastien Kuntz:
http://www.vrgeeks.org/vrpn/tutorial---use-vrpn
http://www.vrgeeks.org/vrpn/tutorial---use-vrpn
- brantlew
- Petrif-Eyed
- Posts: 2221
- Joined: Sat Sep 17, 2011 9:23 pm
- Location: Menlo Park, CA
Re: Head tracking Unity3D/other integration
I took a look at the VRPN source code the other day. They have some easy samples and if you are just doing basic integration like connecting to a head tracker then it's pretty easy to use. Just a half dozen lines of code or so on the server and client side. The internal implementation of VRPN uses UDP sockets.Cromfel wrote:Just to link also here a nice tutorial for the VRPN by MiddleVR author Sébastien Kuntz:
http://www.vrgeeks.org/vrpn/tutorial---use-vrpn