x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to create portals like in game Portal?

Can this feature be released in Unreal Engine? But only TRUE portals (worm-holes), not a render target circle from other camera? Any ideas for this?

Thanks.

Product Version: UE 4.10
Tags:
more ▼

asked Mar 24 '16 at 09:06 PM in Rendering

avatar image

broly
564 44 64 92

avatar image DennG May 11 '16 at 07:29 AM

did you find a solution for this?

avatar image broly May 11 '16 at 07:55 AM

Still no...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first
more ▼

answered Dec 12 '16 at 12:02 AM

avatar image

Afro viking
45 2 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

https://www.youtube.com/watch?v=KulKG5zsuxQ

But I would suggest having render target circle with a trigger box on one side that teleports the player to the other side if they walk "into" the portal.

more ▼

answered May 03 '16 at 02:22 AM

avatar image

IO Labs
33 1 3

avatar image broly May 03 '16 at 06:22 AM

Thank you for answer. It's not just render target. Render target will be looks like flat "video lcd" on surface. It's not good. In Portal game scene object copied to other portal side... I think.. Probably there are no same features in UE4...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

There are several tricks to achieve that "wormhole effect", which mainly consist on changing what the render target output is depending on where the player is/is looking. The videos showcase the use of screenalignedUVs on the material, but that still requires some logic so the effect looks good.

What I ended up doing is a simpler approach (albeit not as perfect as portal). Your portal is a rendertarget mesh, connected to a SceneCapture2D component which would be the other portal or whatever you want the portal to look like. Then, calculate the angle between the player-portal vector (literally portal.position - player.position) and the normal vector of the portal surface (the forward vector). Do that for every axis (be careful because the angles we're looking for are not in 3D space but 2D - i.e XY angle, XZ angle, etc).

With that information, rotate the SceneCapture2D component (either the portal or a secondary, invisible capture object), with the angles you've already calculated.

more ▼

answered Oct 21 '18 at 11:14 AM

avatar image

guachitonico
6 1

avatar image Afro viking Oct 21 '18 at 11:32 AM

Hey, thanks for the reply dude. I happened to actually get what I wanted in the end, as you can see here: https://www.youtube.com/watch?v=j7rYvPtuEFg

avatar image broly Nov 09 '18 at 12:13 PM

Sounds good, thanks! But now I want to know how do that with VR. Two cameras? And what about material in VR mode? :)

avatar image Afro viking Nov 09 '18 at 07:05 PM

Oh man, I'm really not sure. I don't think the way I set up my portals would work because the fix for the camera frustrum clipping through the portal plane was quite dependant on an average camera set up for the first person, and the teleporting system similarly was set up entirely around an average player pawn. Sorry I can't be of more help.

avatar image lewisscrivs Feb 02 '19 at 11:30 AM

Hey for VR its not hugely difficult if your not too scared of C++ their are probably ways in blueprint but i hage no idea how youd go about doing it. What you want to do is modify the scene capture 2d to work for stereo rendering exporting two textures for left and right. Then you just have to set up the portal material as a stereo material by lerping between 0-1 depending on the device being the left or right eye. (Just search stereo material).

Finally as for the camera clipping through the portal plane, use a box with flipped normals instead of a pane and with one of the faces removed. Scale it to 0 along the axis with the open face to turn it into a pane. Now depending on when the vr headset is moving into the portal extend that box until the head is past the teleportation point then teleport when they are deeping inside for a more seemless effect, one teleporting on the same frame set the portal box back to normal.

But theres another problem like hands going through before the head, for this you just create a copy of object and place it their, you could also add some sort of stencil mask to the back of the portal also to prevent objects being seen from the other side while the player is not yet teleported.

Hope this helps.

avatar image Timothy LeBlanc Feb 21 '19 at 05:03 PM

@Afro_viking how did you do this? I want to recreate what you did in your video, but I don't know how. Do you have a tutorial anywhere?

avatar image Afro viking Feb 21 '19 at 05:06 PM

read the video description...

avatar image Timothy LeBlanc Feb 21 '19 at 05:10 PM

I didn't have access to the description when I watched it. I'll go back and read it. Thanks!

avatar image Afro viking Feb 21 '19 at 05:10 PM

No worries :) Hope you find what you are looking for. Edit: Also, there is now a superior portal system on the marketplace, so look to that for better answers possibly.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question