Getting rid of health and safety warning

A forum to discuss development for the Oculus Rift.

Getting rid of health and safety warning

Postby Elecman » July 26th, 2014, 1:02 am

What is the proper way to get rid of the health and safety warning in Unity?
In OVRDevice.cs, I tired commenting out this:
Code: Select all
if (HMD != null && Input.anyKeyDown && HMD.GetHSWDisplayState().Displayed)
   HMD.DismissHSWDisplay();

and adding this to the end of Awake():
Code: Select all
HMD.DismissHSWDisplay();


But that only works in the Editor but in the standalone version the head tracking stops working and the warning is not removed.
Elecman
 
Posts: 101
Joined: March 29th, 2013, 8:06 pm

Re: Getting rid of health and safety warning

Postby Ybalrid » July 26th, 2014, 1:34 am

Why would you want to remove the safety warning ? It only appears for a few seconds so it's not anoying.
Finaly got my DK2! \o/
User avatar
Ybalrid
 
Posts: 100
Joined: March 29th, 2013, 7:27 pm
Website: http://ybalrid.info/
Location: France

Re: Getting rid of health and safety warning

Postby Elecman » July 26th, 2014, 1:53 am

Not all of us live in the US where you have to worry about getting sued. And yes, I think it is annoying.
Elecman
 
Posts: 101
Joined: March 29th, 2013, 8:06 pm

Re: Getting rid of health and safety warning

Postby cybereality » July 26th, 2014, 12:08 pm

Please don't attempt to disable the warning. It's there for a reason.
Oculus - Community Manager
User avatar
cybereality
Team Oculus Team Oculus
 
Posts: 10798
Joined: February 14th, 2013, 1:54 pm
Location: Cyberspace

Re: Getting rid of health and safety warning

Postby drash » July 26th, 2014, 12:34 pm

cybereality wrote:Please don't attempt to disable the warning. It's there for a reason.

I think it's fine to have it there, as now I don't need to include it in my apps myself. However, I think it would help everyone if it was more clear on how to dismiss it, and if it did not interfere with programs to the degree that it does.

It specifically says to press any key to continue, but that's not always the case. What is the exact condition for dismissing it? In Unity Tuscany, I can dismiss it by starting to walk forward, but I can't dismiss it by hitting space (which brings up the OVRMainMenu). In programs like Elecman's, I can't figure out how to dismiss it except to wait for what seems like a long time, and during that time when I can't see too well, my plane is on a trajectory to crash on the runway.

I think that in the end, the safety warning should show up by itself before the program starts, rather than be overlaid on whatever program is running, and it should be clear in how to dismiss it & proceed (and be able to actually continue with any keypress). Small touches could make this warning more seamless and user-friendly, which would then go a long way toward achieving its intended purpose.
User avatar
drash
 
Posts: 2573
Joined: March 29th, 2013, 2:53 pm
Website: http://www.drashvr.com
Location: Murrieta, CA

Re: Getting rid of health and safety warning

Postby 2EyeGuy » July 26th, 2014, 12:39 pm

tap the side of your rift!
2EyeGuy
 
Posts: 823
Joined: March 29th, 2013, 11:43 am
Location: Adelaide, Australia

Re: Getting rid of health and safety warning

Postby PathogenDavid » July 26th, 2014, 1:31 pm

drash wrote:It specifically says to press any key to continue, but that's not always the case. What is the exact condition for dismissing it?


Right now, the SDK requires you to call ovrHmd_DismissHSWDisplay to dismiss the display. This function will only actually dismiss the display if the required time has elapsed. If the function is called before the required time has elapsed, it will queue a dismissal to occur as soon as the required time has elapsed. The required time is 4 seconds is the user's Oculus profile has never been seen before, otherwise it is 2 seconds. In debug builds, the required time is always 2 seconds in debug builds regardless. (For some reason, this is done in HSWDisplay::TickState in a strange manner rather than just doing it in HSWDisplay::Display)

Anything beyond what is described above must be handled by your application. So it is up to devs to properly implement calling ovrHmd_DismissHSWDisplay on any key press.

drash wrote:I think that in the end, the safety warning should show up by itself before the program starts, rather than be overlaid on whatever program is running, and it should be clear in how to dismiss it & proceed (and be able to actually continue with any keypress). Small touches could make this warning more seamless and user-friendly, which would then go a long way toward achieving its intended purpose.


