Search Unity

Prevent VR viewer in a 360 video to rotate when the camera takes a steep rotation

Discussion in 'VR' started by rahulchawla2801, May 23, 2022.

  1. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34
    In a 360 VR video, if the camera takes a steep left/right turn i.e. 90-degree clockwise/anticlockwise rotation along the Y-axis, the VR viewer also has to rotate their chair and tilt the head 90 degrees.

    Is there a way to keep the VR viewer static in such a situation?

    I am not able to find any information on this online, can you help me with the relevant terms and concepts.

    My specific problem:
    I made a 360 VR video in which the viewer is flying on a dragon, camera mounted on the dragon, so the POV of the camera and the dragon is the same after recording.

    The problem is when I view this with my Head Mounted Display, Oculus Quest 2, whenever the dragon turns left (anticlockwise along the Y-axis ) I also have to tilt my head left and rotate my chair.

    The other problem is, that a new viewer won't know when the dragon will turn left, opposite to how in a VR rollercoaster, the path is already laid.

    EDIT: edited the language as suggested and explained a bit more.

    EDIT 2:
    I have uploaded 2 video recordings (by Unity recorder) of the same 15 second simplistic gameplay.
    1. game view
    2. 360 of the same game view
    https://drive.google.com/drive/folders/1fECYn_XnQmJeZtAgayxvPKIP8BAgeqwO

    The game view is how I want to see when I wear a Head Mounted Display.
    But, in the 360 view recording, I can't understand why the POV becomes different when there is a rotation, despite both the recordings being done by the same main camera.
     
    Last edited: May 31, 2022
  2. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    Its a little unclear from your description and mixed terminology ( turn left/right would normally be referred to as panning ) but it appears you may have rendered your video with the camera always facing forward, instead of being attached to the direction your dragon is flying.

    Ultimately I'd expect the camera forward view to always be looking in the direction the dragon is flying and thus even if it turned left/right the camera would follow it. As a player you'd know it turned as the scenery/sky would be rotating in the opposite direction.

    Now if for some reason what i've described is incorrect for your problem, you may have to describe it better or show a video or something.
     
    rahulchawla2801 likes this.
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    While rendering the video you absolutely should be able to turn the camera.

    So the right idea would be to render the video with movement included. See skydiving videos for an example.
     
    rahulchawla2801 likes this.
  4. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34


    By left/right I meant turning 90 degrees in anticlockwise/clockwise rotation along the Y axis.

    My camera was attached to the dragon while recording the 360 video, it recorded properly i.e. the POV of the camera and dragon were the same the entire time. That wasn't the problem.

    The issue is, now when I watch it on any Head Mounted Display like Oculus Quest 2, whenever the dragon takes a steep turn (rotation along Y axis), I have to rotate my chair and headset with it.

    It seems to me now that I should design my 360 VR videos such that the rotation along the Y axis is in the range of +-20 degrees and the path is implicitly communicated to the viewer, like in the case of Roller Coaster, the track is already laid.
     
  5. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34
    My camera is mounted on the dragon, the POV of the camera and dragon is the same after recording a 360 video.

    The problem is when I view this through my Head Mounter Display, Oculus Quest 2.

    I have edited my post and explained a bit more.
     
  6. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    Ok, I'm sorry but this is still a bit confusing, probably due to language/terminology confusion between us. The Y axis in Unity by default is up/down, therefore any rotation around this axis would be panning. The wording of 'along' the y axis I can consider to be 'around' either X or Z axis depending upon how I look at it - thus ultimately not useful.

    However you mention rotating your chair and since you can't 'yaw' a typical chair, and usually 'pitch' of a chair is limited to only leaning backwards, I would have to again have to summarize that you mean panning - i.e. rotation around Y Axis.

    Allowing rotation ( panning) like this in VR sounds very bad as you are taking away control from the player and de-syncing what the headset is showing verses what the player is doing with the headset. It seems like a guaranteed way to induce motion sickness, even if limited to small degrees.

    It sounds like you'll trying to emulate what has become quite common these days with games adding additional camera movement to a first person controller to simulate head movement - Like when games take a limited amount of control away from the player to make actions/motions more visually interesting.

    This is something I would suspect is far from ideal to do in a VR situation as again its taking control away from the player and having what they see in the headset not match the actions their head is making.

    My recommendation is again to always have camera look in the direction of the dragons movement ( not direction of dragons head or anything) or as you say 'its fixed to a track'. Don't forget the player themselves have full control over where they look in VR so its likely they wont stay fixed looking directly ahead.

    Taking your description at face value this sounds exactly like it is the problem and not what I suggested in my original post. The recording camera should not be attached to the 'pov' of the dragon, but to the direction it is flying in.

    I would probably achieve this through some parent-child gameobject hierarchy to ensure that the camera is always facing the direction of forward movement through the world, but allow for the dragon body/head to be visible and its body/head to make small movements to suggest panning, yaw or tilt when the dragons direction changes to a large degree.


    If none of this is making any sense or you feel I have misunderstood, my last suggestion would be to upload a demonstration video to youtube, perhaps mark the video as unlisted and provide a link here. I have a Quest so I ( and maybe others ) can easily boot up youtube and watch the video demo. Later you can delete the video off youtube.
     
  7. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34
    So sorry I took this long to reply.
    I think the videos will explain my problem better. I have uploaded 2 video recordings (by Unity recorder) of the same 15 second simplistic gameplay.
    1. game view
    2. 360 of the same game view
    https://drive.google.com/drive/folders/1fECYn_XnQmJeZtAgayxvPKIP8BAgeqwO

    The game view is how I want to see when I wear a Head Mounted Display.
    But, in the 360 view recording, I can't understand why the POV becomes different when there is a rotation, despite both the recordings being done by the same main camera.
     
  8. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    Looks like a use case we are not taking into account. In most 360 recordings it does not really make sense to rotate the 360 camera since it's the watcher who does it with the headset. In your case I agree it would be needed since your point of reference is the dragon and not the world.

    Not sure there is a quick way to do it in this case. On thing you could try would be to move the world instead. Might look complicated but if you place everything under one GameObject and animate the root might not be to hard to achieve. This way you could have the camera facing forward all the time.

    Let me know if this could work for you.

    Only thing we could do would be to add a request on our roadmap and see if there is interest in it.
     
    Last edited: Jun 1, 2022
  9. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34

    First of all, I am glad that someone really understood what I was trying to communicate for a long time across platforms.

    I thought about rotating the world, but the challenge there is the rotation must take place around the POV of the dragon, which will be a vector. I found that to be complicated and even counterintuitive.

    For now, I bought a paid asset that solves this.
     
  10. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    sorry I was unable to reply earlier but I’m currently sick and today has been the first time this week I’ve checked the forums. Sadly being unwell means I’m not in a position to watch the videos, but glad it appears you were able to convey the issue and found a solution.
     
  11. AllVirtual

    AllVirtual

    Joined:
    Dec 15, 2016
    Posts:
    7
    Hello,
    Since june hope you found a solution.
    First solution : it's to record in stereo mode

    Second solution : Change one line in recoder package.
    Instead using recorder package from package manager, download package from https://github.com/needle-mirror/com.unity.recorder/releases (for example).
    Now, you can update code from package without issue/warning.
    In the "com.unity.recorder-x.x.x\Editor\Sources\Recorders\_Inputs\Camera360.cs" change line 121
    Code (CSharp):
    1. argetCamera.RenderToCubemap(m_Cubemap1, 63, Camera.MonoOrStereoscopicEye.Mono);
    to
    Code (CSharp):
    1. targetCamera.RenderToCubemap(m_Cubemap1, 63, Camera.MonoOrStereoscopicEye.Right);
    Now, it's recording with keeping direction.

    Happy recording
     
  12. diegosmurillo

    diegosmurillo

    Joined:
    Apr 14, 2020
    Posts:
    3

    hey, i had the same problem, and i changed the code that way, but looks with a black line. how can i solve this? upload_2023-4-20_14-49-6.png