Forum Discussion
galapaegos
10 years agoHonored Guest
Is it possible to still show the warped image on the desktop?
Hi!
I'm integrating a tracking system (Optix) and plan to use a 'laptop in a backpack' setup to allow tracking throughout a large space (20' by 22'). I currently have the tracking software working correctly with the Oculus and Unity, took a bit to figure out removing the position tracker and converting the Optix output to local space for the camera!
The other detail with my setup is that the plan is to use video encoding/decoding from a powerful machine to the laptop/backpack setup. I would prefer to just ship a warped image directly, and not have the laptop do the work. To hopefully keep this on topic for the warping issue, my tests have done screen-scraping for a DK2 at around 200hz with around a 5ms delay from server to client, and I believe I can get these numbers much lower.
Currently my screen scraping software uses NvFBC, which targets a desktop. From previous tests using the tuscany demo that provided a warp without an HMD attached (just displayed to the main desktop) the laptop with the HMD works and looks well. So my question is can I do this type of setup with the current Unity packages setup? If this isn't possible, is the Oculus display available to access for scraping? I'd prefer to avoid NvIFR, which targets a specific application.
I am currently using Unity 5.4.0b22, with the latest Oculus runtime 1.3 and the oculus tools 1.3.2.
Thanks you very much for any assistance!
Currently my screen scraping software uses NvFBC, which targets a desktop. From previous tests using the tuscany demo that provided a warp without an HMD attached (just displayed to the main desktop) the laptop with the HMD works and looks well. So my question is can I do this type of setup with the current Unity packages setup? If this isn't possible, is the Oculus display available to access for scraping? I'd prefer to avoid NvIFR, which targets a specific application.
I am currently using Unity 5.4.0b22, with the latest Oculus runtime 1.3 and the oculus tools 1.3.2.
Thanks you very much for any assistance!
- To get the mirror image you would have to write a native plugin and call ovr_CreateMirrorTextureDX(..) and ovr_DestroyMirrorTexture(..) from the render thread at initialization/shutdown using Unity's low-level interface. The ovrSession argument can be passed to the plugin via VR.VRDevice.GetNativePtr(). This is clearly non-trivial and you will need to do some D3D11 texture management in C++ to get it to work. See https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-render/ for guidance.
4 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffTo get the mirror image you would have to write a native plugin and call ovr_CreateMirrorTextureDX(..) and ovr_DestroyMirrorTexture(..) from the render thread at initialization/shutdown using Unity's low-level interface. The ovrSession argument can be passed to the plugin via VR.VRDevice.GetNativePtr(). This is clearly non-trivial and you will need to do some D3D11 texture management in C++ to get it to work. See https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-render/ for guidance.
- galapaegosHonored Guest@vrdaveb, thank you very much! All the links are very useful, my only issues were due to versioning (Unity 5.4.0b24, Oculus runtime 1.5, and SDK 1.5 with unity tools 1.3.2 and everything finally works!).
A quick follow up question, it appears I can't create a mirror texture due to an active mirror texture (attempting to create a second fails). Is this a sync issue (its currently drawing and i need to wait) or a user-issue? Thanks again!
For anyone interested in getting access to the ovrSession object with a native plugin, here is some code to help, thanks to @JeffBail for the tip on initializing OVR, check out his post here: https://forums.oculus.com/developer/discussion/30702/angular-velocity - vrdavebOculus StaffSorry, looks like we set up a dummy mirror texture (not one that could be used) for some reference counting workarounds behind the scenes. Unfortunately, that means it isn't currently possible to set up your own. I'll see how soon we can remove this behavior to make your native plugin work properly.
- galapaegosHonored GuestThank you for the info @vrdaveb!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 7 months ago
- 4 years ago
- 10 months ago
- 10 months ago