OpenXR/OpenVR (virtual reality support), new Python workbench WiP

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Post by kwahoo »

chrimu wrote: Tue Aug 03, 2021 9:41 pm Dear All,
I came to have the video-part running, but I don't get the controllers to move at all (Lenovo WMR) in Freecad. The controller (one only) lays on the ground and doesn't move along with my physical controllers.
Hi,

It seems I've never implemented interaction profiles for WMR controllers (only for Index, Vive, and Rift)...

So, I added the profile (/interaction_profiles/microsoft/motion_controller) now (commit).

Are you able to compile and test the changes yourself? If not, I'm going to provide binary package, but It may take some time.
chrimu
Posts: 10
Joined: Tue Aug 03, 2021 6:27 pm
Location: Beersel (Belgium)

Re: OpenXR/OpenVR (virtual reality support)

Post by chrimu »

Dear Kwahoo,

Thanks for your reply!
I was ready to uninstall/reinstall everything, and now you seem to have an answer. Just great!

I would indeed be very grateful if you could compile it, cause I've to admit I have no whatsoever experience with that.

Best personal regards,

Christian
PS: Any way to send you a coffee?
chrimu
Posts: 10
Joined: Tue Aug 03, 2021 6:27 pm
Location: Beersel (Belgium)

Re: OpenXR/OpenVR (virtual reality support)

Post by chrimu »

Dear Kwahoo,

Just as a supplementary piece of information (if at all it helps), apart from using the SteamVR OpenXR runtime which thus gave except for the controllers a good result, I tried the MS-WMR OpenXR runtime briefly with no success. Seemingly from Freecad came a "XR_KHR_opengl_enable" error, and MS-WMR also doesn't say in their OpenXR-applet they support this extension (at least on my rig). I suppose MS goes down the Direct3D route rather than OpenGL, but it would have been interesting not to have a further software in the middle.

If you need me to test anything, I'm of course available.

Kind regards,

Christian
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Post by kwahoo »

chrimu wrote: Fri Aug 06, 2021 12:02 pm Just as a supplementary piece of information (if at all it helps), apart from using the SteamVR OpenXR runtime which thus gave except for the controllers a good result, I tried the MS-WMR OpenXR runtime briefly with no success. Seemingly from Freecad came a "XR_KHR_opengl_enable" error, and MS-WMR also doesn't say in their OpenXR-applet they support this extension (at least on my rig).
That's why I never implemented WMR controllers, because I thought that FreeCAD cannot work with WMR at all...

Please test this build with SteamVR https://github.com/kwahoo2/FreeCAD/rele ... MR-Test.7z Testing done, the build removed.
Last edited by kwahoo on Sun Aug 22, 2021 8:32 am, edited 1 time in total.
chrimu
Posts: 10
Joined: Tue Aug 03, 2021 6:27 pm
Location: Beersel (Belgium)

Re: OpenXR/OpenVR (virtual reality support)

Post by chrimu »

Many thanks Kwahoo,

It seems basically to work. The things that I observed are the wording "Press triggers to (...) Menu item 1". I didn't get the sense, and it doesn't disappear. The left trigger leaves boxes on the screen, and caused the VR to crash several times.
I didn't quite get how the motion control on the 2 joysticks is meant to work, and how to set the rotation centre. The motion control on the touchpads instead of the Joysticks is -at least for me- unfortunately far too fast and unprecise (speed and accidental touches).
For architectural purposes, which I'm mostly interested in, a constant gravity vector navigation would be super-useful.

Is there a way I can fix those myself (settings, parameters)?

Again, a big THANK YOU!
Kind regards,

Christian
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Post by kwahoo »

First and foremost, thank you for testing!
You are the second person (excluding me) testing the XR extension I am aware.
chrimu wrote: Sat Aug 07, 2021 3:30 pm The things that I observed are the wording "Press triggers to (...) Menu item 1". I didn't get the sense, and it doesn't disappear. The left trigger leaves boxes on the screen, and caused the VR to crash several times.
Yes, this does not make much sense, because I just compiled code I've used for various experiments with Coin3D.
After we confirmed that WMR can work, I can clean the interface, making the FreeCAD-XR just a viewer. And then make a standard release (this one was just for testing).
chrimu wrote: Sat Aug 07, 2021 3:30 pm I didn't quite get how the motion control on the 2 joysticks is meant to work, and how to set the rotation centre. The motion control on the touchpads instead of the Joysticks is -at least for me- unfortunately far too fast and unprecise (speed and accidental touches).
For architectural purposes, which I'm mostly interested in, a constant gravity vector navigation would be super-useful.

Is there a way I can fix those myself (settings, parameters)?
Speed is hardcoded, but I can add a config file and some very simple interface to tuning it.

Rotation centre is in the centre of controller performing rotation.

Constant gravity? Does it mean rotation is always around Z axis and translation on the XY plane? What about Z translation (eg. when you are moving to the second floor)? I can add this as an option, I think.
chrimu
Posts: 10
Joined: Tue Aug 03, 2021 6:27 pm
Location: Beersel (Belgium)

Re: OpenXR/OpenVR (virtual reality support)

Post by chrimu »

Sounds great! I would actually have thought people were rushing onto the VR functionality...
With my comments, I don't of course want to upset those who do mechanical models and want to turn those around. For what I have in mind in the construction context, it would be good to indeed be able to change the speed/steps, and to control it from the joysticks of the controller https://cdn.dribbble.com/users/3901927/ ... ze=800x600, not the round touchpads. That would be better thumb-control on the model, no inadvert touch-errors, and full-stop as you let-go the stick.

It would be good to have a fixed Z axis, but be able to travel along that as you describe (floors, birds' eye).
What -if at all possible- I experienced as a good set-up is to have translate fwd/back and turn L/R on the right joystick, translate L/R and up/down on the left joystick. Trigger right is often used to snap-in on (jump to) a next standpoint on the model in XYZ (eg with red dot as target), and the menu -if any- is often attached to the left handle (for right-handers)

Does this make sense?

Cheers, C.
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Post by kwahoo »

chrimu wrote: Sat Aug 07, 2021 9:47 pm For what I have in mind in the construction context, it would be good to indeed be able to change the speed/steps, and to control it from the joysticks of the controller https://cdn.dribbble.com/users/3901927/ ... ze=800x600, not the round touchpads.
Ok, I can disable touchpads.
chrimu wrote: Sat Aug 07, 2021 9:47 pm
What -if at all possible- I experienced as a good set-up is to have translate fwd/back and turn L/R on the right joystick, translate L/R and up/down on the left joystick.
Yes, I can add this as the second navigation style.
chrimu wrote: Sat Aug 07, 2021 9:47 pm
Trigger right is often used to snap-in on (jump to) a next standpoint on the model in XYZ (eg with red dot as target),
That's really great idea, especially for people experiencing motion sickness. And a cheap workaround for adjusting Z position when moving on eg. stairs - otherwise I would have to implement collision detection, what is way beyond scope of this project.
chrimu
Posts: 10
Joined: Tue Aug 03, 2021 6:27 pm
Location: Beersel (Belgium)

Re: OpenXR/OpenVR (virtual reality support)

Post by chrimu »

Sounds good!!!

Looking forward, C.
User avatar
kwahoo
Posts: 680
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Post by kwahoo »

TODO list:
moved to the first post.
Last edited by kwahoo on Sat Aug 28, 2021 7:38 am, edited 6 times in total.
Post Reply