OpenXR/OpenVR (virtual reality support)

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!
mr_guy99493
Posts: 1
Joined: Fri Jul 31, 2020 10:58 am

Re: OpenXR/OpenVR (virtual reality support)

Postby mr_guy99493 » Fri Jul 31, 2020 11:02 am

Do you imagine it will be straightforward to add tools for use within the VR view?
Ie, open a sketch and pull a rectangle from some pallette before drawing and constraining as usual?
Or will this just be for viewing models?
kwahoo
Posts: 338
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Postby kwahoo » Fri Jul 31, 2020 4:06 pm

My initial idea is to expose VR events to Python and then create some kind of Python shim between VR navigation/picking/view and standard FreeCAD tools.
Eg. you are pressing a trigger when a controller is near an 3D object, and FreeCAD opens a widget above the controller gizmo. The widget would contain info about the object and editable fields. If object is draggable (eg. a sketch's point) the controller should be able to drag the object.

Edit, this may be useful
phpBB [video]


and this https://github.com/belab/widgetTo3dTexture
User avatar
Kunda1
Posts: 8738
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenXR/OpenVR (virtual reality support)

Postby Kunda1 » Sun Aug 02, 2020 2:01 am

That would be so awesome!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
openfablab
Posts: 62
Joined: Wed Nov 02, 2016 4:42 pm
Contact:

Re: FreeCAD-VR: Oculus Rift

Postby openfablab » Fri Aug 14, 2020 4:43 pm

I think sketching can be done with some device like pen and auto recognition of geometric features and numbers. And also with voice commands.

I imagine transparent rectangle situated where real user table is. When model face is selected for sketching, it is aligned to table.

What we would really miss in VR is feeling of tactile feedback from things we touch.
kwahoo
Posts: 338
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Postby kwahoo » Sun Aug 16, 2020 6:26 pm

openfablab wrote:
Fri Aug 14, 2020 4:43 pm
I think sketching can be done with some device like pen and auto recognition of geometric features and numbers. And also with voice commands.
There is no need for an additional device. Standard motion controllers are precise enough.
phpBB [video]


I'm afraid that auto recognition and voice command would be slow and unreliable. Also a lot of code to write. Tilt brush style menus are convenient and reliable.
openfablab wrote:
Fri Aug 14, 2020 4:43 pm
What we would really miss in VR is feeling of tactile feedback from things we touch.
Not really, a human brain is quite easy to cheat. If you see object collision, you think it really happened, unless you move the hand too far. This works similarly to mirror therapy.
kwahoo
Posts: 338
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Postby kwahoo » Tue Sep 08, 2020 9:41 pm

Small performance update.

The Linkstage3 branch rendering is noticeable faster than the main one. I noticed it could run even 3x faster on my hardware. So, for testing I applied the VR patches on top of the Linkstage3.
An improvement is clearly visible. Running two render targets 2016x2240 pixels and MSAAx8 antialiasing, I got about 7ms frametime for medium detailed engine model, and 37ms for very fine detailed Mars Rover model. The hardware is Radeon 5700XT and Ryzen 1700.
User avatar
HakanSeven12
Posts: 921
Joined: Wed Feb 06, 2019 10:30 pm

Re: OpenXR/OpenVR (virtual reality support)

Postby HakanSeven12 » Thu Sep 10, 2020 10:32 pm

+1 nice job ;)
User avatar
Kunda1
Posts: 8738
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenXR/OpenVR (virtual reality support)

Postby Kunda1 » Fri Sep 11, 2020 11:34 am

That is so cool to hear. Have you told realthunder ?
realthunder wrote: pinged by pinger macro
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
realthunder
Posts: 1809
Joined: Tue Jan 03, 2017 10:55 am

Re: OpenXR/OpenVR (virtual reality support)

Postby realthunder » Sat Sep 12, 2020 12:43 am

That's awesome. You know I started using FreeCAD because I want to build my own AR device. I still believe that dream will come to a full circle one day. I am currently refactoring the rendering part to try to catch up with modern graphics. Maybe soon we'll be able to walk inside a FC project like some kind of game.
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
kwahoo
Posts: 338
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: OpenXR/OpenVR (virtual reality support)

Postby kwahoo » Sat Sep 12, 2020 7:20 am

realthunder wrote:
Sat Sep 12, 2020 12:43 am
Maybe soon we'll be able to walk inside a FC project like some kind of game.
Do you mean mixed reality? Because in VR room scale locomotion does work for a while. That's why my test project is a simple room Fcstd Video

There is not collision detection, but I fell it would be more distracting than useful.