Forum Discussion
woodsman
12 years agoHonored Guest
Interesting discussion of Dk2 & Lockheed P3D pro flight sim
There's a damn interesting bit of talk - to me anyway - about integrating DK2 with Lockheed-Martin's P3D pro flight sim.
Excerpt:
http://www.prepar3d.com/forum-5/?mingleforumaction=viewtopic&t=8052.0
Excerpt:
Ok let me say first that the last time I programmed DirectX was like 15 years ago... so please mentally fix my mistakes. I am catching up again and trying to see which capabilities are exposed by the PDK, but I am only half way through reading the sources.
The problem I see is that I need access to the rendering pipeline of the two oculus windows (and actually it should be only one window, the main window.. those two oculus windows should not exist anymore). The idea is that Prepar3d passes the scene to the Oculus Rift, which then does all the work, including rendering, timing, distortion and headtracking prediction.
The current rendering integration with the two separate Prepar3d windows was a nice hack for the old SDK, but for the real integration the main window scene should be sent to the Oculus Rifts rendering code.
Now I *THINK* I do not have any access to the scene that is rendered in the main window, and I also believe I can not set any cameras/viewports or take over the rendering pipeline at all.
The current problem is that the headtracker gets read (twice), and that info is passed to Prepar3d via the PDK (camera is set; twice), and then at some point in time the two Oculus views get rendered... but not at the correct point in time. It is not synchronized at all (but it has to be).
The rendering code above takes care of that, it syncs up the headtracking (with prediction) with the rendering, and there is just one texture that gets drawn once (as opposed to two intermediate textures as it is now that get drawn again; at least I think thats what you do, I could be wrong).
When you get the DK2 you can compare the headtracker integration in Prepar3d I did with the integration of Elite:Dangerous, and you will see what I mean. It is a difference like night and day.
Of course you can expose the needed parts to the plugin system... (and maybe you should for other reasons, for example people that want to render additional 3D objects) but it probably will never be as fast as if you guys really integrate it into the main app, which for the Rift is the most important thing.
There obviously is a different way to integrate the Rift, but it is not the "good" way to integrate, so I do not want to do it.
But anyway, for this as well you need to expose the rendering pipeline, because the second method needs to set the distortion mesh to the renderer.
What you also can see is that the "old" DK1 pixelshaders that are still being used by this plugin do not work very well with the DK2. While it does not look completely out of there, you can easily see that tons of corrections are missing or imprecise. But I cannot fix this, as the DK2 does not use pixelshaders for distortion anymore and without renderer access I cannot apply the correct distortion.
So yeah, thats where we are right now.
I don't think it would be much work for you to integrate the Oculus into the main rendering pipeline (unless your current rendering pipeline is very, very complicated of course). It is just a matter of a few more calls, and the code is already inside this plugin. (Obviously it would be nice to have a keybinding to enable the Rift and a setting in the menu later on, but basicly for now it could be done with a commandline option or simply Oculus found -> Render to Oculus, Oculus not found -> Render to Window)
http://www.prepar3d.com/forum-5/?mingleforumaction=viewtopic&t=8052.0
1 Reply
- CaptBeefyHonored GuestI used his plugin in P3D with the DK2 and saw the issues that he was talking about. The rendering to the Oculus was way off and the head tracking was jittery. I did a take-off, loop around the pattern and then landed with my eyes mostly squinted because it was giving me a headache. The potential is clearly there though.
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
- 10 years ago
- 3 years ago
- 12 years ago