cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

Initial findings on the S5 Dev Kit

mohydine
Level 3
Hello everybody,

I received the S5 dev kit yesterday, so I left work earlier than usual to try it out because I was over excited, and now I would like to share with you my initial findings.
Note: I rarely write such long post, so this really means a lot of love for your product !

Environment: Unity 4.5 (published version, not the upcoming fix release)
MAC OSX (Lion I think)
S5 dev kit


Mechanical design:
Great look, but I am afraid the way the phone is slided into the headset may break in the future.
It seems fragile to me.

VR performances: Nothing surprising there, I will get more into this until I fix the basic issues, but so far, it looks very good.
The S5 seems to be a powerful device, and the only time the rendering rate is badly hit is when large transparent particles are emitted (large explosions when the player dies).
I think (eg: hope) this is due to the way the transparent queue works so that should be easily fixed (sort of).
The other reasons the frame rate goes down are also very normal to mobile devices and there is nothing unusual there in my opinion.
Oh, and I did not use the set2cores.bat file. Is it still required?
Also, I cannot ask Unity to force OpenGL ES 3.0 in the player settings. If I do that the rendering does not work. Is it normal?

VR Demos: Is it me of there is no chromatic aberration inversion anywhere? Did I miss something? Should we expect some perf impact if turned on?
Again, I will work later on the performances down the road.
I also realized that the screendoor effect will inevitably vary for each player. When adjusting the screen distance, you can get to a point where overlapping pixel from each eyes can disminish the effect. Unfortunately, you are better to adjust the distance according to your eyes rather than trying to prevent the screen door effect. I wonder if you guys are working of some magical solution to that?

Crashes: no crash so far except when debugging with
[In UNITY Build settings]-Autoconnect to profiler on
[In UNITY Build settings]-script debugging on.
If those are off, no crash for me.


Orientation data: This is why I scratched my head a lot yesterday.
The game I am porting to the S5 kit is based on the version 2.5 (not 3.2) of the Oculus SDK.
I was expecting to get more or less the same public API as the 2.5 but some key things were changed.
-OVRDevice.GetOrientation seems gone, and on Android, the only way I could get close to that was by making CameraOrientation public (OVRCameraController class).
-I am using the FollowOrientation property on OVRCameraController and it "seems" to me that its behavior has changed.
I am not 100% sure of that but it seems to me the 2.5 implementation was one frame behind and in the mobile implementation it is not the case anymore.
But I cannot be 100% sure without jumping into the inner working of the SDK.
Because those two things are different now, I am need to redo my whole math calculations as orientation is the main interaction scheme for my game. Well this is probably a good thing in the end πŸ˜‰


Day to day Workflow: This is where I have been struggling a lot.
How do you guys debug simple things efficiently without having to build all the time?
I based my work on the ShadowGun Unity project. I opened it and added my files.
1) The best way I could test the Orientation data was to build over wifi on the S5 plugged into the headset and look at logs. This is very time consuming as you can imagine.
2) I tried to plug my DK1 on the same unity project, and did not get the orientation data. So I switched to PC/Standalone, and did not get the data either. Basically, the way the cameras move indicate that it is just white noise it is receiving.
Is there a proper way to connect the S5 devkit to the Unity Editor? Maybe I missed something obvious there. I know I won't be able to debug perf issues without actually building but most of the time I just need the orientation data to be able to debug some high level features.


Anyway, this is all good and you are making history, you know that?

Stephane
9 REPLIES 9

gkennickellvr
Level 2
Hi Stephane,

Thank you for the feedback, it is most appreciated!

Oh, and I did not use the set2cores.bat file. Is it still required?


set2cores.bat is no longer required.

Also, I cannot ask Unity to force OpenGL ES 3.0 in the player settings. If I do that the rendering does not work. Is it normal?


We are able to reproduce the issue. We will try to get a fix in for the next SDK release.

Is it me of there is no chromatic aberration inversion anywhere? Did I miss something? Should we expect some perf impact if turned on?


Chromatic aberration for Android will be added as a TimeWarp option in the near future. It does cost a non-trivial amount of performance, though.

no crash so far except when debugging with
[In UNITY Build settings]-Autoconnect to profiler on
[In UNITY Build settings]-script debugging on.
If those are off, no crash for me.


Does this happen for you with non-VR apps as well? We haven't seen any crashes like this yet with the working set of apps we have. Do the crashes occur with only a single option selected along with Development build: ie, Development Build + Autoconnect Profiler or Development Build + Script Debugging? Or only when both Autoconnect and Script Debugging are enabled?

I was expecting to get more or less the same public API as the 2.5 but some key things were changed.
-OVRDevice.GetOrientation seems gone, and on Android, the only way I could get close to that was by making CameraOrientation public (OVRCameraController class).


The Android Unity Integration is based on the PC/Mac OSX preview, 3.2. OVRDevice.GetOrientation is no longer available and its functionality has been replaced by OVRDevice.GetCameraPositionAndOrientation() -- however, as you noted, this is only available for the PC/Mac OSX platforms. We will note this and try to address for the next SDK release.

I am using the FollowOrientation property on OVRCameraController and it "seems" to me that its behavior has changed.


Are you seeing a behavior change on both PC/Mac OSX and Android? Or are you seeing a discrepancy between the platforms?

How do you guys debug simple things efficiently without having to build all the time?


