Stereoscopic Material in 4.13

Hi,

I was trying to port a simple HTC project from 4.12.5 to 4.13.1 and I wasn’t able to get Stereoscopic Material to work in 4.13 as it was in 4.12.

The material still shows up in the HMD but its no longer stereoscopic, it seems to be outputting only one of the stereo textures.

Attached is the Material BP

Any help would be very appreciated

Thank you

Hello,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of the issue (what’s expected and what is actually happening)?

Thank you Rudy,
I did as you suggested and started again from scratch on a new project, however the end result was the same.

1 - Created a new project using the new VR template (in version 4.13.1)

2 - Added the a sphere to the VROrigin of the HMDLocomotionPawn (this is where the stereoscopic material will be displayed)

3 - Linked the sphere position, but not the rotation, to the HMD camera. This is so that I can rotate the head and look around the pano.

4 - Imported the 2 cubemap textures, one for each eye (check attached CubeMapSettings)

5 - Created a stereoscopic Material according to this StereoCubeMap_MAT image reference

You can find more info about this method here:
[link text][4]

6 - This should output one image per eye, creating the desired stereoscopic effect, however it only displays one image in the HMD.

Not having the stereoscopic ON removes all sense of scale from the HMD output.

*this method used to work on 4.12

Hello,

Does this issue still occur in other templates (other than the VR template)? The reason I ask is because the config files for the VR template cut out a lot of the higher end rendering features that are too expensive for VR like a lot of the post process screen space rendering features for AO and reflections.

Hi Rudy,

Just tried starting from a 4.13 blank project, brought in the sphere with inverted normal’s, recreated the material and just walked my HMD inside of the sphere, same result, no stereoscopic effect.
Did exactly the same on a 4.12 blank project and the stereoscopic material worked as expected.

Next I decided to go back to the initial test in 4.13 and turn OFF the instance stereo in the project rendering options, and strangely the stereoscopic material worked as expected…
Given the importance of the instance stereo option in any VR projects, I don’t think I can continue to develop what I have in mind on 4.13.

Any ideas? Is it to soon to call this a bug?

Would it be possible for you to provide a zipped down copy of the project that you are using so that I could take a closer look?

Sure, you can download the 4.13.1 test project here:

In the version that I am sending you the instance stereo is ON. And once you do “play in VR” you will notice that the panorama shows up
but there is no sense of scale, because there is only one image being outputted to the HMD.

If you go to the project settings and turn OFF the instance stereo and try to play in VR, you should be able to see the stereoscopic effect on. Because the 2 cubemaps will be displayed one per eye, you should be able to perceive a proper sense of scale.

I really appreciate the help!

After further testing I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further consideration. I have also provided a link to the public tracker. Please feel free to use the link provided for future updates. Thank you for your time and information.

Link: Unreal Engine Issues and Bug Tracker (UE-37487)

Make it a great day

Just as an update: this is still an issue in 4.15 and if you are using the forward rendering path even turning off instanced stereo doesn’t help there.

Here’s a way that works in 4.15 with stereo Instancing on and with the forward renderer. And probably a more stable way of doing it. Tested with Oculus.

  • Create a custom node in your material editor and add: return ResolvedView.StereoPassIndex;
    • Output Type should be Float 1
  • Drive a lerp nodes alpha with this custom node
  • Connect Right Eye texture to A & Left eye to B
  • Voila

Cheers to Ikrima for digging into the code base

1 Like

Please reload project
thank you

Thanks!! This fixed a problem I was having with the older method - I would see a correct split on the screen but in the HMD there would only be a strip of 3D down the middle of view with larger flat areas either side.

Here is a picture of how I got over/under 3D 360 video to render onto a sphere.

could you explain a little bit how did you build this shader? tried to use negative values on vector parameter without success.

little late, but change the values in the details panel vs color selector etc if your trying to achieve negative values. This is still the case for 4.23(I am not using 4.24 yet)

I’m trying to do this in 4.27
but all the links are broken and go to the OOps! file not found page
Its very important to me
I have thousands of high quality top bottom 360 stills I want to use as environment bkds
I can get a single view pano to work obviously by mapping it onto a sphere
but I would like it to be stereo top bottom for the parrallax and extra depth.
I am able to do this in unity very quickly, but I can’t stand working with unity.
Its very important to my project
I am NOT a coder, Iam a tech artist,
I have these examples that say to use

There’s a view uniform called stereo pass index you can access with a custom shader. You’ll want to use ResolvedView.StereoPassIndex. It will be 0 for the left eye or mono and 1 for the right eye. Here’s an example which makes the material red in the left eye and green in the right (or just red in mono):

https://answers.unrealengine.com/storage/temp/134832-eyespecificmaterial.png

but no pic.
I’m not advanced enough to just “get it” from a single line, I need the picture of the node setup but that’s an OOOPS! page
TIA.

Can´t test it, but going by this tut here:

It should be like this (i have added the option to switch between top-down and left-right images):

Thank you very much
I have only been using UE for a year and a bit
I understand how these nodes work much better
I am not an advanced material person yet
I come from the days of idtech games with 3-4 textures per mat in a common structure,
this was beyond me, I didn’t get how the lerp needed to be attached.
This is a core component of my game,
these stereo pano background environments
and a large open zero g flying and walking 1st person level setup.
thx

It did work,
but
I have 2 different vr projects,
both are stripped down simple, less than 200 megs
just a simple floor , couple boxes.
One is the 4.27 vr template.
It compiles for both quest and windows
and the mat doesn’t appear as 3d in the hmd

The second is another stripped down project, but its made for 4.1
It also has a custom pawn that flies in zero g and can grab onto stuff
it was converted to 4.27

The stereo shows perfectly in it.
only compiles for windows, quest chokes on it.

I have no idea what is different about these projects, but the main 4.27 vr template one won’t split the image at the lerp by .5

You might want watch those videos from that site again, they have plenty of information about how to get your VR stuff running with Unreal Engine. I don´t have a VR set ^.^

But i remember, there was one setting, that i had to activate in the project settings to be able to render stereo images, it was “Instanced Stereo”, in the render section.

Other than that, check the other tutorial from the website above:

Watch the videos, it´s easier to understand than the text ^.^

I have all the settings in there.
I think its an ini setting they made for the updated 4.27 VR template.
I am actually installing 3.1 to see.
I need the capability to do this for my project so I have to find out what is different between my template that’s working and the standard 4.27 VR template.

The Template I first tested it on was a modified version of niko Kun’s zero g 4.1 template
but that won’t compile for the quest only pc, so I went to the 4.27 ver template base that I have that is completely minimal and compiles proerly for both pc and quest, but in that version the co-ordinates of the lerp don’t split the view.
Went through the proj settings and they look the same, so I have to keep looking.
I’ll post a googledrive link of the 4.1 working one for ppl to compare if I can.