# Tutorial: Create a VR cinema with stereoscopic 3D support (UE 4.5 , no C++)

**URL:** <https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689>\
**Category:** XR Development\
**Tags:** unreal-engine\
**Created:** [October 21, 2014, 2:26pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689 "2014-10-21T14:26:42Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonardoBarbero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeonardoBarbero](https://forums.unrealengine.com/u/LeonardoBarbero)\
**Post date:** [October 21, 2014, 2:26pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/1 "2014-10-21T14:26:42Z")

</div>

If you’ve got an Oculus DK, you’ve probably already used a VR cinema application. Thanks to UE 4.5’s new Media Framework, now you can create your own very easily. Keep in mind that the Media Framework is not finished yet, so make sure your video files are in WMV format to avoid problems.

- Create a Blank Blueprint Project (Desktop/Console, Maximum Quality, With Starter Content).

- Create a new Empty Level, save it, and make it the Game Default Map and Editor Startup Map in the Project Settings.

- In the Content Browser, go to StarterContent/Architecture and place a Wall\_400x300 in your level. In the actor’s details, set the Z component of its location to 0.0

- In Windows Explorer, create a folder named Movies inside the Content folder of your project, and copy your WMV files into it.

- In the Content Browser, right-click on Game and select New Asset -\> Miscellaneous -\> Media Player.

- Open your Media Player asset, set Auto Play to true, and choose your video file in the URL field. Save; close the window and open your Media Player asset again. If you press Play you should be able to watch your video file. If not, choose another video file.

- In the Content Browser, right-click on your Media Player asset and select Create Media Texture. Save your new Media Texture. It should already work correctly.

- In the Content Browser, right-click on your Media Texture asset and select Create Material.

- Open the new Material. It will look like this:

 ![tut01.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/8/a8d3d2fef863059c56b56bcdccaf5fb7a3fe3a9c.png)

- Since the level is in total darkness, you need to make the material emissive:

 ![tut02.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/a/bae1c294132a47b19a86a5db5166340e37ca5d63.png)

- You can now save the material and apply it to the wall. You should already see the video playing in the viewport, but not the way you want it to:

 ![tut03.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/2/320de4565c683bc7b798b45e4bfbcc6bf6602114.png)

- The UVs of the mesh are not right for our purposes. The wall is 400x300 units, and is showing 4x3 videos which are horizontally inverted. We’ll fix that in the material, and in the process add support for videos with different aspect ratios, and for SBS (side-by-side) stereoscopic 3D videos. The final material looks like this:

 ![tut04.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/b/aba299015be33f75033e7949b151f506a32a513f.png)

- Let’s look at its different parts:

 ![tut05.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/5/75a3681ec896daae0add37cf5b018ed6b47869de.png)

Here we add a Scalar Parameter to control the Aspect Ratio of the video. By default it’s 16:9 (1.778), but our wall is 4:3 (1.333), so we divide those values. We multiply the texture coordinates by (-0.25, 0.333) to get rid of the 4x3 horizontally inverted videos problem. This gets any 4:3 video to show correctly, so we multiply by (1, AspectRatio/1.333) in order for any video to show correctly. The last thing we want to do is put the bottom of the video at the bottom of the wall, so we add to the previously computed value (0, AspectRatio/1.333 \* -0.333). The constant 300 corresponds to the wall height. We divide it by AspectRatio/1.333 and we’ll use that later.

 ![tut06.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/2/f2a2c820c81c992751b9d03124100772eea88bfe.png)

This part adds support for SBS videos. In these videos, the left half corresponds to one eye, and the right half to the other, which is exactly what happens in the frame buffer when rendering to the Oculus DK. We use the ScreenPosition’s X component to be able to know which eye the currently rendered pixel corresponds to. [0.0, 0.5) is one eye and [0.5, 1.0] is the other. We have to multiply the computed texture coordinates by (0.5, 1) to make each half of the video fit the entire wall. And then we add (0.5, 0) to the coordinates of one of the eyes, so that each eye gets a different half of the video. Note that different HMDs and different videos might require to switch which coordinates are received by each eye in order for the videos to show correctly. The last thing to do is to add a Scalar Parameter to enable the stereoscopic mode.

 ![tut01.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/9/21997bb95227bc8237a36a57c25ecbe152c430f1.png)

Finally, we’ll add a black stripe on the top of the wall if the Aspect Ratio is not 4:3. A TV adds two stripes, one on the top and one on the bottom, but we’ll take advantage of the fact that the level is in total darkness to make things simpler. The wall’s bottom is at Z = 0.0, and its top is at Z = 300.0 . The white line that is connected to the B of the If, is the result of 300/(AspectRatio/1.333), which we computed earlier. This value represents the height the wall should be to fit a video of the current aspect ratio. Instead of scaling the wall, we’ll just force the pixels of the wall that are above that height to be rendered black.

- Great! All that’s left to do is give the user the ability to change the values of the Scalar Parameters we created: AspectRatio and Stereo. We’ll need to create a Dynamic Material Instance. The proper way to do it would be to create a Blueprint for the wall, but for this simple tutorial we’ll just do it in the Level Blueprint. Select the wall in the viewport, open the Level Blueprint, right-click and add a reference to the wall. Then do this:

 ![tut02.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/7/627d6990fc280b324a02f091e174a6597e2a68e8.png)

- Finally, we’ll implement some controls to change the parameters. Add two float variables to the Level Blueprint called AspectRatio and Stereo, and then do this:

 ![tut10.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/a/8aee86cbfd253cad1fd6974ca8e60ef57108682c.jpeg)

Now you can quickly select one of the three most common aspect ratios, and enable or disable stereoscopic 3D.

That’s all that can be done without C++ for now. Once playback can be controlled and more video formats are supported, this is going to be great.

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [October 21, 2014, 5:33pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/2 "2014-10-21T17:33:33Z")

</div>

Awesome - I especially like the SBS 3D support. I was planning to set something like this up for the loading screen videos, but that UV setup looks like it would have been a pain to figure out from scratch - thanks!

---

<div class="post-metadata">

**Author:** ![scrcro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scrcro/32/1008648_2.png) [@scrcro](https://forums.unrealengine.com/u/scrcro)\
**Post date:** [October 22, 2014, 12:21pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/3 "2014-10-22T12:21:27Z")

</div>

Goddamnit…

Been trying to figure the SBS stuff out for ages, can’t believe it was so simple. Excuse me whilst I go and smash my face against the wall for a couple of minutes.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_50821668](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_50821668](https://forums.unrealengine.com/u/anonymous_user_50821668)\
**Post date:** [December 15, 2014, 10:13am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/4 "2014-12-15T10:13:07Z")

</div>

Hi LeonardoBarbero,

First of all thanks a lot for detailed description on this. This works like a charm on a Quad. However, we have a scenario where we are using different projection methods. e.g\> Dome, Spherical, latlong etc. When I tried the above method on the geometry which has custom UV layout for the movie texture playback(stereo SBS), it failed. Simple example would be that of curved screen with tweaked UV layout so that when movie is projected on that screen, renders correctly.

Coming from an Unity Engine background, I got this done simply by creating two set of geometries at exact same locations. Unity’s Oculus camera setup involves two physical cameras present. So the trick is to render one geometry with LE movie renders as texture using one camera ( left camera layer ) & render another geometry with RE movie render using second camera ( right camera layer ).

Unreal’s oculus setup is pretty opaque so not sure what happens under the hood. For your approach to work then perhaps I need to tweak the material itself ?

Please let me know in case you have any idea on this.

Regards,

---

<div class="post-metadata">

**Author:** ![PhoenixThrough](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PhoenixThrough](https://forums.unrealengine.com/u/PhoenixThrough)\
**Post date:** [March 12, 2015, 8:52am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/5 "2015-03-12T08:52:37Z")

</div>

Thanks a lot and now I’m able to set a screen wall though I’m not acquainted with those DMI stuff! One more question is that how should I play the sound at same time? I tried to split out a media sound wave and set it to play but in no avail.

---

<div class="post-metadata">

**Author:** ![NETrom1970](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NETrom1970](https://forums.unrealengine.com/u/NETrom1970)\
**Post date:** [March 14, 2015, 1:43am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/6 "2015-03-14T01:43:56Z")

</div>

Feel like a noob. Simply can’t find out where to find “Target static mesh component” and the “Target materials” in picture tut08.png What is it that im missing??

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_eab2178b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eab2178b](https://forums.unrealengine.com/u/anonymous_user_eab2178b)\
**Post date:** [March 31, 2015, 3:30pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/7 "2015-03-31T15:30:38Z")

</div>

I want to achive an effect of 3d sbs projection but within a game not as a player… and effect that can be found in oculus rift demo called insurgent. There are 3d videos sbs with actors( actores are keyed out from green screen. I tried to edit the material to achive similar effect but iam nowhere near of findg a solution could sombody point the right direction I am total noobe when comes to ue4 and its materials.  
insurgent effect [Mind Blowing Oculus Rift DK2 Experience INSURGENT SHATTER REALITY - YouTube](https://www.youtube.com/watch?v=_TyuuQJUcmk)

and thats what i have so far= means nothing.

 ![3ed016591867e79895efc2b3531b3923be74d66f.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/d/3ed016591867e79895efc2b3531b3923be74d66f.jpeg)

---

<div class="post-metadata">

**Author:** ![Muesli\_Lord](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Muesli\_Lord](https://forums.unrealengine.com/u/Muesli_Lord)\
**Post date:** [June 10, 2015, 3:52pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/8 "2015-06-10T15:52:14Z")

</div>

Hi Leonardo, thanks for the walk-through, it was pretty easy to follow!  
It would have been impossible to figure out on my own!

I didn’t need the ability to change aspect ratios and turn on/off stereo,  
so I simply gave the Stereo variable a value of “1” by default.

Now, I’m trying to figure something out, but I hit a wall.

Say instead of the wall I have a cube, and instead of the video I have a texture loaded externally,  
or 6 textures for each side (12 for stereo), I guess your approach should work?

I’m struggling with the cube mapping, and making each set of textures to be visible for one of the eyes only.

Would you be able to point me in the right direction, please?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_70a19d901](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_70a19d901](https://forums.unrealengine.com/u/anonymous_user_70a19d901)\
**Post date:** [December 16, 2015, 8:30am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/9 "2015-12-16T08:30:05Z")

</div>

Hi! There are more noobs out here. Did you ever figure this one out?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_72d9371a1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_72d9371a1](https://forums.unrealengine.com/u/anonymous_user_72d9371a1)\
**Post date:** [December 16, 2015, 10:41am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/10 "2015-12-16T10:41:50Z")

</div>

Thx dude 🙂

---

<div class="post-metadata">

**Author:** ![Lancelot006](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lancelot006](https://forums.unrealengine.com/u/Lancelot006)\
**Post date:** [January 17, 2016, 9:28pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/11 "2016-01-17T21:28:45Z")

</div>

Hi,

tkx for the tutorial! unfortunately i cannot find a way to connect the static mesh to the array material in the level blueprint. Its like the array material before the get cannot get targeted.

how did you do that ?

---

<div class="post-metadata">

**Author:** ![Bushey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bushey](https://forums.unrealengine.com/u/Bushey)\
**Post date:** [March 16, 2016, 10:54am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/12 "2016-03-16T10:54:47Z")

</div>

Hi @milko - did you ever get a reply to this question as I’m keen to learn how to do it also -

Cheers!

---

<div class="post-metadata">

**Author:** ![polemos](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/polemos/32/766957_2.png) [@polemos](https://forums.unrealengine.com/u/polemos)\
**Post date:** [April 1, 2016, 7:55am UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/13 "2016-04-01T07:55:44Z")

</div>

Can someone help guide me on how to get this to work for over under 3ds?

---

<div class="post-metadata">

**Author:** ![polemos](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/polemos/32/766957_2.png) [@polemos](https://forums.unrealengine.com/u/polemos)\
**Post date:** [May 18, 2016, 2:16pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/14 "2016-05-18T14:16:29Z")

</div>

Can anyone help here? I will pay pal them a hundred bucks if they can figure this out for me ASAP! message me please.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0878a78c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0878a78c](https://forums.unrealengine.com/u/anonymous_user_0878a78c)\
**Post date:** [June 30, 2016, 11:51pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/15 "2016-06-30T23:51:55Z")

</div>

how I can add the Seats and the Cinema Background?

---

<div class="post-metadata">

**Author:** ![fabian.s123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fabian.s123](https://forums.unrealengine.com/u/fabian.s123)\
**Post date:** [July 3, 2016, 7:34pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/16 "2016-07-03T19:34:26Z")

</div>

> [@wizardman;261288](#):
>
> I want to achive an effect of 3d sbs projection but within a game not as a player… and effect that can be found in oculus rift demo called insurgent. There are 3d videos sbs with actors( actores are keyed out from green screen. I tried to edit the material to achive similar effect but iam nowhere near of findg a solution could sombody point the right direction I am total noobe when comes to ue4 and its materials.  
> insurgent effect [https://www.youtube.com/watch?v=\_TyuuQJUcmk](https://www.youtube.com/watch?v=_TyuuQJUcmk)
> 
> and thats what i have so far= means nothing.
> 
> ![3ed016591867e79895efc2b3531b3923be74d66f.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/d/3ed016591867e79895efc2b3531b3923be74d66f.jpeg)

Is that a porn video you’ve got loaded up there?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0878a78c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0878a78c](https://forums.unrealengine.com/u/anonymous_user_0878a78c)\
**Post date:** [August 15, 2016, 9:16pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/17 "2016-08-15T21:16:20Z")

</div>

@wizardman

I try using your way but the line that split the screen move when I look somewhere else the line not stay as fixed line

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aaed8cac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aaed8cac](https://forums.unrealengine.com/u/anonymous_user_aaed8cac)\
**Post date:** [June 16, 2017, 1:25pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/18 "2017-06-16T13:25:50Z")

</div>

Hello,

if you want to have dedicated access to the rendered images for left and right eye using the “ScreenPosition” node in Unreal Engine 4.x you must turn off “Project Settings -\> Rendering -\> VR -\> Instance Stereo”.

At least I can confirm this with HTC Vive and Unreal Engine 4.14.3. “Instanced Stereo” was introduced in Unreal Engine 4.11 and increases the performance tremendously.

Any ideas how to avoid to turn off “Instanced Stereo” are welcomed.

Best,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aaed8cac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aaed8cac](https://forums.unrealengine.com/u/anonymous_user_aaed8cac)\
**Post date:** [June 16, 2017, 2:18pm UTC](https://forums.unrealengine.com/t/tutorial-create-a-vr-cinema-with-stereoscopic-3d-support-ue-4-5-no-c/13689/19 "2017-06-16T14:18:47Z")

</div>

Hello,

you can use ‘ResolvedView.StereoPassIndex’ in a Custom shader.  
This works with “Instanced Stereo”, too.

Check this:

> **[Stereoscopic Material in 4.13](https://forums.unrealengine.com/questions/508493/stereoscopic-material-in-413.html)**
>
> 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...

[http://blog.kiteandlightning.la/protip-ue4-selective-eye-rendering-stereo/](http://blog.kiteandlightning.la/protip-ue4-selective-eye-rendering-stereo/)

> **[VR Instanced Stereo breaks ScreenPosition material node](https://forums.unrealengine.com/questions/589242/vr-instanced-stereo-breaks-screenposition-material.html)**
>
> I need to render different textures for each eye for a stereo 3d effect. This is the simplified material: This is what it should look like in VR with Instanced Stereo On: And this is what it looks like with Instanced Stereo Off: I tested...

Best,
