dantman / elite-vr-cockpit

A SteamVR Overlay providing a virtual throttle and joystick and holographic buttons for ship functions, with custom integration into Elite Dangerous
Other
320 stars 36 forks source link

VROverlayError_OverlayLimitExceeded during setup #29

Open cevius opened 6 years ago

cevius commented 6 years ago

Hi Gents,

During a first setup, I was arranging icons around for the controls when the selection window for the options vanished, as well as the chain of icons I had been spawning (about 6-7?). I tried clicking in space to no avail, and then restarted the VR Cockpit app.

Since the restart, I'm unable to get the icon floater (or the button within to trash any icons), as well as a large list of random icons has appeared roughly where the spawner window used to be, with the standalone app showing the log entry "VROverlayError_OverlayLimitExceeded"

Looks to be something in OpenVR?

ECollisionBoundsStyle section: https://godoc.org/github.com/tbogdala/openvr-go

I had opened and closed the floater a few times during my setup. If it gets a new ID each time, it might have a later load order than the other saved buttons, so when loading in sequence or attempting to spawn, its already well behind whatever threshold has been reached? Might be worth treating the lock/unlock button as an emergency bin if you drag an icon into it for long enough, or perhaps if there is a hard limit to icons, make sure the floater panel at least is within a reserved pool?

Any way to manually remove extra entries from the config it saved, so I can try and clean up the excess I spawned?

Thanks for your work on this, what I got to use before I stuffed it all up was great! :D

dantman commented 6 years ago

Yes, OpenVR has a max limit on overlays. Every button is a separate overlay. As well as 2 for each hand, 2 for the throttle, 1 for the joystick, and 2 for the edit panel. The limit is only 64 overlays, and that limit includes any other overlays you're running like OVRDrop and possibly even may include dashboard overlays or the dashboard itself (because I'm pretty sure I managed to hit the limit well before I made even 60 overlays). So you can see how you'd quickly run into the overlay limit exceeded error.

I am contemplating how I can get around the issue. I was thinking of experimenting with something like a rotating pool where when the limit was exceeded it would display as many button overlays as it could and then every second it would disable one of the visible button overlays and show one of the hidden ones. That way you'd be able to see all of them at some point, even if the image is flashing on and off. Which would allow you to delete some of the extras.

For current workarounds. Yes, the save data is a simple json file. You can edit it and delete entries in the list or just delete the whole file to reset. It should be located in your {user}/AppData/LocalLow/Daniel Friesen/Elite VR Cockpit folder.

pettypetty7 commented 6 years ago

I am contemplating how I can get around the issue. I was thinking of experimenting with something like a rotating pool where when the limit was exceeded it would display as many button overlays as it could and then every second it would disable one of the visible button overlays and show one of the hidden ones. That way you'd be able to see all of them at some point, even if the image is flashing on and off. Which would allow you to delete some of the extras.

For current workarounds. Yes, the save data is a simple json file. You can edit it and delete entries in the list or just delete the whole file to reset. It should be located in your {user}/AppData/LocalLow/Daniel Friesen/Elite VR Cockpit folder.

I think a good fix for this would be designing spawnable rows of buttons, things like landing gear, ships lights, and cargo scoop could go together. a 4 button panel for power redirection would work, I've already got my power dist buttons arranged like the HUD icons anyway.

cevius commented 6 years ago

Well, a limit of 60 makes sense then. I'm wasn't running OVR, but I would have been eventually.

Thanks for that, I'll go clean up the JSON and try and be a little bit more efficient

As Petty7 suggested, pads of known systems might help get around that limit. System pip allocations, Target/waypoint management, cargo/hardpoint/lights, or even a set of variations for people to pick and choose from, unless each interaction collision is also counted as an overlay...

Love what you've done so far, thanks for your help 👍

dantman commented 6 years ago

Yup. I do think more advanced UIs to combine multiple buttons into one overlay would be good. Now that I know how to get Unity UI based things into overlays (the Tooltips then Edit Panel were the first experiments). For those rather than just a straight set of buttons I might even actually go with a fancier UI, something that combines them into a unified UI. I'm not sure about pairs for things like cargo/hardpoint/lights. Also while I tossed buttons for target management in since the controls exist I didn't actually plan for real usage of them. I have target ahead, cycling through targets, and cycling through hostile targets all set on my joystick's hat switches.

