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.
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.
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.
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…
Still no…
did you find a solution for this?
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.
Hey, thanks for the reply dude. I happened to actually get what I wanted in the end, as you can see here:
Sounds good, thanks! But now I want to know how do that with VR. Two cameras? And what about material in VR mode?
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.
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.
@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?
read the video description…
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.
I didn’t have access to the description when I watched it. I’ll go back and read it. Thanks!