Need Rift integration advice (Unity+external application)
Hi. We're building an AR application where we use Unity3d as a "dumb renderer". That means that we have one (external) Windows 7 C++ application which accesses various sensors and writes them to shared memory. This application, let's call it "server", also has a GUI used for user interaction (the one who uses it is an "operator", it's not the same person that wears the HMD). This server application allows to record and replay sensor values, and can do various other things. On the other side, we wrote a Unity DLL plugin whose exported functions are called by our Unity C# script. That plugin/script does nothing else than reading those sensor values from the shared memory, assigning these values to Transform components in our Unity scene(s). This way, we've already integrated another HMD (that is, its headtracker), which is also HDMI-connected display.
Now we'd like to integrate the Oculus Rift. First of all, I was a bit disappointed to see that you don't provide sources for the UnityPlugin.dll. It remains unclear to me how much additional logic is inside that DLL. Obviously, many of the exported functions in the DLL are simply routing the calls/information to the available SDK functions.
Anyways, here's my question: is it possible to integrate the Rift the following way:
One reason I could imagine why this might not work is initialization of the Rift device. I know that my server application needs to initialize it in order to read the tracker orientation. Except getting some of the Rift's parameters (e.g. aspect ratio), which I could provide via the shared memory channel, I'm not sure whether there are any continously called render-related functions of the Rift that would require it to be initialized from within Unity. The Rift can obviously not be initialized from both Unity and my own application.
Best regards!
Marius
Now we'd like to integrate the Oculus Rift. First of all, I was a bit disappointed to see that you don't provide sources for the UnityPlugin.dll. It remains unclear to me how much additional logic is inside that DLL. Obviously, many of the exported functions in the DLL are simply routing the calls/information to the available SDK functions.
Anyways, here's my question: is it possible to integrate the Rift the following way:
- My server application reads the tracker orientation values (and writes them to shared memory)
- I modify the Unity scripts provided by your unity-integration-package to use the values read by my own unity plugin (which reads them from shared memory)
One reason I could imagine why this might not work is initialization of the Rift device. I know that my server application needs to initialize it in order to read the tracker orientation. Except getting some of the Rift's parameters (e.g. aspect ratio), which I could provide via the shared memory channel, I'm not sure whether there are any continously called render-related functions of the Rift that would require it to be initialized from within Unity. The Rift can obviously not be initialized from both Unity and my own application.
Best regards!
Marius
