Announcement

Collapse
No announcement yet.

Sharing Gear VR BP : android orientation -> camera orientation

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Sharing Gear VR BP : android orientation -> camera orientation

    Migrating from Oculus -> Mobile, this bp set is a mix of things we found and things we cooked ourselves.

    1) Each device has its own orientation for the sensors
    Android != iOS

    2) Requires smoothing

    Below in the attachments are the blueprint components.

    Level BP : level bp passes input to character:
    Ignore CollectionParameter Roll scalar

    The First Person Player Character BP : Event Graph contains a few macros.
    getFusionOrientation
    getGravityOrientation
    NoiseFilter

    https://www.facebook.com/media/set/?...1&l=e36f45ec7a

    The image upload didn't seem to work.


    If anyone has any suggestions on how to make this smoother or more responsive, please share your ideas!

    Click image for larger version

Name:	getFusionOrientation.png
Views:	1
Size:	163.8 KB
ID:	1160484
    Click image for larger version

Name:	Event graph.png
Views:	1
Size:	279.2 KB
ID:	1160485
    Click image for larger version

Name:	getGravityOrientation.png
Views:	1
Size:	113.0 KB
ID:	1160486
    Click image for larger version

Name:	level bp.png
Views:	1
Size:	114.1 KB
ID:	1160487
    Click image for larger version

Name:	mobile performance commands.png
Views:	1
Size:	86.0 KB
ID:	1160488
    Click image for larger version

Name:	noise filter.png
Views:	1
Size:	79.0 KB
ID:	1160489
    Click image for larger version

Name:	project settings _ input.png
Views:	1
Size:	32.0 KB
ID:	1160490
    Last edited by PerseusSmith; 09-03-2015, 08:41 PM. Reason: upload fail

    #2
    Correct me if i'm wrong but doesn't the gearVR plugin handle all of that - if you want to control a character with your head movement then either use get controller or make the character components a child of the camera as per: https://docs.unrealengine.com/latest...t/1/index.html
    and it's ultra smooth

    I can't figure out how to properly view the attachments but if you're using the default Android sensors this is probably more a solution for CardboardVR rather than GearVR?
    Headgear - VR/AR solutions

    Comment


      #3
      That's what we thought, but it never quite worked. This was our work around, and it is general enough to work on android.

      This allows you to ad-hoc a Google Cardboard VR like experience, with a console command: stereo on

      Comment


        #4
        Originally posted by rrstuv View Post
        That's what we thought, but it never quite worked. This was our work around, and it is general enough to work on android.

        This allows you to ad-hoc a Google Cardboard VR like experience, with a console command: stereo on
        Definitely would not recommend using a workaround for GearVR as the sensors in the headset itself are *far superior* then the android sensors in the phone itself. If you really wanted to get it running on GearVR then I'd go back and get it working on GearVR with the default GearVR plugin which works with brilliant tracking as seen on finished projects here: https://forums.unrealengine.com/show...ghlight=vr+jam

        I forget what I needed to change exactly but there were some camera settings that I needed to tweak for the DK2 version compared to the GearVR version of my project.

        Using your workaround sounds interesting for Cardboard however even there I think serious cardboard users are unlikely to pay for an app with the proper cardboard SDK to adjust lens distance / distortion / etc. - if only Epic added it as a plugin for out of the box tracking as well
        Headgear - VR/AR solutions

        Comment


          #5
          The appropriate lens distortion can be calculated using the Cardboard VR SDK.

          It tracks rather well, nearly as well as the GearVR setup. Depending on where you are on earth, the gravity differs so this blueprint accounts for that as well.

          If you don't want to (or can't) fork over 200$ for Samsung Gear VR, then this is a workaround that lowers the cost of entry for VR (enable Developer mode).
          Last edited by PerseusSmith; 09-03-2015, 08:42 PM.

          Comment


            #6
            Don't get me wrong I love cardboard as well - but would not use the android sensors if I was making a gearvr project.

            Have you added the CardboardVR SDK to UE4?!? Many people here would love a share of that: https://forums.unrealengine.com/show...-Cardboard-SDK
            Headgear - VR/AR solutions

            Comment


              #7
              This is my attempt at Google Cardboard VR like functionality. Unfortunately, the Unreal Engine is quite demanding on current smartphones. Only a few higher end phones have the required specs/ recommenced specs.

              Comment


                #8
                This is awesome. Thank you so much for sharing.

                I'll be happy to convert this to C++ components/plugin, but first I need to just check.

                Are you sure there is now way to achieve this with SimpleHMD?

                I only ask as we really need to lean on the engine, if possible, for things like this.

                For example your noise filter, whilst effective, can likely can be improved with kalma filters etc.

                I wonder if this has already been solved with SimpleHMD?

                Comment


                  #9
                  Hello,

                  I am having problem with GearVR orientation being too connected to player camera. Any way to separate these entities? I want to make rail shooter for Gear.
                  I posted more on problem here:
                  https://forums.unrealengine.com/show...but-not-camera

                  Comment


                    #10
                    Simple HMD does not work for s6 in dev mode, as I was trying to work around the requirement of having the gear vr. Without the gear vr, it does not seem to track things. My noise filter, allows one to adjust for location based gravity (kinda silly, dorky).

                    Minxies have you had any luck getting VR to work in mobile for UE4?

                    Comment


                      #11
                      Great news, official Google Cardboard support seems to be coming to the engine!

                      See here: https://www.reddit.com/r/oculus/comm..._next_week_at/

                      It looks like the existence of a new "AndroidVR" (Google Cardboard) plugin was leaked in the breakdown of the latest 4.12 Preview 3 release notes.

                      This note has since been pulled.

                      It is slated that the Google Cardboard SDK will be relaunched as AndroidVR this coming Google IO.

                      From the looks of it, AndroidVR looks to be a collaboration of sort between Epic Games and Google.

                      Best,
                      Minxies

                      Comment


                        #12
                        Hi there, I've been reading this thread with great interest, thanks for sharing. I'm currently attempting to use the Google VR plugin for mobile and make it render 1 camera (monoscopic) instead of 2. The console commands stereo off and vr.Stereoenabled False both works, but they also disables tracking which I need. A friend and I have been trying to modify the Google VR plugin source files without luck. Did you ever come across a way of disabling stereo but keep the HMD tracking active?

                        Comment


                          #13
                          Originally posted by Troels N View Post
                          Hi there, I've been reading this thread with great interest, thanks for sharing. I'm currently attempting to use the Google VR plugin for mobile and make it render 1 camera (monoscopic) instead of 2. The console commands stereo off and vr.Stereoenabled False both works, but they also disables tracking which I need. A friend and I have been trying to modify the Google VR plugin source files without luck. Did you ever come across a way of disabling stereo but keep the HMD tracking active?
                          did u ever find a solution to this ??

                          Comment


                            #14
                            Originally posted by ZMARDINI View Post

                            did u ever find a solution to this ??
                            Hi there, no, my colleague and I ended up using v. 4.17.2 that apparently uses a newer version of the Google Plugin? Here you can disable stereo without disabling tracking. We even compiled the source code for the engine and plugin to try and figure out how to fix it manually. No success unfortunately. Only solution we found was using 4.17.2 and run console command Stereo Off

                            If you find a better solution please let us know We'd love to use 4.19 instead

                            Comment

                            Working...
                            X