Also, now that I know how to use unity UI to draw multiple lines together (instead of having to use a separate overlay for each line) I'd like to fix the throttle so it only uses 1 overlay instead of 2. While I'm at it, I could even throw in a 0 line, 10% intervals, and a 75% marker.

Actually I wonder if I should experiment with a HMD locked stereo camera to see if I can give some depth to any of the UI elements.

dhleong commented 6 years ago

👍 for pre-built input groups, but when I was playing around with it the other day before reading your "Getting Started" I thought the little bottom panel of the Edit Mode could be torn off and the buttons moved as a group. Perhaps that's an option for custom button groups to use a single overlay?

dantman commented 5 years ago

No, the edit panel just spawns buttons in the first empty cell a row of spawn points.

dhleong commented 5 years ago

Yeah, I figured that out. I was suggesting that as a potential way to reduce the number of overlays while supporting custom button arrangements.

ani-rudh commented 4 years ago

Hi ! I am facing a similar challenge with an Overlay App I am working on and it is to be able to have Unlimited number of Overlays displayed in a VR scene. At the moment, I cannot find any official documentation that describes these limitiations. Any pointer as to where I can read about the Overlay Limit Exceeded error?

Yes, OpenVR has a max limit on overlays. Every button is a separate overlay. As well as 2 for each hand, 2 for the throttle, 1 for the joystick, and 2 for the edit panel. The limit is only 64 overlays, and that limit includes any other overlays you're running like OVRDrop and possibly even may include dashboard overlays or the dashboard itself (because I'm pretty sure I managed to hit the limit well before I made even 60 overlays). So you can see how you'd quickly run into the overlay limit exceeded error.

I am getting the Limit exceeded error at 32 overlays, so I'm a bit confused about how 64 are possible.

I am contemplating how I can get around the issue. I was thinking of experimenting with something like a rotating pool where when the limit was exceeded it would display as many button overlays as it could and then every second it would disable one of the visible button overlays and show one of the hidden ones. That way you'd be able to see all of them at some point, even if the image is flashing on and off. Which would allow you to delete some of the extras.

I tried to hide all the overlays that are out of my specified Fov using the Overlay.Hide(PtrToOverlayHandle) method. But, this doesn't allow creation of a new overlay, is it correct? Or is there a way to free up an overlay handle without replacing it and calling it back again?

For current workarounds. Yes, the save data is a simple json file. You can edit it and delete entries in the list or just delete the whole file to reset. It should be located in your {user}/AppData/LocalLow/Daniel Friesen/Elite VR Cockpit folder.

Any help/ infromation/ pointers are greatly appreciated :)

Thank you very much in advance! Ani

jdawgzim commented 4 years ago

Increased the maximum number of overlays to 128

I just saw this on a SteamVR BETA post: https://www.reddit.com/r/SteamVR/comments/dvl771/steamvr_beta_update_for_111219_111319_utc_191/

dantman commented 4 years ago

Yup, I requested it (ValveSoftware/openvr#1238) and so they raised the limit.

Something related worth noting. I discovered that Valve alone take up 25 overlays for stuff built into OpenVR, SteamVR, and Steam, meaning there were only ever 39 free slots even when not running any other overlay application. So that explains why you can easily reach the limit with a reasonable number of buttons, especially if you run any other overlay application (TurnSignal takes up 2, Revive takes up 2, OpenVR Advanced settings takes 4, and OVRDrop takes another 5).

jdawgzim commented 4 years ago

(TurnSignal takes up 2, Revive takes up 2, OpenVR Advanced settings takes 4, and OVRDrop takes another 5).

And fpsVR adds some I'm sure. fpsVR can replace TurnSignal though so it evens out I guess.

dantman commented 4 years ago

And fpsVR adds some I'm sure. fpsVR can replace TurnSignal though so it evens out I guess.

😁That depends on how many overlays it uses. 2 appears to be the bare minimum, so I wouldn't be surprised if it used 3.

You can figure out how many it's using by going to the SteamVR status window and in the menu going to Developer > Overlay Viewer.