Yup, it is definitely pretty rough around the edges, but I'm sure they plan to polish it more. For instance, I'd like to see the "Press any key to acknowledge" part only appear after the required time has passed. (Like the Wii's safety warning.)

cybereality wrote:Please don't attempt to disable the warning. It's there for a reason.


I'm not sure about the legal stuff involved here, but is the warning protecting Oculus or the developers? It'd be nice if we could replace it with our own warning without hacking at the SDK. For instance, in my project I would rather show the warning in an all-black room with it rubber-banding to the user's view, and if I'd rather the message automatically change to "Press A to acknowledge" if the player is an Xbox controller. (I know ovrhmd_EnableHSWDisplaySDKRender implies you guys are planning to allow this scenario, but I thought I should make my concerns known in case it might get axed.)

Elecman wrote:What is the proper way to get rid of the health and safety warning in Unity?


As I stated above, you can't dismiss it before the timeout happens. I don't know if it is exposed in the Unity plugin, but there is a function called "ovrhmd_EnableHSWDisplaySDKRender" labeled as experimental. It looks like it is meant for people wanting to render their own warning, but I guess if you never render your own warning then it is effectively an off switch.

However, like cybereality said, the warning is there for a reason. I'd recommend to turn it back on for builds of your project that you distribute to people.
User avatar
PathogenDavid
 
Posts: 86
Joined: March 21st, 2014, 1:14 am
Location: VR Cyberspace

Re: Getting rid of health and safety warning

Postby guygodin » July 26th, 2014, 1:37 pm

It is quite annoying at the moment. If you pause your game loop for a while and then resume it, the notice will re-appear. For example in virtual desktop, you get it when you start the app, then launch a game (you get it in that game too). Exit the game and you get it again in virtual desktop when it resumes.

I know it's important that you get the warning to people but currently it is annoying.
Virtual Desktop Developer
User avatar
guygodin
 
Posts: 480
Joined: March 29th, 2014, 4:06 am
Website: http://www.vrdesktop.net/
Location: San Rafael, CA

Re: Getting rid of health and safety warning

Postby PathogenDavid » July 26th, 2014, 2:12 pm

Hmm, that is strange that you see it re-appearing because I don't see logic that does this. It does look like they intend to add a feature to re-show it if the HMD is disconnected and reconnected, but it is hard-coded to "HMD is always connected" right now with a todo comment.

Are you tearing down and recreating the HMD references? Because that's the only scenario where I see that happening. (You can look at the logic for the initial call to HSWDisplay::Display around line 279 of CAPI_HSWDisplay.cpp)

You might've needed to do this to avoid conflicting with launched apps in the past, but I think the new SDK and the Oculus background service resolve this.

Not completely related, but I found these comments interesting: (Line breaks added for readability.)
Code: Select all
// We need to display if any of the following are true:
//     - The application is just started in Event Mode while the HMD is mounted
//            (warning display would be viewable)
//            and this app was not spawned from a launcher.
//     - The current user has never seen the display yet while the HMD is mounted
//            (warning display would be viewable).
//     - The HMD is newly mounted (or the warning display is otherwise newly viewable).
//     - The warning display hasn't shown in 24 hours (need to verify this as a requirement).
// Event Mode refers to when the app is being run in a public demo event such as a trade show.

Although, only the 2nd and 3rd bullet points are implemented. And the third isn't completely done yet, its current behavior is more like "The warning has not been shown yet during the lifetime of this HSWDisplay object."
User avatar
PathogenDavid
 
Posts: 86
Joined: March 21st, 2014, 1:14 am
Location: VR Cyberspace

Re: Getting rid of health and safety warning

Postby guygodin » July 26th, 2014, 2:39 pm

Yea I am destroying the HMD and re-creating it. The reason I have to do this is to correctly handle desktop configuration changes (change of resolution, refresh rate, etc.). If a user disables one of his monitor for example, the device name stored in the HMD is not longer valid. I shouldn't need to with 0.4.0 in theory but since Direct Mode isn't working, I don't have any other choices.
Virtual Desktop Developer
User avatar
guygodin
 
Posts: 480
Joined: March 29th, 2014, 4:06 am
Website: http://www.vrdesktop.net/
Location: San Rafael, CA

Re: Getting rid of health and safety warning

Postby PathogenDavid » July 26th, 2014, 3:14 pm

Ah, that's definitely why then. Your only choices that I see then are to modify the SDK or employ the use of ovrhmd_EnableHSWDisplaySDKRender to force the SDK to not render the warning.
User avatar
PathogenDavid
 
Posts: 86
Joined: March 21st, 2014, 1:14 am
Location: VR Cyberspace

Re: Getting rid of health and safety warning

Postby Chaoss » July 26th, 2014, 6:34 pm

If I was to create a professional VR experience I'd want to use my own warning screen both in the launcher before launching the experience and inside the experience rather than rely on the one Oculus provides
"In the future we will be designing dreams, worlds & experiences rather than games."
User avatar
Chaoss
 
Posts: 194
Joined: March 29th, 2013, 11:33 am

Re: Getting rid of health and safety warning

Postby 2EyeGuy » July 26th, 2014, 11:59 pm

PathogenDavid wrote:Yup, it is definitely pretty rough around the edges, but I'm sure they plan to polish it more. For instance, I'd like to see the "Press any key to acknowledge" part only appear after the required time has passed. (Like the Wii's safety warning.)

Speaking of which, my application already has a safety warning that is probably going to be covered up by the Rift's safety warning. :)
But I can't test it of course, because the runtime crashes whenever I plug in the HDMI cable.
2EyeGuy
 
Posts: 823
Joined: March 29th, 2013, 11:43 am
Location: Adelaide, Australia

Re: Getting rid of health and safety warning

Postby guygodin » July 27th, 2014, 1:21 am

I found out that the warning will re-appear if you simply switch from "Game Distortion Rendering" to "SDK rendering" without having to tear down the HMD. In my case that means the warning will appear every time someone switches from curved screen back to flat screen.. Ugh!
Virtual Desktop Developer
User avatar
guygodin
 
Posts: 480
Joined: March 29th, 2014, 4:06 am
Website: http://www.vrdesktop.net/
Location: San Rafael, CA

Re: Getting rid of health and safety warning

Postby PathogenDavid » July 27th, 2014, 1:48 am

Man, Guy, you're really getting screwed by this thing.

Are you calling ovrHmd_ConfigureRendering to switch rendering modes? Such as once with ovrRenderAPI_None and again with ovrRenderAPI_D3D11? It looks like doing so would cause the warning to get reset in that situation.
User avatar
PathogenDavid
 
Posts: 86
Joined: March 21st, 2014, 1:14 am
Location: VR Cyberspace

Re: Getting rid of health and safety warning

Postby guygodin » July 27th, 2014, 2:06 am

Yep exactly, calling ovrHmd_ConfigureRendering(hmd, null, 0, null, null); to disable SDK rendering then calling it with the proper D3D11ConfigData struct to enable it as they suggest in their documentation. I know my app isn't the typical game/demo but I hope they add a little bit of flexibility with this :?
Virtual Desktop Developer
User avatar
guygodin
 
Posts: 480
Joined: March 29th, 2014, 4:06 am
Website: http://www.vrdesktop.net/
Location: San Rafael, CA

Re: Getting rid of health and safety warning

Postby nukemarine » July 27th, 2014, 3:54 am

Can they at least have it not stuck to the face? I find it odd that this warning message does not follow the best practices guide of "stuck in space, not on your face".

They should also include a way to disable it in the configuration settings (up to the end user and not the developer). I have no problem clicking the "I understand the health and safety concerns with this unit". Having it appear all the time is as useless as not showing it at all. Plus, it's more aggravating.
User avatar
nukemarine
 
Posts: 474
Joined: March 29th, 2013, 4:57 pm

Re: Getting rid of health and safety warning

Postby basedeltazero » July 27th, 2014, 4:22 am

nukemarine wrote:I find it odd that this warning message does not follow the best practices guide of "stuck in space, not on your face".


Haha this!

I laughed out loud when i first saw the health and safety stuck on your face :)
Wifey looked at me strange,i tried to explain it, but she didnt get it :?

I guess 0.4 went out the door rushed
Image
Ambient Flight Eagle Flight Experience
Dinosaur Voyage Running from Dinosaurs
User avatar
basedeltazero
 
Posts: 107
Joined: December 15th, 2013, 9:22 pm

Re: Getting rid of health and safety warning

Postby PathogenDavid » July 27th, 2014, 11:04 am

Guy:

Ah yes, I suppose that is implied by this:

[quote=Oculus Developer Guide]You can use ovrHmd_ConfigureRendering with a null value for the apiConfig parameter
to shut down SDK rendering or change its rendering parameters.[/quote]

Looking around in the SDK. It looks like the only thing you're really accomplishing by doing that is releasing the resources for the distortion meshes, shaders, etc. Have you tried just leaving it out? You shouldn't even have issues with jumps in frame timing since ovrHmd_BeginFrame/EndFrame uses ovrHmd_BeginFrameTiming/EndFrameTiming internally.
User avatar
PathogenDavid
 
Posts: 86
Joined: March 21st, 2014, 1:14 am
Location: VR Cyberspace

Re: Getting rid of health and safety warning

Postby spyro » July 27th, 2014, 12:36 pm

cybereality wrote:Please don't attempt to disable the warning. It's there for a reason.


I think Elecman has a valid point here.

Outside of the US it's just unnecessary and annoying like the epilepsy warnings in the 90ties before every game. It should be possible to opt-out from it on the developers own response.

Please focus on the technology and keep at least us developers away from all that US legal stuff as long as possible. Please don't force us to watch a pointless screen many thousands of times for absolutely no reason. No offense.

Please.

spyro
Last edited by spyro on July 27th, 2014, 12:48 pm, edited 3 times in total.
User avatar
spyro
 
Posts: 299
Joined: March 29th, 2013, 11:53 am


Return to “Oculus General Development”


Who is online

Users browsing this forum: DarranRem, lamour42, mbutler, Samanthagonist, sludgybeast and 3 guests