Varjo XR-1

Any issues, problems or troubleshooting topics related to the additional features present in the Prepar3D Professional Plus client application.
0x6c6565@gmail.com
Posts: 3
Joined: Thu Apr 16, 2020 3:38 pm

Varjo XR-1

Postby 0x6c6565@gmail.com » Thu Apr 16, 2020 6:06 pm

Are there any good links to getting the XR-1 up and running in v5?

Thanks,

0x6c6565@gmail.com
Posts: 3
Joined: Thu Apr 16, 2020 3:38 pm

Re: Varjo XR-1

Postby 0x6c6565@gmail.com » Mon Jun 01, 2020 7:41 pm

Just posting an update here in case others come in search of the same.

v4.5 (hotfix 3)

Activate Varjo (Virtual Reality > Enable Virtual Reality > Varjo)

v5 (hotfix 1)

- Activate Varjo (Virtual Reality > Enable Virtual Reality > Varjo)

Activate the XR-1 (Virtual Reality > Passthrough Cameras > XR-1)

- Open VR Settings (Virtual Reality > VR Setting)
- Under Varjo Settings select Yes for Enable XR1 Camera
- Activate the XR-1 (Virtual Reality > Passthrough Cameras > XR-1)

(Pro Plus only)

Airwolf
Posts: 124
Joined: Sun Dec 09, 2012 7:48 pm

Re: Varjo XR-1

Postby Airwolf » Tue Jun 02, 2020 3:02 pm

Sweet you have this. Looking forward on hearing your experiences with this headset also need to know about its use with V5

Lildreas
Posts: 14
Joined: Fri Jun 05, 2020 1:29 pm

Re: Varjo XR-1

Postby Lildreas » Mon Jun 22, 2020 7:55 am

Hello,

I have the same problem, the Varjo XR1 works fine as a VR device, but I cannot get the video passthrough to work with P3Dv5 (hotfix 1). Please have a look at the issue and the details:
https://www.prepar3d.com/forum/viewtopi ... 3&t=138528

It's not a problem with the XR-1, GPU, drivers, etc., the XR-1 video passthrough works fine with BlueIG and Unreal Engine.

The first problem is that the VIVE controllers won't show up at all, so I cannot create portals for the video passthrough. So, do the controllers show up in your setup, or did you e.g. create the portals manually by putting in numbers?

Thanks & best regards
Andreas

User avatar
Beau Hollis
Lockheed Martin
Posts: 2167
Joined: Wed Oct 06, 2010 3:25 pm

Re: Varjo XR-1

Postby Beau Hollis » Tue Jun 23, 2020 8:31 pm

First off, please grab HotFix 2 as there are some VR improvements in there.

Have you trying using the cockpit model mask post process? It's a quick way to test out XR-1 camera.
http://www.prepar3d.com/SDKv5/prepar3d/ ... 20Settings

Creating portals with controls is limited to SteamVR currently. You can probably draw portals using XR-1 via SteamVR interface, but you may have difficulty getting into portal editing mode because it requires an active pass-though camera. No SteamVR-based pass-though camera will be detected since the XR-1 camera isn't registered with SteamVR the way that Vive/Index cameras are.

We will look into removing that restriction so that you can draw portals using colored boxes in OpenVR and then switch interfaces to use the camera. For now, we ship an OpenCV based pass-through sample in the SDK which can be used to create a pass-though camera with 3rd party cameras. You may be able to use that sample camera to get into portal editing mode.

Thanks
Beau Hollis
Prepar3D Software Architect

Lildreas
Posts: 14
Joined: Fri Jun 05, 2020 1:29 pm

Re: Varjo XR-1

Postby Lildreas » Wed Jun 24, 2020 1:04 pm

Hello Beau,

