Moving portal using MR with XR-3

Any issues, problems or troubleshooting topics related to the additional features present in the Prepar3D Professional Plus client application.
Post Reply
Jeff_27
Posts: 5
Joined: Mon Dec 27, 2021 8:34 pm

Moving portal using MR with XR-3

Post by Jeff_27 »

Hi,

Here is my Problem: when I am using only the XR-3 as virtual HMD, the position in the VC (virtual cockpit) is fixed, even when I move my head. But when I use the portal, which is a rectangular shape to display a real instruments panel of Cessna 172, the camera display more than what is Limited by the portal when I turn my head (ie: it displays what the pass through cameras are seeing outside of the cockpit instrument panel), and the conséquence is that it is impossible to superpose both the VC and the real one, since both are never matching.
I use 2 HTC base station 2.0, 1 Vive Tracker. My conclusion is that the portal is moving with the movement of the head when using MR in P3D, and I cant explain why! I tried all the settings in the VR Setting menu, especially with the HMDOrigin as P3D tracker Origin, and also the UseTrackerascameraOrigin...nothing is happening.
I have set the Aircraft as the Origin of the portal, and set is correctly to match the position of the instrument panel. So I need to find the way to fix the VC in space using MR, then it Will not move with the movement of the head , and then match the fixed position of my instruments panel.
Thanks in Advance for your help
Regards
Jeff
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Moving portal using MR with XR-3

Post by Beau Hollis »

When you view just the portal geometry in VR, is that moving as well?
How closely aligned is the portal geometry placement with the VC panel?

If you portal placement for example is in front of or behind the panel, it may look correct from one orientation but appear to swim as you move the camera because of the parallax effect. One really good way to test this is to use cinematographer mode with an xbox controller. I believe the default toggle for this is Shift+F5. If your portal origin is cockpit, you can then slew the camera around the cockpit to view it from different angles and the portal should stay anchored to the cockpit. You can still use the motion controllers to grab and move the portal in this mode which allows you to move the camera in close and off to the side a bit to get a better idea of how the geometry lines up. When in visualization/edit mode there should also be two draw for each portal shape. One ignores depth and burns through the cockpit geometry but has a low opacity. The other will depth fail against the scene. The end results should be a fainter more transparent looking shape when it pernitrates the cockpit surface.

If you have the model source 3ds files, you can also create a separate mask model with the same origin as the cockpit and use that model as a portal.
Beau Hollis
Prepar3D Software Architect
Jeff_27
Posts: 5
Joined: Mon Dec 27, 2021 8:34 pm

Re: Moving portal using MR with XR-3

Post by Jeff_27 »

Hi,

First of all, thanks for your reply.
So when I View just the portal geometry in VR, it is not moving at all.
as for the portal geometry, I just took a rectangulaire shape the size of the VC panel to be able to display my real instruments panel in place of the virtual one. It is placed at the exact position in the cockpit.
I do understand the parallaxe effect, but there is not reason why the virtual cockpit should move above the real one when both are in a fixed position! The real one is fixed in space, and normally the VC is also fixed in space, so nothing should move at all when they are both positionned correctly.
The fact that i can see with the pass through cameras outside the range of the portal when i turn my head is just because the portal is moving, otherwise I wouldn't be able to see like that. When you have a door frame, and you position yourself in front of it, when you turn your head, you dont see what is behind the frame. But hère is what is happening! so I need to get a fixed portal in MR, indépendant of the head movement.
I succeeded to get that result at the beginning only, but with all the modifications and trials when mixing the 2 panels, it became a désaster.
For information, I dont use any controllers, I use the coordinates to fix the portal, and some shortcut on my flight controls to move the VC in space.
Maybe there are some paramètres which have been changed in P3D....
Jeff_27
Posts: 5
Joined: Mon Dec 27, 2021 8:34 pm

Re: Moving portal using MR with XR-3

Post by Jeff_27 »

Hi,

btw i reversed to the camera View where you have the full Aircraft as a mask, and it is exactly the same pb, that is to say the pass through cameras are seeing outside of the cockpit limitation, clearly it means that the Aircraft is moving with the head. So do you have a file, modified by P3D, where such functions are defined and which I can modify to stop this link between head and mask please?
Again it was working when I rebooted completely the computer and réinstalled windows and P3D, which means that P3D modified some parameters by itself.
Thanks
User avatar
Beau Hollis
Lockheed Martin
Posts: 2452
Joined: Wed Oct 06, 2010 3:25 pm

Re: Moving portal using MR with XR-3

Post by Beau Hollis »

When using the post process to turn the entire aircraft as a mask, there is no separate portal geometry used. In that case, the VC geometry renders into the scene and stencil, and our post process grabs the stencil value and writes into the alpha. I'm a bit confused by this since you described the VC as remaining fixed while the portals appear to move. It's always tricky describing these transformations and coordinate systems since the VC appearing stationary could be in reference to the virtual world or the physical one. (Ideally both is what you're going for I understand.)

One trick that can help aligning real and virtual is to map the recalibrate origin control to a key or button. Now instead of pressing it just once, you can actually press and hold it which will continue to fire off the recalibrate event until you release the button. What this does is keeps the camera and cockpit fixed in the virtual world because the camera is constantly being set back to its original poistion and orientation with each calibration. As you move your head, only the real world will appear to move. You can use your head as a proxy to essentially move the real cockpit into alignment with the virtual one and then release the button.
Beau Hollis
Prepar3D Software Architect
Jeff_27
Posts: 5
Joined: Mon Dec 27, 2021 8:34 pm

Re: Moving portal using MR with XR-3

Post by Jeff_27 »

Sorry I have been Busy those last weeks with my job as Airline pilot and also working with the Varjo lab tools since none of your solutions worked. I would like to recale that I use the XR-3 and apparently nothing is working fine in P3D using the XR-3 excepted the Virtual reality.
The mask using the Varjo lab tools is just amazing, nothing is moving around and I could move forward, finally. I do not understand why making is working with the Varjo tools and NOT P3D!!!!
As for the chromakey, it is also an other pb with P3D. When I Activate the chromakey in the VR Setting, absolutely NOTHING is happening! I sent an email to the support team of Varjo and They explained to me that Chromakey was ONLY working with the integrated functions of P3D and not with the Varjo Base. I tried it yesterday again and again and the only way the chromakey worked was using the Varjo Base, deactivating the XR-1 and chromakey in P3D, completely the opposite of what should work.
So could you explain to me why it is working this way, and also give me an example of your VR Setting to make it work with P3D please?
Thanks in advance
Post Reply