# Free Portal Mechanics

**URL:** <https://forums.unrealengine.com/t/free-portal-mechanics/93215>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [May 29, 2017, 2:17pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215 "2017-05-29T14:17:34Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![FTC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FTC](https://forums.unrealengine.com/u/FTC)\
**Post date:** [May 29, 2017, 2:17pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/1 "2017-05-29T14:17:34Z")

</div>

I wrapped up all the different portal tests I did so far into one plugin and project:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/4/48457f05c36a46a4fb770574feee9f08d7e326ed.jpeg "Free Portal Plugin") ](https://www.youtube.com/watch?v=IcHTAEF5Eoc)

You can get the whole project here:

> **[GitHub - FreetimeStudio/PortalPlugin: A collection of portal mechanics. This...](https://github.com/FreetimeStudio/PortalPlugin)**
>
> A collection of portal mechanics. This repository might occasionally be updated but there is generally no support for it. - GitHub - FreetimeStudio/PortalPlugin: A collection of portal mechanics. T...

It’s a collection of my tests, tidied up, but not very much documented. Since a lot of people have asked me many times to do it: Here it is! I released it under MIT license so you can do with it what you want. There will be no dedicated support, though.

I want to give thanks to:  
AgentMilkshake1 for laying the groundwork in getting a screen space projection for VR.

> **[Screenspace Portal's on VR](https://forums.unrealengine.com/questions/234597/screenspace-portals-on-vr.html)**
>
> Hi Everyone, I am trying to create a portal system for use on VR, but have come across issues with the way that it renders. Currently I have a SceneCapture2D component that renders a view to a 1920x1080 render texture. Using screen space UV’s, this...

Andrew Hurley for explaining how to get a left/right vr mask into a material

> **[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...

Kind Regards

---

<div class="post-metadata">

**Author:** ![Magneto](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/magneto/32/88717_2.png) [@Magneto](https://forums.unrealengine.com/u/Magneto)\
**Post date:** [May 30, 2017, 6:01pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/2 "2017-05-30T18:01:09Z")

</div>

Cool. I don’t have a need for this but nice work!

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [May 31, 2017, 8:52am UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/3 "2017-05-31T08:52:48Z")

</div>

Nice work @FTC!

---

<div class="post-metadata">

**Author:** ![dorklord\_666](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dorklord\_666](https://forums.unrealengine.com/u/dorklord_666)\
**Post date:** [July 7, 2017, 9:35pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/4 "2017-07-07T21:35:44Z")

</div>

Hi FTC. Wow thanks for upload. Super excited to give it a shot. Real quick question, is the plugin compatible with 4.16?  
thanks

---

<div class="post-metadata">

**Author:** ![JonathanCDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanCDev](https://forums.unrealengine.com/u/JonathanCDev)\
**Post date:** [July 12, 2017, 4:03am UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/5 "2017-07-12T04:03:43Z")

</div>

im getting a Missing or Incompatible modules in PortalPlugin plugin. says ‘ExampleDeviceProfileSelector’ failed to looad because Module ‘ExampleDeviceSelector’ could not be found.

---

<div class="post-metadata">

**Author:** ![Y\_Y\_X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Y\_Y\_X](https://forums.unrealengine.com/u/Y_Y_X)\
**Post date:** [July 14, 2017, 7:29am UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/6 "2017-07-14T07:29:19Z")

</div>

VR mode, the edge will have to wear a lens~？？？？

---

<div class="post-metadata">

**Author:** ![Y\_Y\_X](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Y\_Y\_X](https://forums.unrealengine.com/u/Y_Y_X)\
**Post date:** [July 14, 2017, 7:31am UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/7 "2017-07-14T07:31:40Z")

</div>

Can this solve?

 ![QQ截图20170714153009.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/e/aef739bb96dd30875dd4f179c8104569ffd5f30a.png)

---

<div class="post-metadata">

**Author:** ![Pine722](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pine722/32/88715_2.png) [@Pine722](https://forums.unrealengine.com/u/Pine722)\
**Post date:** [July 19, 2017, 8:48pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/8 "2017-07-19T20:48:19Z")

</div>

Thank you for sharing this FTC, but is there a way you could get it released on the marketplace for free, besides having to get it from Github? Thank you.

---

<div class="post-metadata">

**Author:** ![xN31](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xN31](https://forums.unrealengine.com/u/xN31)\
**Post date:** [August 8, 2017, 4:48pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/9 "2017-08-08T16:48:52Z")

</div>

Great work! Is there a way to configure the VR portals to be simple planes instead of volumes?

---

<div class="post-metadata">

**Author:** ![dorklord\_666](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dorklord\_666](https://forums.unrealengine.com/u/dorklord_666)\
**Post date:** [September 14, 2017, 10:11pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/10 "2017-09-14T22:11:13Z")

</div>

Hey. Getting the same issue as Y\_Y\_X where the FOV is off. Reminds me of how planar reflection in VR is sort of off until you add a 10-15 degree FOV in the settings.

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [October 21, 2017, 5:24pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/11 "2017-10-21T17:24:55Z")

</div>

Just wanted to say that this is really cool and well done!  
It is probably the first implementation of 2d portals that works as expected apart from the VR mode edge material problem when you’re close to the portal. Thanks for putting this together, there are quite a few use cases for something like this!

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [October 21, 2017, 6:18pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/12 "2017-10-21T18:18:19Z")

</div>

> [@Y\_Y\_X\_](#):
>
> Can this solve?
> 
> ![QQ截图20170714153009.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/e/aef739bb96dd30875dd4f179c8104569ffd5f30a.png)

Just realized what causes that: the capture component FOV is too low (I think it’s the default 90 Degrees?) If you up the capture component FOV to 130 degrees you won’t have those edge problems at the cost of lower resolution. This can be implement via blueprint e.g.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/5/0658f72297c71757183c4505009de80aa5ba60fc.png)  
That said this fov will vary with HMDs in the future so a complete solution would likely need to be done in the c++ layer, probably adjusting it somewhere here: [https://github.com/FreetimeStudio/PortalPlugin/blob/master/Plugins/PortalPlugin/Source/PortalPlugin/Private/PortalFunctionLibrary.cpp#L89](https://github.com/FreetimeStudio/PortalPlugin/blob/master/Plugins/PortalPlugin/Source/PortalPlugin/Private/PortalFunctionLibrary.cpp#L89) this would also likely fix the portal/hmd fov mismatch that currently exists (notice how the portal floor doesn’t appear to align with the perspective of the floor outside).

Another good addition would be an easy way to specify the resolution of the portal being captured to compensate for loss in resolution or to be able to dynamically adapt to heavy scenes while maintaining a good framerate.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a73d3322](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a73d3322](https://forums.unrealengine.com/u/anonymous_user_a73d3322)\
**Post date:** [March 20, 2018, 9:25am UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/13 "2018-03-20T09:25:48Z")

</div>

Can’t launch apart from play on the editor

---

<div class="post-metadata">

**Author:** ![Juangea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Juangea](https://forums.unrealengine.com/u/Juangea)\
**Post date:** [May 7, 2018, 9:17pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/14 "2018-05-07T21:17:25Z")

</div>

How can I use it in my project? It says binaries are not compatible 😛 (4.19)

---

<div class="post-metadata">

**Author:** ![Juangea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Juangea](https://forums.unrealengine.com/u/Juangea)\
**Post date:** [May 13, 2018, 11:18pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/15 "2018-05-13T23:18:48Z")

</div>

OK, I solved the binaries problem, but I have another problem now, I don´t understand how to force the pawn to be teleported when it enters into the detector, also… is there a way to increase the portal capture resolution?

---

<div class="post-metadata">

**Author:** ![Sorrien](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sorrien](https://forums.unrealengine.com/u/Sorrien)\
**Post date:** [May 17, 2018, 10:35pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/16 "2018-05-17T22:35:24Z")

</div>

Has anyone had any luck with linking two portal rooms? The teleportation works, but the rendering does not.

---

<div class="post-metadata">

**Author:** ![jinzay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jinzay](https://forums.unrealengine.com/u/jinzay)\
**Post date:** [August 22, 2018, 5:38pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/17 "2018-08-22T17:38:57Z")

</div>

> [@](#):
>
> _Please Help porting to 4.19/4.20. Amazing work! Will post the plugin if i manage to port it myself_

Ok it was easy. Just switch the UE version on a fresh downloaded project. As soon as the project files are generated it gets harder to switch the version.

---

<div class="post-metadata">

**Author:** ![Snowbro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Snowbro](https://forums.unrealengine.com/u/Snowbro)\
**Post date:** [May 7, 2019, 6:33pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/18 "2019-05-07T18:33:48Z")

</div>

Hello, sorry if I revive this ancient topic.

I have tried the VR portal and it seems to have distortion, is this normal? I am running it on 4.22, on 4.18 it will crash.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8987ab27](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8987ab27](https://forums.unrealengine.com/u/anonymous_user_8987ab27)\
**Post date:** [June 16, 2019, 1:28pm UTC](https://forums.unrealengine.com/t/free-portal-mechanics/93215/19 "2019-06-16T13:28:21Z")

</div>

What engine version is used for these 3d portals?? I am working in 4.20. Thanks
