3. Creating a Material for Viewing Stereo Images

In this section, we will create and set up a Material that will allow us to view the stereo images that were created in the previous section.

  1. Locate the stereo images that were created in the previous section by going to your projects saved folder and then going to StereoPanoramaImages\Saved\StereoPanorama(Date & Time it was taken).

    Click for full image.

  2. Once you locate both images, select both images and then drag them from their location in Windows into the Content Browser which will import the images into your UE4 project.

    Click for full image.

  3. Once both images have been imported, double-click on both of the images to open them up in the Texture Viewer and once opened, go to the Level Of Detail section and under Mip Gen Settings, change the setting from From Texture Group to No Mipmaps.

    Click for full image.

    Failing to do this could result in the textures showing a seam when viewed in stereo due to the distance this texture will be from the camera.

  4. Now Right - click in the Content Browser and from the Create Basic Asset section click on the Material option and give the newly created Material a name of MAT_StereoViewer.

    Click for full image.

  5. Double-click on the MAT_StereoViewer Material to open it up and in the Details panel set the following options.

    • Shading Model: Unlit

    • Fully Rough: True

    • Use Full Precision: True

    • Use LIghtmap Directionality: False

  6. Now click on the Copy Material Expression Graph option that is below and copy the provided text and paste it into the Material Editor. After the text has been pasted into the Material Graph, make sure to wire up the output of the If node into the Emissive Color on the Main Material node. When completed your Material should look like the following image.

    Copy Expression Graph
  7. Now that the viewer Material has been set up and connected, locate the left and right eye Textures in the Content Browser and then load the Textures into the corresponding eye Texture input and then press the Apply AND Save buttons to compile and save the Material.

    Click for full image.

With the Material now set up and ready to be used, in the next section, we will look at how to set up a level to display the Material when the level is run.