When debugging requires the sensor data, we typically debug as you mentioned: adb wireless + logcat.

There is some feedback from the following forum post about using the DK1 for Unity preview (just not for standalone EXEs):
https://developer.oculusvr.com/forums/viewtopic.php?f=61&t=9051

mohydine
Level 3
Helllooo!

To answer to your questions:

Do the crashes occur with only a single option selected along with Development build: ie, Development Build + Autoconnect Profiler or Development Build + Script Debugging? Or only when both Autoconnect and Script Debugging are enabled?


I tried again a few minutes ago, and the only time I got a "crash" was when both options enabled, and under heavy load(transparent geometry all over the screen) -> the S5 reboots. Do you want me to send you my build for that?


The Android Unity Integration is based on the PC/Mac OSX preview, 3.2. OVRDevice.GetOrientation is no longer available and its functionality has been replaced by OVRDevice.GetCameraPositionAndOrientation() -- however, as you noted, this is only available for the PC/Mac OSX platforms. We will note this and try to address for the next SDK release.


Great! Do you have an ETA for this?


Are you seeing a behavior change on both PC/Mac OSX and Android? Or are you seeing a discrepancy between the platforms?


Let me get back to you on this, once I have my DK1 working with the current SDK.

Thanks

Stephane

mohydine
Level 3
https://developer.oculus.com/forums/viewtopic.php?f=61&t=9051


Heads up: I downloaded the unitypackages from the SDK distrib as mentioned in the link above and tried again -> no success.
I then tried to download SDK 3.2 and replace the plugins (all except android) -> Success! my DK1 is now working in Unity Editor.

mohydine
Level 3
Are you seeing a behavior change on both PC/Mac OSX and Android? Or are you seeing a discrepancy between the platforms?


So after being able to use my DK1, I have been able to compare the behavior and I see a discrepancy between the platforms. Once you build to Android, the controls become slightly different. I just can't figure why.

So I created a VERY minimal repro project for you ! How nice, right? I zipped and sent the Asset folder by email to support@oculus.com as specified in the docs.
Email title is: "Bug repro for Project Moonlight: FollowOrientation Possible bug?"

Fortunately, there are only a few lines of new code in the package so you can easily spot the issue. Please look at the MoveOVRBug.cs Class.

I hope you will find the issue because that is what has been slowing me down for the past fews days.

Stephane

gkennickellvr
Level 2
Great! Do you have an ETA for this?


We do not yet have an official date for the next mobile sdk release.

I then tried to download SDK 3.2 and replace the plugins (all except android) -> Success! my DK1 is now working in Unity Editor.


Glad to hear you were able to get the DK1 to work for editor preview.

So I created a VERY minimal repro project for you ! How nice, right? I zipped and sent the Asset folder by email to support@oculus.com as specified in the docs.
Email title is: "Bug repro for Project Moonlight: FollowOrientation Possible bug?"


Thank you very much -- and yes, very nice of you=) we have downloaded the package and will try to get you an answer soon.

gkennickellvr
Level 2
Hi Stephane,

With regards to the followOrientation discrepancy between PC and Android, it appears the main issue is that for Android the CameraController is getting the same rotation as the right and left camera -- including the followOrientation.

Could you try the following change to CameraController::Update please?
       Quaternion q = Quaternion.identity;
Vector3 dir = Vector3.forward;

// Calculate the rotation Y offset that is getting updated externally
// (i.e. like a controller rotation)
float yRotation = 0.0f;
float xRotation = 0.0f;
GetYRotation(ref yRotation);
GetXRotation(ref xRotation);
q = Quaternion.Euler(xRotation, yRotation, 0.0f);
dir = q * Vector3.forward;
q.SetLookRotation(dir, Vector3.up);

Quaternion ccq = q * CameraOrientation;

// Multiply the camera controllers offset orientation (allow follow of orientation offset)
Quaternion orientationOffset = Quaternion.identity;
GetOrientationOffset(ref orientationOffset);
q = orientationOffset * q;

// Multiply in the current HeadQuat (q is now the latest best rotation)
q = q * CameraOrientation;

// If desired, update parent transform y rotation here
// This is useful if we want to track the current location of
// of the head.
// TODO: Future support for x and z, and possibly change to a quaternion
// NOTE: This calculation is one frame behind
// if(TrackerRotatesY == true)
// {
// Vector3 a = transform.rotation.eulerAngles;
// a.x = 0;
// a.z = 0;
// transform.parent.transform.eulerAngles = a;
// }

// * * *
// Update camera rotation
transform.rotation = ccq;
CameraLeft.transform.rotation = q;
CameraRight.transform.rotation = q;

mohydine
Level 3
Hi!

It is definitely better! My game is almost playable now!
There is still something off (some strange inertia that does not occur with the DK1) but now that I know where to look, let me try to find the cause.

Thanks again!

Stephane

gkennickellvr
Level 2
We will make sure the CameraController followOrientation fix is in the next SDK release. Thanks again for the feedback!

mohydine
Level 3
One additional note:
I realized that OVR_GetSensorState entry in UnityPlugin.cpp is all I needed instead of CameraPositionOrientation.
So I am back to a fully playable game now πŸ˜‰
I'll double check a bit further on the issue I mentioned earlier but it seems all gone now.

Thanks!

Stephane