Download

Stereo sky sphere - how ?

How can I set up 2 sky spheres, one to be rendered only for left eye, and one to be rendered only for right eye ? Thanks.

Why would you want a stereo sky sphere? The UE4 sky sphere is so far away you would’nt see any stereo disparity.

Eeh, the whole idea behind skybox/sky sphere is that no matter how big or small it is, it will always look the same from any point of view on the map. If UE4 does it differently, it’s a bug or incorrect approach to rendering skyboxes.

Either way, I’d like to know how to set up rendering of sky sphere per eye, if doable at all (it’s doable with Unity!).

Are you talking about stereo cubemaps?
If so check out the material in this readme. https://github.com/opamp77/StereoCubeMapImporter/blob/master/README.md

Well, what does it do? Judging from the readme file, it loads stereo cubemap and splits it in two. I can do that manually :slight_smile: What I need is to show one cubemap for left eye, and another cubemap for right eye.

I am not yet too familiar with UE4 and using it for VR, so I am not really understanding the BP setup you have there. Is that a special custom material where you feed stereo cubemap and it renders left cubemap for left eye and right cubemap for right eye automatically ?

If so, do I simply make 1 sky sphere and apply that material to it ?

What if I have my cubemap already split manually, left and right eye respectively. How can I use it in this case ?

Could you please explain how it works and if it’s compatible with Gear VR ?

  1. What I need is to show one cubemap for left eye, and another cubemap for right eye.
    Thats what the material in the readme does.

If so, do I simply make 1 sky sphere and apply that material to it ?
Exactly.

What if I have my cubemap already split manually, left and right eye respectively. How can I use it in this case?
Then just use the material with your own cubemaps.

Could you please explain how it works and if it’s compatible with Gear VR ?
If you mean the plugin then as stated it takes a sterocubemap image splits it and creates two standard ue4 cubemaps(what you have been doing manually). It also comes with a material for rendering each cubemap to each eye(what you are after).
And the plugin is an editor plugin so yes it supports GearVR.

Opamp

Thanks a bunch!

Hi Opamp77! Great, I’m going to try it out soon. Is the quality of each cubemap the same you would get using standard textures on a cube or did you manage to improve it somehow?
Is there any quality benefit in using your plugin for monoscopic 360 images?

As far as quality is concerned im not quite sure what you mean?

The plugin does’nt support Monoscopic 360 it would try to chop that image in two.

Opamp

So, tested your plugin, it works like a charm :slight_smile: you should provide an option to import also mono cubemaps, haven’t found a way to convert them to DDS on mac and that would be super convenient.

As concern the quality issues:

  • Setting the defaultdeviceprofile r.MobileContentScaleFactor to zero really improved the overall sharpness on GearVR (the default renders at half resolution, that makes no sense to me)
  • The oculus SDK through the OVROverlays should allow in 4.11 to avoid sampling the textures twice, which is probably one of the causes of quality issues I’m talking about. This is already available in Unity, not sure how to test in in 4.11b6:
    https://developer.oculus.com/doc/0.1.0.0-unity/class_o_v_r_overlay.html
  • There is an issue with aliasing that is not visibile in the ORBX or 360 photos players. On normal textures I can partially fix this through mipmaps (but with a degradation of the overall quality). With cubemaps I haven’t found a way yet (enabling mipmaps make the cubemap unusably blurry).
    The effect is for example a glimmering in the grass in the cubemap provided with your plugin (with any other image just look for straight lines and try moving your head)

Any idea how to fix it? MSAA?

To be honest this sounds like an unoptimized use of draw calls. Now granted it’s your project and you’re free to do whatever you are capible of but at the end of the day you’re using twice as many resources on something while working on what can currently be considered a very limited platform.

How would that be unoptimized use of drawcalls (if you mean using stereo sky sphere) ?

Having complex geometry would yield more drawcalls, unless it’s one solid mesh (apparently not possible with GLES 2 for surfaces with more than 10k of vertices, or something like that), one texture (or atlas, but then it probably requires more computation to deal with tiling textures and atlas) and one material. And even then you will be limited to 100k tris in the view.

You’re using two drawcalls for what can be accomplished with one. That’s what I’m getting at.

For simple projects you might not notice the difference bUT if you’re going places then every drop or resources counts.

Right, 2 draw calls per scene, vs probably 20 drawcalls if using actual geometry. You can have mono sky sphere, but it won’t work for what I am aiming to do.

MSAA is only going to help with real geometry. I’m guessing that you’d want to use something like TAA or FXAA. But i’m guessing thats not availible on GVR.

Why not to render cubemap at higher resolution and with AA already? No need to use real-time AA on static opaque image.

The cubemap has already a resolution much higher than what can be displayed on the gearVR. The problem is that without mipmaps everytime there are straight lines they show aliasing problems. Mipmaps degrade a little the sharpness of the image though.

The overall quality anyway is quite acceptable once the r.MobileContentScaleFactor is se to zero, the difference between the results with UE4 and the native Oculus app is probably due to the use of OVROveraly which avoids the double resampling of the texture.

I already created something like this, maybe I should release it as a template.

Please do! As a newbie coming to grips with Blueprints, matinee etc… a template to dissect and learn from is highly appreciated.
I’m looking at using a still image / video (stereoscopic equirectangular shot with cameras) as background over which UE4 graphics will be overlayed. A bit ambitious for a newbie, but hoping to learn along the way.