Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

[Gear VR] Using StereoLayers to render stereo cubemap a la Oculus 360 photos - how ?

motorsepmotorsep Posts: 1,326 Oculus Start Member
A question popped up on UE4 forums about rendering cubemaps in UE4 in the same quality as they are in Oculus 360 photo app.

As far as I know, it's not possible to do such thing using standard to UE4 sky sphere method, because not only sky spheres are not timewarped, but also they act as standard world texture when it comes to mipmaps. So in order for sky sphere to look good, it can not have any mipmaps.

Then I read this doc https://developer3.oculus.com/documentation/mobilesdk/latest/concepts/mobile-rendering/#mobile-perf-guides-resolution and I remembered that Stereo Layers support cubemap and are timewarped. So I figured that perhaps using StereoLayers we can render cubemap and Oculus Mobile SDK do the same thing to it as it does to cubemaps in Oculus 360 photos app.

Am I thinking in the right direction ?

Now, the questions is how to render stereo cubemap using StereoLayers in UE4, if it's even possible at all ?

The end goal is to be able to make either a 360 photo gallery a la Oculus 360 app, or to use that for archviz - have several rooms pre-rendered in stereo cubemaps and have clients transition from "room" to "room" by swapping cubemaps in StereoLayers.

Thanks

Comments

  • imperativityimperativity Posts: 3,587 Valuable Player
    In unreal engines 4.13+ there is the ability to use a cubemap overlays to perform this function.

    See the documentation here:

    https://developer3.oculus.com/documentation/game-engines/latest/concepts/unreal-overlay/

    To create an overlay:

    1. Create an Actor and add it to the level. If you don’t want the Actor to be visible in the scene, use an Empty Actor.
    2. Select the Actor, select Add Component, and choose Stereo Layer.
    3. Under the Stereo Layer options, set Stereo Layer Type to Quad Layer or Cylinder Layer.
    4. Set Stereo Layer Type to Face LockedTorso Locked, or World Locked.
    5. Set the overlay dimensions in world units in Quad Stereo Layer Properties or Cylinder Stereo Layer Properties.
    6. Select Supports Depth in Stereo Layer to set your compositor layer to not always appear on top of other scene geometry. Note that this may affect performance.
    7. Configure Texture and additional attributes as appropriate.
     

    Let me know if you have any other questions.


  • motorsepmotorsep Posts: 1,326 Oculus Start Member
    I already know all that, but thanks :)

    The question is how to get stereo cubemap image to render in stereo using StereoLayer component.

    For once, UE4 doesn't support stereo cubemaps or even cubemap strips, like Oculus does. So the only way to load stereo cubemaps into UE4 is to make separate left/right eye cubemaps compliant with UE4 requirements, or left/right eye equirectangular panoramas, which most likely aren't supported by StereoLayers.

    Then the question is how to set stereo pair for StereoLayer. Currently I am not away of any way to do that. There is only one image slot in the StereoLayer component details panel, so only 1 mono cubemap is supported.
  • imperativityimperativity Posts: 3,587 Valuable Player
    I'll do my best to get you some clarity on the feasibility of these questions in the near future.
  • imperativityimperativity Posts: 3,587 Valuable Player
    Then the question is how to set stereo pair for StereoLayer. Currently I am not away of any way to do that. There is only one image slot in the StereoLayer component details panel, so only 1 mono cubemap is supported.

    It should be called LeftTexture in Cubemap Overlays Properties.

  • newtorinewtori Posts: 1
    NerveGear
    I have the same problem with Stereo layer. I've tried using .jpeg, .dds and .HDR textures in LeftTexture and Texture properties but the cubemap layer does not appear. Is there anyone who already managed to make the stereo layer cubemap works at least once?
  • imperativityimperativity Posts: 3,587 Valuable Player
    edited September 2017
    @newtori

    Can you tell me which version of Unity you are using? The setting may have changed since this post was made.
  • motorsepmotorsep Posts: 1,326 Oculus Start Member
    Do you mean UE4 @imperativity ? My OP was about using it in UE4...
  • imperativityimperativity Posts: 3,587 Valuable Player
    edited September 2017
    @motorsep

    My bad! I walked into this thread with a different context. It is unchanged in Unreal for now from what I can tell.
  • pekayattpekayatt Posts: 128 Oculus Start Member
    Have tried here as well... I could not make it work...
Sign In or Register to comment.