Announcement

Collapse
No announcement yet.

Simple Portals

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Good point, but anyway, portals texture must be filtered additionally. Ideally in the same way as original scene.

    Leave a comment:


  • replied
    Friend, have you tried to turn off the Motion Blur and Use the FXAA instead of TemporalAA,I tried this and the portal looks more smooth now.

    Click image for larger version

Name:	Settings.PNG
Views:	111
Size:	84.2 KB
ID:	1729610

    Leave a comment:


  • replied
    Originally posted by redbox View Post

    Hello.
    This is basic behavior of portal functions. How vectors converted into portal space and from it.
    Here is PortalConvertDirection

    ...

    and PortalConvertLocation fuctions

    ...

    It using TransformDirection, InverseTransformDirection, TransformLocation and InverseTransformLocation functions that includes scale in new transform calculations.
    There are their analogs in C++ that not using scale.

    Additionally, player character handles teleportation itself.
    Blueprint'/Game/GameMode/FirstPerson/BP_FirstPersonCharacter.BP_FirstPersonCharacter'
    In function TeleportationAdvanced you can find how it changes self velocity, location, rotation and scale according to portal parameters.
    Well, it is very basic example of how it should be handled, but I hope you will find it useful.

    Redbox - Well I feel pretty stupid, it was staring me in the face the whole time. I'd completely forgot that transforms had scale built in. Thank you for taking the time to explain as well as the recent project update.

    Leave a comment:


  • replied
    Update 02/02/2020

    Hello again.
    Because UE wiki is dead, I've uploaded this project to github.

    New project location:
    https://github.com/redcatbox/Portals

    New wiki (github):
    https://github.com/redcatbox/Portals/wiki/Overview

    This is final version of everything I had done in it with blueprints + partially migrated to C++ as plugin. But only partially.
    If you need to use BP version only, just remove
    - Plugins
    - Source
    - SimplePortals.uproject_cpp_bkp

    Last edited by redbox; 02-03-2020, 12:35 PM.

    Leave a comment:


  • replied
    Originally posted by soylent_me View Post
    Awesome work!



    Where is this functionality in the BPs? I'd like to adjust how the portals handle scaling and am having a hard time teasing out the dependencies.
    Hello.
    This is basic behavior of portal functions. How vectors converted into portal space and from it.
    Here is PortalConvertDirection



    and PortalConvertLocation fuctions



    It using TransformDirection, InverseTransformDirection, TransformLocation and InverseTransformLocation functions that includes scale in new transform calculations.
    There are their analogs in C++ that not using scale.

    Additionally, player character handles teleportation itself.
    Blueprint'/Game/GameMode/FirstPerson/BP_FirstPersonCharacter.BP_FirstPersonCharacter'
    In function TeleportationAdvanced you can find how it changes self velocity, location, rotation and scale according to portal parameters.
    Well, it is very basic example of how it should be handled, but I hope you will find it useful.

    Last edited by redbox; 02-03-2020, 02:45 AM.

    Leave a comment:


  • replied
    Awesome work!

    Portal actor:
    - Portals supports any scaling for basic portals math functions.
    - Portals supports uniform scaling for rendering portal view.
    Where is this functionality in the BPs? I'd like to adjust how the portals handle scaling and am having a hard time teasing out the dependencies.

    Leave a comment:


  • replied
    Originally posted by FreshDumb View Post
    Hey,

    Really nice tutorial you made there.
    Used it in a project and got it to work pretty fast.

    The only problem i encountered is that when you package the project the Portals don't work any more and i didn't find anything about that in the thread or in tutorials.
    First i thought the problem was in my implementation, but when i try packaging your example project, it produces the same bug.

    Any idea why that may be happening and how i could try to fix it?

    Edit: I didn't really explain what i mean properly i now notice.
    And the Problem also occurs in Standalone mode. The portals show the wrong material and the console doesn't show errors. It shows only the beige kind of material you see in the browser.

    Edit2: Actually found the fix myself, so posting it here to maybe help someone encountering it too. redbox Maybe it is of help to you too.
    In the BP_BaseRenderSurface class, in the function InitSceneCapture you get the Viewport size as a Vector2D. But when the project is packaged or in standalone mode, this function returns 0 because it is executed before the HUD is even registered to the Viewport.
    First of all i changed the function to reference the owning player controller to always get the correct viewport and secondly i made the class delay 0.5 seconds before initializing to make sure the Viewport ist registered correctly. Then everything works perfectly.
    Hope this helps someone as it was a pretty big pain to find, but i am also pretty new to Unreal and find debugging packaged and standalone pretty tedious. :P
    thank you!

    Leave a comment:


  • replied
    FreshDumb , great work on fixing this! Thank you.

    Leave a comment:


  • replied
    Hey,

    Really nice tutorial you made there.
    Used it in a project and got it to work pretty fast.

    The only problem i encountered is that when you package the project the Portals don't work any more and i didn't find anything about that in the thread or in tutorials.
    First i thought the problem was in my implementation, but when i try packaging your example project, it produces the same bug.

    Any idea why that may be happening and how i could try to fix it?

    Edit: I didn't really explain what i mean properly i now notice.
    And the Problem also occurs in Standalone mode. The portals show the wrong material and the console doesn't show errors. It shows only the beige kind of material you see in the browser.

    Edit2: Actually found the fix myself, so posting it here to maybe help someone encountering it too. redbox Maybe it is of help to you too.
    In the BP_BaseRenderSurface class, in the function InitSceneCapture you get the Viewport size as a Vector2D. But when the project is packaged or in standalone mode, this function returns 0 because it is executed before the HUD is even registered to the Viewport.
    First of all i changed the function to reference the owning player controller to always get the correct viewport and secondly i made the class delay 0.5 seconds before initializing to make sure the Viewport ist registered correctly. Then everything works perfectly.
    Hope this helps someone as it was a pretty big pain to find, but i am also pretty new to Unreal and find debugging packaged and standalone pretty tedious. :P
    Last edited by FreshDumb; 05-16-2019, 04:49 AM.

    Leave a comment:


  • replied
    Originally posted by Fatorice View Post
    Hello!
    Thanks for sharing your project, really awesome! But I figured out, that there's a issue when you watch through a portal, which also watches a portal... Is there a possibilty to fix it?
    For example:
    |
    Portal 1 Portal 3
    |

    |
    Portal 2 Portal 4
    |

    The "|" is the Direction of the Portal. And Portal 2 is connected with Portal 4, Portal 1 with Portal 3. When I watch through Portal 2, I don't see whats infront of Portal 1, I see whats infront of Portal 3, but in the opposite Direction.

    Thank you!
    Hello.
    If you'd read wiki article, you should notice this case in Limitations section.

    It is impossible to show one portal from one pair in another portal from different pair correctly, because all portals calculate their views according to player camera world position. So, portals always "think" that you look at them through player camera. Portal doesn't know that you look at it through another portal or another camera.




    Leave a comment:


  • replied
    Hello!
    Thanks for sharing your project, really awesome! But I figured out, that there's a issue when you watch through a portal, which also watches a portal... Is there a possibilty to fix it?
    For example:
    |
    Portal 1 Portal 3
    |

    |
    Portal 2 Portal 4
    |

    The "|" is the Direction of the Portal. And Portal 2 is connected with Portal 4, Portal 1 with Portal 3. When I watch through Portal 2, I don't see whats infront of Portal 1, I see whats infront of Portal 3, but in the opposite Direction.

    Thank you!

    Leave a comment:


  • replied
    Originally posted by cyclopsys View Post
    Has anyone created a VR portal? Any tutorials out there?
    Check FTC Free Portal Mechanics thread https://forums.unrealengine.com/comm...rtal-mechanics

    Leave a comment:


  • replied
    Has anyone created a VR portal? Any tutorials out there?

    Leave a comment:


  • replied
    Thank You, Redbox

    Leave a comment:


  • replied
    Update 19/07/2018

    Somewhere after release of UE4.19, I noticed that mirrors works incorrectly - they become flipped on Z axis.
    It looks that scene capture components no longer supports negative scale. Also I have done few improvements, so here is a new version of example project.

    Project files on google drive
    https://drive.google.com/open?id=1QF...7ioSvxz6qsyJSo

    Example project:
    1. Fixed mirrors material.
    2. Added base class “BP_BaseRenderSurface” for all provided actors. It contains basic functions for initialization of scene capture, optimization checks and so on.
    3. Fixed rendering lag for Mirrors and Portals. Thanks to FTC and his Free Portal Mechanics (https://forums.unrealengine.com/comm...rtal-mechanics)
    4. Added “BPC_SurfaceTracing” component, to hold portals recursive tracing functions.
    5. Added new example materials, with distance fade instructions for rendering optimizations.

    Wiki page:
    For now, Wiki is disabled for editing due to upgrade process. When it’s done, I will update wiki page according to fixes and improvements in example project.

    Leave a comment:

Working...
X