thanks for the answer! And I already installed the Hotfix 2, I like the fast iteration, keep the fixes coming!
We will look into removing that restriction so that you can draw portals using colored boxes in OpenVR and then switch interfaces to use the camera.
Thanks, this would be important.
Have you trying using the cockpit model mask post process? It's a quick way to test out XR-1 camera.
http://www.prepar3d.com/SDKv5/prepar3d/ ... 20Settings
Yes, and now with Hotfix 2 this works (with Hotfix 1 it didn't, I tested this). That's good news!

But now I'm a little bit stuck, because with Portals I guess it would have been easier what we plan to do:

We want to use P3Dv5 as IG and drive it externally via CIGI messages. We want to put in our own aircraft (as Entity 0, Ownship) and drive position and rotation of Ownship through Entity Control and request HAT/HOT as feedback.

Our cockpit with all instruments is a real glass cockpit with screens, joysticks etc., this should be visible through the XR-1 video passthrough.

So we need to create a cockpit mask (I already did that for another flightsim, I have the mesh) and import that mesh into P3D and somehow set it up as cockpit mask, maybe assign a material to it etc. - can you point us in the right direction what we need to do? I did not find any documentation outlining this process in any detail. And while we're quite experienced creating and/or using other simulators we so far are complete beginners in regard to P3D (or Microsoft Flightsims).

Thanks & best
Andreas

User avatar
Beau Hollis
Lockheed Martin
Posts: 2167
Joined: Wed Oct 06, 2010 3:25 pm

Re: Varjo XR-1

Postby Beau Hollis » Wed Jun 24, 2020 7:09 pm

Portals save out to an XML file, so if you have a Vive, Vive Pro, or Index, you could use to create them, that might be the quickest way to create your mask using portals. You can name the portal sets and save them, using the VR settings UI. You can enter portal data in manually in the UI, but that's probably only useful if you need to make a minor tweak to an existing portal.

On the modeling side of things, we don't have a material option in our max exporter specifically for the color write mask, but it can be done with the use of a lua script:
!lua

--Values used to set write mask.
local writeRGB = 0x00000007
local writeAll = 0x0000000F

varset("T:WriteMask", "Long", writeAll)

--Set diffuse color to black.
varset("T:DiffuseColorRed", "Number", 0.0)
varset("T:DiffuseColorGreen", "Number", 0.0)
varset("T:DiffuseColorBlue", "Number", 0.0)
varset("T:DiffuseColorAlpha", "Number", 0.0)
The key line in there is varset("T:WriteMask", "Long", writeAll). By default, materials that use alpha, don't write the alpha into the backbuffer.

Also, our portals are drawn using the PDK custom object draw capability, so a c++ addon could be used to draw your own. See custom object draw sample and gaze data sample for some uses of this. The trick with portals is setting the render flags correctly. These are the ones we use for our porals:
RenderFlags flags;
flags.DrawFromBase = false;
flags.DrawWithVC = true;
flags.DepthReadDisable = true;
flags.AlphaWriteEnable = true;
You might want depth read on in some cases if you intend to have foreground objects occlude your portals.
Beau Hollis
Prepar3D Software Architect

User avatar
Beau Hollis
Lockheed Martin
Posts: 2167
Joined: Wed Oct 06, 2010 3:25 pm

Re: Varjo XR-1

Postby Beau Hollis » Wed Jun 24, 2020 7:36 pm

Also if you didn't want your mask visible on screen, you could actually set the write mask to 8 so that only the alpha writes. I believe the XR-1 currently requires pre-multiplied alpha in the output, though, so a black mask is probably your best bet.
Beau Hollis
Prepar3D Software Architect

Lildreas
Posts: 14
Joined: Fri Jun 05, 2020 1:29 pm

Re: Varjo XR-1

Postby Lildreas » Fri Jun 26, 2020 6:47 am

Hello Beau,

thanks for pointers! I will first try to use the VIVE Pro to create the portals and then I'll switch to the XR-1, seems to be the most practical solution to get initial results. And later I will explore to the slightly more complicated avenues.

Best from Germany
Andreas

Lildreas
Posts: 14
Joined: Fri Jun 05, 2020 1:29 pm

Re: Varjo XR-1

Postby Lildreas » Wed Jul 01, 2020 1:38 pm

Hello Beau,

a little progress, but again stuck:
Portals save out to an XML file, so if you have a Vive, Vive Pro, or Index, you could use to create them, that might be the quickest way to create your mask using portals. You can name the portal sets and save them, using the VR settings UI. You can enter portal data in manually in the UI, but that's probably only useful if you need to make a minor tweak to an existing portal.
As we have a VIVE Pro, too, I used this to create a new Portal Set with the Aircraft as origin, and it worked fine and I got the video passthrough from the VIVE Pro cameras in the correct place overlaying the cockpit of the Maule M7 2060C I used for the test.

The Portals configuration was saved into the Portals.xml file, so all was well.

I then switched from the VIVE Pro to the XR-1 again, started P3Dv5 (hotfix 2) and set everything up for the XR-1 VR and AR by selecting the XR-1 as passthrough camera.

The newly created Test Portal set was still available, I only had to again set the PortalSetOriginReference to "Aircraft" (it was somehow reset to "Camera".

But now, the problem:

When I "Enable Virtual Reality" with "Varjo" the menu item "Portal Sets" is missing. With "SteamVR" I get the Portal Sets, with Varjo the item isn't there.

So, I now have the correct portal data, but how can I make the portal appear using the XR-1?

Thanks & best
Andreas

mchriest
Posts: 32
Joined: Tue Feb 21, 2012 4:17 pm

Re: Varjo XR-1

Postby mchriest » Wed Jul 01, 2020 7:46 pm

I am attempting the same task as Andreas, and like him, am unable to recognize/load any defined portal using the XR-1. This is an important requirement in my work. Please let us know how this can be accomplished.

Thanks,
Mike

User avatar
Joseph Walker
Lockheed Martin
Posts: 5
Joined: Mon Jul 15, 2019 3:24 pm

Re: Varjo XR-1

Postby Joseph Walker » Tue Jul 07, 2020 2:52 pm

Hello,

Thank you for bringing the issue of loading defined portals using the XR-1. This item is currently being worked. We will also take into consideration creating a tutorial for the XR-1 setup.

Thanks
Joseph Walker
Prepar3D® Software Engineer

mchriest
Posts: 32
Joined: Tue Feb 21, 2012 4:17 pm

Re: Varjo XR-1

Postby mchriest » Tue Jul 07, 2020 3:00 pm

Hi Joseph,
Thank you for the reply. Could you please expand a bit on your answer? I'm not sure what you mean by, "This item is currently being worked".

Are you saying that the issue is inherent in the software, and a solution will be forthcoming in another release, or are you saying that the task is do-able, and you are working up a detailed response?

Thank you,
Mike.

User avatar
Joseph Walker
Lockheed Martin
Posts: 5
Joined: Mon Jul 15, 2019 3:24 pm

Re: Varjo XR-1

Postby Joseph Walker » Tue Jul 07, 2020 3:07 pm

Hello Mike,

Apologies for the obscure response. The issue is inherent to the software, so a solution will be provided in a new release.

If we come across a solution that can be used in the current release, a more detailed response will be posted.

Thank you
Joseph Walker
Prepar3D® Software Engineer

mchriest
Posts: 32
Joined: Tue Feb 21, 2012 4:17 pm

Re: Varjo XR-1

Postby mchriest » Tue Jul 07, 2020 3:26 pm

Joseph,
I Appreciate the information.
As I see it, since my project is somewhat time constrained, my options at this point would be to either obtain a Vive Pro headset for my mixed-reality work, or switch to BI Sim for the time being.

At the moment, my preference would be to use the Vive Pro with P3D. But before purchasing more hardware, I would like to know if there are any known issues with P3D (running as a Cigi IG) utilizing mixed reality with the Vive.

Thanks,
Mike.


Return to “Prepar3D Professional Plus Client Application Questions”

Who is online

Users browsing this forum: No registered users and 15 guests