Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Gater (Portals System)

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

  1. Deleted User

    Deleted User

    Guest

    Hi everyone.

    My asset Gater has been released for free on GitHub.

    This package allow you to create a Physically-Correct portals, like in famous Valve's game.
    These can be walked through by (included) last Unity FPS Character Controller.

    Features:
    • Works with Unity Personal/Pro
    • The portals resolution it's realtime adjustable in edit/game mode
    • The projection plane of portals can be viewed splitted in edit/game mode
    • The projection plane support recursion (portal in portal effect)
    • Works with a custom based Unity 5 first person controller
    • No camera glitch/artifacts during walk between portals
    • The objects that pass through the portals, are not replaced by theirs clones
    • The objects with rigidbody component, can pass through the portals without physics issues
    • The objects with mesh components, can pass though the portals without rendering issues
    • The objects with mesh components, will be cut once passed through the portals
    • Skybox of every portal can be customized for better representing the various scenario
    Relevant notes: In order teleport objects successfully, make sure that teleported objects do not contain "Clone" or their HashID inside name.

    Github Link
     
    Last edited by a moderator: Sep 5, 2019
  2. FreakForFreedom

    FreakForFreedom

    Joined:
    Jan 22, 2013
    Posts:
    156
    Wow, works really really good... and I can't believe it's for free. You, sir, are awesome! Thanks a bunch for this amazing asset!
     
    hopeful and Deleted User like this.
  3. Deleted User

    Deleted User

    Guest

    Hi everyone.

    Version 1.0.1 has been submitted. Changelog:

    - "Gate Manager" script has been improved (warning on "Exc" variable has been removed).
    - Example scene "Objects fall" has been fixed.

    RELEASED
     
    Last edited by a moderator: Apr 10, 2017
    hopeful and BackwoodsGaming like this.
  4. Deleted User

    Deleted User

    Guest

    Hi everyone.

    I'm writing to inform you that I am currently working on version 1.1, which should implement all, or a part of following features:

    - Third person controller adapted for portals.
    - 2D portals projection.
    - A system for disabling collision with a rear portals walls.
    - A system for change projection plane camera (for function in LateUpdate).
     
    Last edited by a moderator: Apr 10, 2017
    montyfi, Lohrion and MirzaBeig like this.
  5. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    I think you should change the title to reflect what this does. That is, a free asset to create physically-correct portals like those in Valve's game..."Portal". I can't believe I almost missed out on this gem because of the title!

    I worked on something similar almost a year ago, but never got around to implementing proper physics, and the performance was terrible. Going to try this out right now!!
     
    Deleted User and hopeful like this.
  6. Deleted User

    Deleted User

    Guest

    Done :D
     
    MirzaBeig likes this.
  7. Deleted User

    Deleted User

    Guest

    Hi everyone.

    Version 1.1.0 has been submitted. Changelog:

    - Debug mode has been removed.
    - It's now possible customize the portal recursion (that still not is a portal in portal) with a material.
    - It's now possible manually changing the portal camera projection, from perspective to ortographic and vice versa.
    - It's now possible disabling one or multiple walls behind portal.
    - It's now possible choose another camera, for generate the needed projection plane for portal mesh.

    RELEASED

    P.S = About the third person controller, its development will take longer. Then if I will be able to create one that works well, I will inform you.
     
    Last edited by a moderator: Apr 10, 2017
    MirzaBeig likes this.
  8. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    Development seems to be coming along nicely. Awesome work!
     
    Deleted User likes this.
  9. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Granted, the vague name made me click on the link, but... put the word portal somewhere in there. Oh wait, this has nothing to do with alligators... but... gates. I get it now. Gate as an action; thus, Gater, like portals. Funny.
     
    Deleted User likes this.
  10. endpuppet

    endpuppet

    Joined:
    Mar 6, 2015
    Posts:
    3
    hello!

    I love this asset and the fact that it is free...
    but I get this after importing standard character asset from unity...

    Assets/Standard Assets/Characters/FirstPersonCharacter/Scripts/HeadBob.cs(23,23): error CS1502: The best overloaded method match for `UnityStandardAssets.Utility.CurveControlledBob.Setup(UnityEngine.Vector3, float)' has some invalid arguments

    Is this a problem with unity 5.4 beta or something else?
    Should I use a custom controller?

    Have I missed something else?

    Thank you in advance :)
     
  11. Deleted User

    Deleted User

    Guest

    Yes, you must use the custom character controller included in the package.
     
    endpuppet likes this.
  12. endpuppet

    endpuppet

    Joined:
    Mar 6, 2015
    Posts:
    3
    oh... thank you very much.
    Another question if I may. Everything is working but I still get errors which can be cleared but are annoying:(

    PlayerSettings Validation: Requested build target group (16) doesn't exist; #define symbols for scripting won't be added.

    Also can I put effects on gater's cameras? I would try it but I'm not at home so I would really be thankfull for your help.
     
  13. Deleted User

    Deleted User

    Guest

    This error occurred on GateManager script?

    P.S = Yes you can put effects on it, every camera is inside portal (portal is the parent).
     
    endpuppet likes this.
  14. nosyrbllewe

    nosyrbllewe

    Joined:
    Oct 18, 2012
    Posts:
    182
    I am so glad I found this. I clicked here thinking that you misspelled "Gator," but I am so happy that it turned out to be a portal system instead.
     
    Deleted User likes this.
  15. Deleted User

    Deleted User

    Guest

    I know, even if gater derive from gates, instead suggests the alligators :D
     
  16. endpuppet

    endpuppet

    Joined:
    Mar 6, 2015
    Posts:
    3
    I started a new project to test it and I imported only gater... then it gave this error. So right now I created a second test project and now there are no errors and everything works. In both cases I used the same Gater asset, the first time I imported from ineditor asset store tab and the second time I imported directly from project creation screen. That is the only difference :) My guess would be it was a unity bug.

    Also the 3 falling boxes example is so cool...

    So sorry for bothering you and again thank you for the replies and this superb asset.

    p.s.
    What are the actual limitations?
    Could the gates be moved at runtime?
    VR is a no-go but does that mean it is impossible or just really hard? :)
     
    Last edited: May 1, 2016
    Deleted User likes this.
  17. Deleted User

    Deleted User

    Guest

    No problem. And yes, also I think that is a bug, at the end is always a beta version :D

    P.S = All actual limitations are listed in the documentation. As regards the VR, is a current implementation problem of Unity ( https://feedback.unity3d.com/suggestions/full-control-of-vr-rendering-api ), so before work on an adaptation there must be at least a fix. The only complicated feature to implement is the portal recursion (infinite portal effect), for which I have only found a temporary solution (a customizable shader).
     
    Last edited by a moderator: May 1, 2016
  18. jelmertje

    jelmertje

    Joined:
    May 2, 2016
    Posts:
    9
    Hi, I've been trying to test this out for a bit now, but I just can't seem to get the teleport to function.

    The example scene's work perfectly, and I've been trying to set up my own scene the same way.
    I can look through the portals just fine, I see what's on the other side, of the other portal. But when I walk through, I don't teleport, I just walk through to the other side of the portal I stepped in.

    I am trying to use the square portals.

    What am I missing?

    Thanks in advance,
     
  19. Deleted User

    Deleted User

    Guest

    Have you read and followed the relevant note?
     
  20. jelmertje

    jelmertje

    Joined:
    May 2, 2016
    Posts:
    9
    Yeah I have, the problem seems to be the square portals.

    After trying the same thing with the circle gates, I found no problem.

    The teleport doesn't trigger with the square gates.
     
  21. Deleted User

    Deleted User

    Guest

    In this case the fast way is comparing the both types of portal, and verify that the settings are the same (waiting for 1.1.1 version, which will correct these minor problems).
     
  22. jelmertje

    jelmertje

    Joined:
    May 2, 2016
    Posts:
    9
    I have found the issue with the square portals.

    The problem is that the script requires a mesh convex collider, but the mesh that is provided (custom Quad) is just a flat surface. This is technically not considered a mesh convex.

    I've been trying to fix this myself, but I am afraid I'm not very good with Unity. I can import another mesh to apply, but I haven't been succesful in getting it to match the frame.

    I'm also hoping to build a custom shape portal, so I was wondering what the requirements were for the meshes that I import.

    This is how far I've gotten so far:

    I created an emty game_object and applied the script.
    I assigned a custom mesh (arched doorway) to mesh filter.
    After rotating and scaling I got a portal that didn't teleport me, and also the 'inside' of the portal was upside down.

    I can't seem to figure out how to rotate the portal, but not the mesh.
     
  23. Deleted User

    Deleted User

    Guest

    Don't worry, I'm currently working on 1.1.1 update. :)
     
    hopeful likes this.
  24. Deleted User

    Deleted User

    Guest

    Hi everyone.

    Version 1.1 has been submitted. Changelog:

    - Added example fps scene with square portals.
    - Fixed a bug where square portal prefabs doesn't teleport objects.
    - It's now possible to choose a custom portal collider.

    RELEASED
     
    Last edited by a moderator: Apr 10, 2017
  25. jelmertje

    jelmertje

    Joined:
    May 2, 2016
    Posts:
    9
    I have now almost succesfully created my own custom gate, with one problem.

    I can see perfectly through one side of the gate, but the teleport triggers only when I approach the gate from the other side...

    I can't seem to figure out how to switch this around.

    The new square portals work perfectly though!


    EDIT: I have managed to fix it, the problem lied with the fact that the mesh I exported out of maya was rotated 180 degrees around the y-axis. The teleporter didn't trigger on the wrong side, the view was on the wrong side.

    Now I only have 1 minor glitch left, when I walk through the portal I see what's on the other side of it for a split second before the teleport triggers.

    EDIT2: Fixed that too :), same kind of problem as with the rotation.
     
    Last edited: May 5, 2016
    Deleted User likes this.
  26. KoLYA_PSS

    KoLYA_PSS

    Joined:
    Aug 14, 2013
    Posts:
    3
    Hi, When I tried this project I had some problems. I set my portals in the wall, and when i look in the portals i see this wall behind and my character can't going through this portals, but when i came very close to portal i can see through portals but still i can't going through. When i replaced portals not in the wall i can see what's on other side and i can going through this portals, but i want set portals in the wall.
    Could you help me please, i will be grateful
    Снимок экрана (17).png Снимок экрана (18).png
     
  27. Deleted User

    Deleted User

    Guest

    When you want to place a portal in the wall, you have to be careful to not hide them too behind the wall, or you will can't see anything. The same is true for the collider, If the plane is too hidden, the collision can not happen (unless you do not change current collider with a box collider, with a thickness suitable for the purpose, in this case you should wait for the 1.1 version).
     
  28. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    Any thoughts on getting this working with UFPS? I think it's a superior first-person plugin, but there's a lot of moving parts to it. Combining its functionality with your plugin would be fab!

    g
     
  29. Deleted User

    Deleted User

    Guest

    Not at moment i'm afraid. :-\
     
  30. soruse

    soruse

    Joined:
    Dec 18, 2012
    Posts:
    3
    At the beginning I would like to write the asset is amazing! We are very glad that you did it and I have a question. Is it possible to control the amount of reflections in reflection when I set portals opposite each other?
     
  31. Deleted User

    Deleted User

    Guest

    Currently you can't create a reflection in the reflection ( I'm still in searching of a way to obtain this :( ), but you can add in its place a custom material (a noise, a gradient or other. Like on deprecated asset "Portalizer").
     
  32. soruse

    soruse

    Joined:
    Dec 18, 2012
    Posts:
    3
    It is a pity that I can not already do that. I wish you that you found a solution to the problem.
     
  33. Deleted User

    Deleted User

    Guest

    I know, it is in fact it's the only thing that would complete the project, but unfortunately this is the only really complex thing to which I was unable to find remedy. But I know that this can be obtained with a specific values in camera projection matrix.
     
  34. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Hi, for some reason this does not work with SteamVR, i guess its because its two cameras? The demo scene looks like this when I change the fps controller to teh SteamVR rig

    gater.png

    Any ideas how to get it to work with SteamVR?
     
  35. Deleted User

    Deleted User

    Guest

    Last edited by a moderator: Apr 10, 2017
  36. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Hmm, but its not impossible, for example this game has pulled it off, see screen shot (The plane that the render texture is rendered on is bigger than the scope itself, must be done with a portal right?)

    sniper_scope.jpg
     
  37. Deleted User

    Deleted User

    Guest

    No, it is not. But I think that the problem is to manage the movement of camera portal, based on those two that VR manages simultaneously. Something impossible for the current portal math (but I bet on an alternative one).
     
  38. KoLYA_PSS

    KoLYA_PSS

    Joined:
    Aug 14, 2013
    Posts:
    3
    Hello, when i locate portals in the wall, i can see this wall behind, because camera move behind the wall. How i can change it?
     
  39. Deleted User

    Deleted User

    Guest

    Simple, make a wall with only backface culling. :)
     
  40. KoLYA_PSS

    KoLYA_PSS

    Joined:
    Aug 14, 2013
    Posts:
    3
    I have started learn unity recently, so for me it's not simple. Write please how make a wall with backface culling?
     
  41. Deleted User

    Deleted User

    Guest

    In your case just create a plane from object list, and replace the previous wall (a cube I assume) with this.
     
  42. Gebodal

    Gebodal

    Joined:
    May 30, 2016
    Posts:
    2
    So, I am loving the Asset - the maths of which I really wish I understood better, but alas.

    I have a question about the recursion mask and multiple portals: as I understand it, your code does not allow for the image displayed on one portal to contain the image of another portal, or something along those lines, correct? So, I successfully setup a scene with two gates, and they looked excellent, but then I tried to setup a scene with two pairs of gates (i.e. 4 in total), and it got a little unhappy - in the form of the recursion mask being displayed in some of the gates (but, intermittently, so that the mask flashed and only covered a portion of the gate). I assumed that some stray angles were causing one gate to be visible to another, and so I set up walls between them so that there was no line of sight - but the problem has persisted.

    Have I misunderstood something about the mechanics? Is the system not built for multiple pairs of gates in the same scene? Or is there some wonderfully simple fix that I haven't thought of?

    Cheers
     
  43. Deleted User

    Deleted User

    Guest

    I think that is a problem of culling mask on portal cameras, and layer applied to recursion mask (that is simply a plane mesh) of second pair gates (unfortunately I have not thought about this kind of errors, but I will fix these in the next version).
     
    Last edited by a moderator: Jun 21, 2016
    hopeful likes this.
  44. Deleted User

    Deleted User

    Guest

    Hi everyone.

    Version 1.1.5 has been submitted. Changelog:

    - It's now possible to choose a custom portal skybox.
    - It's now possible to choose a custom layer for recursion mask
    - Added "character walk with skybox" scene.

    RELEASED
     
    Last edited by a moderator: Apr 10, 2017
    hopeful likes this.
  45. VGAMaddHatter

    VGAMaddHatter

    Joined:
    Jun 22, 2016
    Posts:
    4
    Hi H92,

    First off, HUGE thank you for this asset, it's awesome!
    I'm a Computer Science student in university right now and I'm playing around with game development in my spare time. I'm very new to Unity and I'm trying to use Gater to work with my game. The game I'm making has extremely simple controls so I'm trying to make my own FirstPersonController script to keep things simple and easier to maintain. However, when I try to switch over from your FPC script to my very basic one the gates no longer project the correct view as the character approaches the gate. I'm wondering if you could let me know which components of the FPC script are absolutely necessary to make the gate project properly or if I could send you the script to tell me what's wrong with it.

    Thanks
     
    Deleted User likes this.
  46. Deleted User

    Deleted User

    Guest

    MouseLook (which resets the initial rotation of the character) and start function of FPSController script (which avoids that the up and down walk animation, move Y position of character too in down).
     
  47. VGAMaddHatter

    VGAMaddHatter

    Joined:
    Jun 22, 2016
    Posts:
    4
    Ahh thanks, I think it was the start function that I was missing. I added that and it's working again!
     
    Deleted User likes this.
  48. Deleted User

    Deleted User

    Guest

    Hi everyone.

    Version 1.1.6 has been submitted. Changelog:

    - Character controller has been adapted to Unity 5.4.

    RELEASED!
     
    Last edited by a moderator: Aug 16, 2016
    hopeful likes this.
  49. keffertjuh

    keffertjuh

    Joined:
    Oct 14, 2015
    Posts:
    7
    Hey there.

    I've been trying to adapt your asset to work with VR, as I was able to split off a camera for each eye (execute comment #6 and disable the camera for both eyes: http://forum.unity3d.com/threads/steamvr-how-to-display-content-in-left-right-eye.396236/) , but I've run into an issue I don't quite understand that you might be able to clarify (Note: yes, I did look at that link about VR limitations, but did not think it relates to my particular issue since I intend to just double up to cover each eye for right now).

    When I enable VR (by going into Edit -> Project Settings -> Player : Other Settings -> Virtual Reality Supported) cameras only seem to add a 'Target Eye' object.
    Doing this even to the provided FPS setup and trying all variations for that variable I get a warped perspective through the portal.
    Would you know if there is any way to get around that or is that part of why VR is not viable as you stated?
    (Some deeper insight would be appreciated, of course)

    Thank you for your time and effort :)
     
    Deleted User likes this.
  50. Deleted User

    Deleted User

    Guest

    Hi.

    Thanks for your indications about VR, will be helpful.

    Sincerely I not have a clear idea about your problem, but maybe I know a possible cause ( it's the maximum that I can do without a VR :) ). So go into script and check camera aspect instruction of portal cameras, I have set this parameter to be equal to main camera. And again try to find an alternative shader to projection plane, maybe mine (that it's based to normalized screen position instead of SceneUVs screen position) not work well for VR.

    Regards.
     
    Last edited by a moderator: Aug 12, 2016