Search Unity

Poor Video Quality on GearVR

Discussion in 'AR/VR (XR) Discussion' started by sapanda88, Oct 7, 2015.

  1. sapanda88

    sapanda88

    Joined:
    Mar 20, 2014
    Posts:
    12
    (Also posted on Oculus Forums)

    We've noticed that video played via the Oculus Mobile MoviePlayerSample.cs is far blurrier than:

    a) native apps like Oculus Cinema
    b) still snapshots of the same video

    For comparison, take a look at the following images.

    Snapshot:

    Video:


    It can't be an issue with video compression because we've tried:

    1) 1080p 25fps @ 10mbps (H.264)
    2) 2160p 25fps @ 40mbps (H.264)

    The low screen resolution of the S6/Note 4 results in the video looking the same at HD (#1) and UHD (#2). So it has to be something going on with how the video is played back in Unity.

    Here's the texture settings we use for both the snapshots and video (tried both Bilinear and Point filtering):


    Anyone know what might be going on, what avenues I should investigate, or what some potential mitigations might be?

    Thanks,
    Saswat
     
  2. sapanda88

    sapanda88

    Joined:
    Mar 20, 2014
    Posts:
    12
    I just tried the EasyMovieTexture asset, and it solves the problem. So the MoviePlayerSample.cs is doing something wonky with the video... Any idea what that might be?
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    One problem you have in those settings in the texture is the 'nearest power 2' which impacts the texture size - given that the MoviePlayerSample creates the texture with
    OVR_Media_Surface( textureId, 2880, 1440 );​

    you should not make it resize to the nearest power 2 (which is either 2048x1024 or 4096x2048)

    Also you would want to set the texture to Clamp instead of Repeat
     
  4. sapanda88

    sapanda88

    Joined:
    Mar 20, 2014
    Posts:
    12
    Thanks for that info. That probably helps with optimization. I discovered the following:

    1) MoviePlayerSample.cs has a comment over the OVR_Media_Surface: "mipmaps will be generated so normal Unity rendering can use it". So even though the texture has "Generate Mip Maps" disabled, they are still getting created.

    2) We're using a curved screen rather than a flat screen. So perhaps the shape of the mesh is causing Unity to pick the lower mips?

    So I modified the source in the MediaSurfacePlugin to not use mips, and BAM quality is so much better!