Skip to main content
Up and Coming
October 1, 2015

GearVR or DK2 HQ Rendering Layer in UE4

I was wondering if there is support on the Gear for UE4 to render certain materials or actors on a higher quality layer, eg: for UI presentation, etc... I know Oculus does this for their HUD and menu, is there something we can do in UE4? I don't just want a quad rendered with a high quality texture but an entire object in the world rendered in higher quality for display as the GearVR resolution isn't showing enough detail for that surface texture.
    This topic has been closed for replies.

    28 replies

    Inspiring
    July 18, 2016

    vrdaveb said:

    Actually they work on Rift and Gear VR.


    Well, Epic said Gear VR is not supported, so I thought it isn't :)

    Do you think someone from Oculus, who works with UE4 4.12.x, can cook up an example of how to use stereo layers for things like HUD and such (using Blueprint) ?

    Thanks beforehand
    Participant
    July 18, 2016
    Hey!
    Stereo layers definitively work on GearVR. In UE4 4.12.*, you can create a component in your scene called the StereoLayer component that take as parameters a texture, a quad size, and a layer type (world locked if you want it where the editor displays its outline, otherwise tracker locked and face locked will just use the component's transform to lock it to either your face or your character). 
    Since it takes as parameter a texture, you can also feed it a MediaTexture playing from an mp4 movie, if you check the "Live Texture" checkbox.
    Inspiring
    July 18, 2016
    Sounds easy, thanks! Hopefully it's as easy to setup as it sounds :wink:

    There are bunch of BP nodes in the doc vrdaveb posted a link to. What's the practical use for those ?
    Participant
    July 18, 2016
    Well if you want to update the stereo layer texture on the fly, or its size, during the game, you would need blueprint calls :) If you just want a static layer you don't need them.
    Inspiring
    July 19, 2016
    Ah, I see.

    Can UMG UI be on Stereo Layer ? I am thinking the Universal Menu long press indicator would be the first thing to try with Stereo Layers (currently I have it done as a material with depth hack on a static mesh parented to the camera and offset far away from the camera, but I think UMG would be more appropriate).


    Inspiring
    August 23, 2016

    rpalandri said:

    Hey!
    Stereo layers definitively work on GearVR. In UE4 4.12.*, you can create a component in your scene called the StereoLayer component that take as parameters a texture, a quad size, and a layer type (world locked if you want it where the editor displays its outline, otherwise tracker locked and face locked will just use the component's transform to lock it to either your face or your character). 
    Since it takes as parameter a texture, you can also feed it a MediaTexture playing from an mp4 movie, if you check the "Live Texture" checkbox.


    Alright, I finally got to mess with Stereo Layers and I must me missing something :blush:

    I can easily use it for crosshairs, maybe icons, but since it only accepts textures, I can't use dynamic material instances nor UMG in the layers. That makes it useless when it comes to text or animated elements (progress bars driven by BP for example).

    Am I missing something?

    Thanks

    P.S. @vrdaveb I haven't heard from rpalandri for more than a month, so I wonder if you can step in if he is busy/etc. Thanks!
    Inspiring
    August 23, 2016
    The point of stereo layers is to improve sharpness by avoiding double-sampling that occurs when texels are rendered first to the eye buffers and then to the display. They also allow you to bypass TimeWarp and have something like a cursor perfectly follow head movement. To get these benefits, you have to pay the price of reduced flexibility. Today, the layers always appear on top of other content in the scene. And you have to render the content in them to a texture each frame. Here is one way to do that.
    Inspiring
    August 23, 2016
    @vrdaveb

    Ouch, I see.. No wonder I couldn't get it working by simply adding component to player's character and assigning texture to it (for testing purposes).

    Is it not possible to have a component that doesn't require such elaborate setup? (similar to Unity, where afaik no black magic is needed to get stereo layers working)

    Btw, wouldn't it be performance taxing to render to texture every frame on Gear VR ?