VR (3D) Menus

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

VR (3D) Menus

Post by LunaRebirth »

Does anyone have some experience creating 3D menus that are suitable for VR? I was able to get Irrlicht running pretty smoothly on my Oculus, but I had previously written a UI built for PC (2D GUI) so it's quite difficult to use on VR and only works with a mouse.

I'm just wondering how I should go about creating 3D menus, if anyone has some guidance. I assume I'll need to create a 3D model in the shape of a menu, and then texture the object to look like a 3D model. But then it gets complicated when you think about how menus have buttons and I should display when a button is being hovered over and maybe a click animation.

Just looking for some tips, I know there's a lot to consider.
CuteAlien
Admin
Posts: 9648
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: VR (3D) Menus

Post by CuteAlien »

Using 2D menu on VR is somewhat possible, but not really nice. People there really like their curved menues. And depending on app you might even want the menu to rotate with the head.

So yeah - tricky. I tried using native Oculus API, but it's very, very rudimentary. You can't even use 2 fonts at the same time. And super complicated to use. Like not getting aliasing effects when the menu rotates is hard. But if you can get away with a single font (it can be scaled I think) and simple buttons it's an option. It comes with nearly no UI elements, just some example how to write your own. But it can do mouse-over (or pointer-over) handling and has some support for reacting to it.

For using Irrlicht 2D UI you can try to send out mouse-events for the pointer. You'd have to calculate a the collision of the pointer-ray with some fixed plane. Then you can use it like a mouse maybe (not tested).

For real 3D - you have to write your own UI system. Or maybe you can project a 2D UI to some planes which are a bit curved and translate input-ray by colliding against those? But you probably get some aliasing effect that way. Would have the advantage you can test it on PC (which tends to be simpler for development than working with Android). Basically you would have to render UI to a texture (set a rendertarget before drawing UI) and then use that texture on polygons which project to some cylinder. And then rotated that cylinder with the head.

Likely using exact same UI as on PC is not a good idea. It's just too different - better to write a new one for VR. For example you also need your custom keyboard for input.

Sorry, I'm not much help yet. Always have it on my todo to finally use my Oculus some more. But last time I really just coded it with native SDK and avoided Irrlicht :-( Which was a painful experience and no fun, so I haven't touched it since then.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9648
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: VR (3D) Menus

Post by CuteAlien »

Guess no longer worth bother for Oculus Go: https://www.oculus.com/blog/an-update-o ... -platform-
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply