Search Unity

[RELEASED] Gater (Portals System)

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2016.

  1. boxhallowed

    boxhallowed

    Joined:
    Mar 31, 2015
    Posts:
    513
    Ok... So I sort of solved it. First, if your movement is on a co-routine at all, forget it. No matter what you do, no matter how you manipulate the stack, or the script execution order, the flickering WILL happen. If you put the player movement on fixed update, and do nothing special with the movement, then the flickering will not happen. The only way to guarantee no flickering, is to move the player on the portal manager script. I'm working out a way around it, so the movement script for the player waits for the fixedupdate on the portal manager before continuing or something. Not sure yet.
     
  2. boxhallowed

    boxhallowed

    Joined:
    Mar 31, 2015
    Posts:
    513
    Ah-ha, I figured out another thing that can cause it, which is completely on me. It seems if any part of your capsule gets outside of the boundary of the portal it can cause it. I had a floating point error that was causing my capsule to down-shift slightly. Once I got that cleared up, it isn't happening when I combined that fix with other fixes described above.
     
    Last edited: Oct 13, 2017
  3. Nateply

    Nateply

    Joined:
    May 20, 2014
    Posts:
    46
    @H92 FYI. This is an awesome asset! I tried it when it first came out but am having problems with more recent releases of Unity. This works on 2017.1.1f1, but not on 2017.1.2p1 surprisingly, or 2017.2.0f3 which I semi-expected might have problems. Something on Unity's end on the 2017.1 end seems to have changed. The main camera steps through the portal to immediately on the other side of it, vs to the other portal. The original FPS controller gets a numeric suffix and the gate being traveled through gets an FPS clone. I attached a screen shot, which I hope works. On the cloned FPSController, the First Person controller script is disabled as is it's camera. I know you submitted it with 2017.1.1, but just wondering if it's something minor that could be adjusted for the 2017.2 version. Thanks for making this free too!
     

    Attached Files:

  4. Deleted User

    Deleted User

    Guest

    Hi everyone.

    Version 1.3.8 has been submitted. Changelog:

    - Fixed a bug where teleport of first person controller not working.
    - Fixed a bug where list of "excluded objects from trigger" are not completely excluded from it.

    RELEASED!
     
    Last edited by a moderator: Oct 24, 2017
    Nateply likes this.
  5. Nateply

    Nateply

    Joined:
    May 20, 2014
    Posts:
    46
    1.38 works great on 2017.2.0f3 now. Thanks!
     
  6. Daahrien

    Daahrien

    Joined:
    Dec 5, 2016
    Posts:
    100
    when I try to teleport from one portal to another the fps controller gets rotated towards the exit portal on exit

    EDIT.- I fixed it
     
    Last edited: Nov 8, 2017
  7. ThermTwo

    ThermTwo

    Joined:
    Aug 29, 2017
    Posts:
    1
    Hey, any ideas on how I'd make a three-or-more-way portal? As in, walking through portal A should lead to portal B, but when I walk back through portal B, it should lead to portal C. I could probably figure it out myself with some effort, but I figure there might just be some easy way I didn't think of.

    Also, any prospects on VR support? Are there any (hacky) ways to make it (partially) work in VR? Once again, I can experiment myself, but I read there was once partial VR support, and I'm curious.
     
  8. bentschi90

    bentschi90

    Joined:
    Nov 19, 2017
    Posts:
    1
    Hey, great work that asset! Thumbs up!
    I only have one problem, I tried to change up the Portal Manager script a little to set the nearClipPlane of the camera, so that objects behind the portal are not rendered in the other portal. But I struggle to get the distance from the camera to the SceneviewRender correct.
    Can you help me with that please?

    Edit:
    Looks like its just me being stupid again. Got it working!
    I added the following
    Code (csharp):
    1. float nearClip = Vector3.Distance(ClipPlanePosObj.transform.position, PortalCamObjs[j].transform.position); //distance from ClipPlane to Camera
    2. nearClip -= Mathf.Max(GetComponent<Collider>().bounds.size.x, GetComponent<Collider>().bounds.size.y, GetComponent<Collider>().bounds.size.z)/2.0f; //remove portal size from the distance
    3. PortalCamObjs[j].GetComponent<Camera>().nearClipPlane = (nearClip < 0.001f) ? 0.001f : nearClip;
    in LateUpdate() after
    Code (csharp):
    1. ...
    2. PortalCamObjs [j].transform.localPosition = PortalCamPos [j];
    3. PortalCamObjs [j].transform.localRotation = PortalCamRot [j];
    ...before it renders to the texture.
    Maybe that helps someone else too.
    If you add this lines, you can place objects behind the portal and they are not rendered in the other portal if the objects are farther away than half the size of the portal.
     
    Last edited: Nov 19, 2017
  9. form_d_K

    form_d_K

    Joined:
    Jul 12, 2017
    Posts:
    14
    Hi! Is this able to be used for windows, tunnels, etc.? Is it possible to use an arbitrary mesh as the portal?
     
  10. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    It's working for me in the empty project, but when I try use Gater in my project it's simply don't teleport nothing. Render textures it's working, but nothing teleport, just came through. What can it be? I don't know what script may cause a conflict.
     
  11. jethrogillgren

    jethrogillgren

    Joined:
    Jan 11, 2017
    Posts:
    28
  12. HOSTOBAD

    HOSTOBAD

    Joined:
    Jan 11, 2018
    Posts:
    3
    YOU are just amazing... I really don't know how to thx you. I was searching for an asset like this since so long!!!
    And your is free! Amazing!!
    I just would advise you: change te name of the asset if you can, cuz its because of this i found it after so long time...
    Anyway, I just wanted to thx you a lot!!
     
  13. gypaetus

    gypaetus

    Joined:
    Sep 4, 2014
    Posts:
    5
    There seems to be an issue where objects passing through the portal lose their material for the fraction of a second (when the CloneObjectClipPlaneMaterial is applied to them) Is there a workaround for this?
    See before / During passthrough
    upload_2018-4-4_20-6-16.png
    upload_2018-4-4_20-6-58.png

    On Win10, Unity 2017.3.1f1 seen on the pingpong demo scene.
    Very cool asset, btw!
     
  14. Deleted User

    Deleted User

    Guest

    If I remember well, you can exclude the material change leaving clip plane material variable empty.
     
  15. Sushin

    Sushin

    Joined:
    May 2, 2015
    Posts:
    25
    Hey H92
    First of all thanks for the free tool. It's really awesome.
    I'm having an issue I'm not sure what to do with that occurs with my custom character controller.



    I haven't changed anything from the portal and it works fine with the standard FPS controller. It just seems like it's not teleporting the player at the right time or something like that. If it matters, my player character has a "neck" and a "head" that the camera is attached to and they offset the camera based on the mouse movement.
     
  16. Deleted User

    Deleted User

    Guest

    You can't use something different from FixedUpdate on your FPSController.

    This bug happen when the walk of a character it's "more fast" (not in terms of speed but in fluidity) then portal render.
     
  17. Sushin

    Sushin

    Joined:
    May 2, 2015
    Posts:
    25
    I made sure everything was using FixedUpdate on the controller but the problem seems to still be happening. It doesn't seem to be based on delay but rather positioning.

     
  18. Deleted User

    Deleted User

    Guest

    Surely is a problem of your custom Controller (or your further Gater code in the case).

    Try to recreate it, keeping attention to FirstPersonController and MouseLook scripts.

    There are some lines that can't be
     
  19. Sushin

    Sushin

    Joined:
    May 2, 2015
    Posts:
    25
    I recreated it in your test scene without modifying any original code.
    Turn off head bob on the controller and offset the player camera to Z = 2 or something.

    upload_2018-4-6_18-59-32.png

    That's not what my player controller is doing exactly, but the result is identical. I guess there's no easy work-around for this?
     
    Last edited: Apr 7, 2018
  20. Deleted User

    Deleted User

    Guest

    I don't know, I never tried to port something different from Unity FPS Controller.
     
  21. InGameGames

    InGameGames

    Joined:
    Mar 3, 2018
    Posts:
    33
    Would it be possible to map one of these portals to the outside face of a dome rather than a circle that you can traverse or put things through?
     
  22. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    105
    Since installing your asset, I cannot drag and drop ANY thing into the scene window. Nothing- not a prefab, not a texture, nothing.

    Please help, ASAP.

    I uninstalled your asset, but I still cannot bring anything into my scene.

    There in nothing in the console- no errors.

    I just can't bring anything into my scene...

    And this started, the moment I brought in your asset.

    Please help, ASAP.
     
  23. Daahrien

    Daahrien

    Joined:
    Dec 5, 2016
    Posts:
    100
    are sure you're in the scene view? and not in a game view?
     
  24. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello,

    Did you came acroos this Problem (which I am currently facing), too:

    In my game I have huge Levels (procedurally generated) about 6000x6000 meter large and 0-255 meters high.

    I have some "Magic Portals" which are all over my land, if I enter one, I get to the next one in line, this Maybe far away.

    As Long as I am running around in my lad, everything is beautiful!

    As soon as I enter and use a Magic Portal, this one just changes my Player transform position, every shadows starts to "flicker" extremly. From now on if I move camera / Player, every shadow is toggling on / off and flickering very fast.

    Any idea where this Comes from, did you have the same?

    I already changed camera near and far plane after I found some thread in the Forum, but that did not help.
    I changed shadow Quality but also theis does not seem to help.

    Did you get the same problem? Any hint for me?

    Thanks a lot :)
     
  25. EBhero

    EBhero

    Joined:
    Jan 15, 2017
    Posts:
    2
    Hi there @H92 !

    I have a strange bug when using your asset.

    When one of the portals has a different rotation, the FPS controller gets rotated to the rotation when entering when exiting a portal.

    Otherwise the portals work seamlessly.

    Example using the FPS scene:
     
  26. erbcalb

    erbcalb

    Joined:
    Feb 20, 2019
    Posts:
    1
    Hi, I'm not sure if it's because this package is almost 3 years old or I'm just dumb, but the FPS Controller from the Standard Assets package won't teleport. It'll go to the portal, but it'll just pass right through. I tried tying the camera to a cube (mainly in the falling cubes demo) and it moves but it has a noticeable jump. Any help would be appreciated, thanks!
     
  27. CatsLover

    CatsLover

    Joined:
    Feb 11, 2019
    Posts:
    2
    I can confirm that teleportation of player doesn't work (tested in demo scenes).
     
    Last edited: Mar 12, 2019
  28. CatsLover

    CatsLover

    Joined:
    Feb 11, 2019
    Posts:
    2
    Also objects lose their materials in the portal as mentioned by @gypaetus (tested in the demo scenes). Leaving the clip plane material field empty as suggested doesn't solve it.

    Has anyone found a fix for this?
     
  29. adambkehl

    adambkehl

    Joined:
    Nov 30, 2016
    Posts:
    4
    Just published a game using Gater Portals! https://adambkehl.itch.io/penumbra


    TONS of weird quirks and stuff to note before using this in your game (I'm using Unity 2017):
    • If the player's speed is too high while passing through a portal, there is a likelihood the portal will mis-teleport and the player will fall through the ground and out-of-bounds. I can replicate this consistently.
    • Or the player will travel through the initial portal and hit the next object behind. Lowering the max speed fixes this. This is more a physics problem than with Gater itself.
    • When travelling through a portal a barely audible "blip" is heard if there's audio in the scene.
    • If two portals are placed too far apart, the player must be within a certain distance of the first one before the second one starts rendering. Therefore the portal remains black until you're close enough. (You can see this in the forest area as you turn the corner in my game). The portals are about 200 meters apart. Close together and they're fine.
    • Sometimes the player camera will "jump" up a meter and flash back down. There are a few playthroughs with people who have had this minor issue.
    • If you fly too far away from a portal in the editor view, the portal cameras' view distance will accommodate and NOT update again, resulting in the cameras 1 and 2 having view distances of 100,000+ and crashing the editor. Solution is to close the scene view tab and then click the portals objects and adjust the view distance. I also added code to set the view distance forcefully via the inspector.
    • Portals seems to be always rendering, and this gets expensive after 3+ portals. Adding code to have portals not start as rendered objects and turning them on only when absolutely necessary fixed this. You can trigger the integrated render boolean via other scripts and this stops the portal from rendering as well.
    • Portals can only be facing a total of two directions to work as intended. Even at 180 degrees apart there's only one orientation that works. (I may have broken it, or Unity did, but it shouldn't be too hard to fix manually)
    • Portals MUST initialize on start. Have them start, then turn them off with the render boolean. They HAVE to be active in order to pair nicely.

    TIPS:
    • Lower the resolution until it looks good. Now lower it again by half. Portals are really expensive! Especially if you're using the post-processing behavior.
    • Clip the portal edges into the object border by like 0.05 to stop the white edges.
    • Turn them off when they aren't needed. Not by setting then inactive, but via rendering. (Or just destroy them)
    • Moving them works very nicely. The beginning of my game starts the portals up but puts it 20 meters away. Then when it triggers, it moves it into position. Disabling rendering won't disable the collider trigger.


    Am I complaining? No. This asset is free and provides a beautiful effect.

    Granted, if you know what you're doing, you can probably fix the orientation issue and optimize it more than I did. Other than that, just pay for a different solution if you need portals for something commercial. I'll be trying other portal solutions on this store but if nothing else works, Gater is still a viable option as it's mostly small bugs and things that can be manually fixed and optimized.

    Hope this helps!!
     
  30. Deleted User

    Deleted User

    Guest

    Hi everyone.

    How could you guess, the Gater project has stopped for a long time (a lot). However I bring you a good news:

    A new version compatible with Unity 2019.2.3 is in revision state on the store.

    That's all for now. Regards. :)
     
    Last edited by a moderator: Aug 28, 2019
    adambkehl, id0 and hopeful like this.
  31. Deleted User

    Deleted User

    Guest

    Hi.

    Honestly I prefer to keep this project free and open source. My presence in this forum and in general on the Unity editor has become much less frequent (a bit for personal problems and a bit for the complexity in keeping the code clean enough to avoid bugs).

    At this point I would evaluate the creation of a github page, so as to make everyone participate in the improvement of this project. ;)

    My best regards (and good luck for your game :)).
     
    Last edited by a moderator: Aug 28, 2019
    zyzyx, adambkehl, id0 and 1 other person like this.
  32. Deleted User

    Deleted User

    Guest

    Hi to everyone (again :D).

    Today I created the public Github page mentioned in the previous comment (obviously with the latest version of Gater compatible with Unity 2019.2.3). This is the link:

    https://github.com/Oizaro/Gater-Portal-System-

    I hope you appreciate the choice and find it useful to make Gater better :).

    P.S = Contributor names will be added to the readme file.
     
    id0 and f0ff886f like this.
  33. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    Thank you. Really, thank you very very much. This is an awesome contribution!
     
  34. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    Why is all the portal stuff disappearing from the internet?

    Portal Kit Pro vanished too and loads of other projects. Anyone know of anything new ?
     
  35. EBhero

    EBhero

    Joined:
    Jan 15, 2017
    Posts:
    2