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

[Out now!] PortalKit Pro- Seamless portals (Fully VR and Mobile supported)

Discussion in 'Assets and Asset Store' started by I_Cudlitz, Dec 11, 2016.

  1. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85

    If you have any questions, please contact me at support@skstudios.zendesk.com. I will respond way faster than I will here.

    Out now!

    https://www.assetstore.unity3d.com/en/#!/content/81638

    Hello there! I've been working on this over the last couple of weeks, and it's nearly done.
    I noticed that there was nothing on the asset store for VR portals (let alone seamless ones), and the portal assets that were on the store were "jumpy" or let you hit the clipping plane with your face. There was also no documentation on the number of issues that come around when making Virtual Reality enabled portals, so I decided to do some research and come up with a working solution that I can share with you fine folks on the asset store.


    Features:
    • Seamless transitions between portals
    • Absolutely no "fudging", if you enter a portal you do not end up slightly in front of the exit
    • Portals support multiple levels of detail and reduction in quality for lower end computers
    • Portals have an option to act as if they were the same size and orientation as one another, allowing you to walk into a large portal and come out of a small one at an appropriate size. This also works for walking into a portal and coming out on a wall (this all can be disabled)
    • Will come with an easy VR movement script and mesh animation controller that lets you simply drop in a new avatar and model to change the player's model. These both, again, work at any orientation (Credit to Railboy for providing the base for the character controller, although it had to be heavily modified for orientation fixes)
    • Portals do not render if they are not visible, even if you are "looking" at them through a wall (this one was a pain, as unity does not have occlusion checks available)
    • Portals are efficient enough to work well on mobile, web, or any other platform. Web has an issue with animated models, but all others work perfectly fine.
    You can find the web demo here: https://phygon.itch.io/portal-example (Please note, there are visual bugs in the web demo not present in any other platform's builds)



    Models (including animated ones) can be partway into portals, and animations will behave exactly as expected- additionally, objects halfway inside portals will not be rendered behind the portals, sealing in the effect.



    Portals can be entered halfway and closely inspected, and no visual bugs will develop (this portal has a frame for clarity, but one is not required)


    Portal's edges can be either hard or soft, or defined by a stencil


    https://www.assetstore.unity3d.com/en/#!/content/81638
     
    Last edited: Apr 20, 2017
    Hikiko66 and radicalEd like this.
  2. radicalEd

    radicalEd

    Joined:
    Mar 19, 2016
    Posts:
    81
    If the demo's really working the way you say it is, that's amazing.

    So you can run multiple different dynamic portals that maintain physics, support partially inserted objects, can be walked through, seamlessly looked through, and they barely take up any resources whatsoever? and it works with VR.

    Yeah, I'm gonna have to ask you for an estimated release on this one, this looks phenomenal.
     
  3. radicalEd

    radicalEd

    Joined:
    Mar 19, 2016
    Posts:
    81
    Could this be used to make a portal clone in VR?
     
  4. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Yep! All of that works, and more.
    Release is looking to be in roughly two weeks or less, I'm doing a polishing/final testing run now. Maybe even sooner!

    Definitely. Portals support physics (large objects are a bit of a problem for now, but that's up next) so all that you'd have to do to make a portalesque game would be to make a physics-driven player controller and everything else would be dealt with automatically.
     
  5. radicalEd

    radicalEd

    Joined:
    Mar 19, 2016
    Posts:
    81
    That's really cool, someone could make a heck of a lot of money if they did a VR game with this.
     
  6. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    New demo video:
     
  7. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    288
    This does look really good. From the demo and videos, it looks like you can't see through portals within portals. Is this correct?
     
  8. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Thanks for the good vibes :)

    Thanks!
    That's the case at the moment, but I am/was actually working on that just today. In the released version, you will likely be able to set the number of times your portals recurse (unless I run into some unforeseen problem)
    It's worth noting that in VR, every single rendering step is more than twice as expensive as it would have been otherwise- for most applications, users would probably only want them to recurse once (or not at all)
     
    Last edited: Dec 15, 2016
  9. CodeBison

    CodeBison

    Joined:
    Feb 1, 2014
    Posts:
    288
    Yeah, I can't imagine recursive portals in VR would be a good idea.
     
  10. radicalEd

    radicalEd

    Joined:
    Mar 19, 2016
    Posts:
    81
    Even if the delay between two portals was a single fraction of a draw step I feel like looking through recursive portals would be a one way trip to puke city

    That, and falling through two portals infinitely like in Portal.
     
  11. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Good news! Due to a new matrix generation technique, portals are now about 90% faster, meaning that even outdated graphics cards could run them with little to no problem.
    Also, I've implemented arbitrary script teleportation separate from game objects (so, for instance, you could grab something through a portal with a grabber script, or poke a gun through a portal to shoot from the other side). I'm working on a demo for this right now.

    I have also implemented raycasting delegates, meaning that you can raycast through portals with no problems.

     
    Dark-Muppeteer and Hikiko66 like this.
  12. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Here's a much better delegate raycasting demo, as well as a demo featuring independent script teleportation.
    As you can see, you can shoot through the portal from both your side (delegate raycasting), and with the gun on the other side (script teleportation). All that you have to do to get delegate raycasting to work is to call a TeleportableRaycast which is just as simple as a regular one, and scripts can be made teleportable independently of the objects they are attached to by simply having them inherit from TeleportableScript.
     
    hakankaraduman likes this.
  13. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Sorry for the hiatus! I was vacationing in Japan, but I have returned.
    The portal system is nearly done! Dynamic lights can pass through portals, portals now properly handle physics, dopplegangers can be dynamically updated, portals can be directly placed on walls, and the asset will come with a free physics-based control schema for VR usage.
    This video is outdated at this point, but check it out!

    Additionally, there is a demo here: https://phygon.itch.io/vr-portal-demo
     
  14. LividPineapple

    LividPineapple

    Joined:
    Jan 18, 2017
    Posts:
    2
    Hi. Just found your project and I have to say that you're doing phenomenal work. I was actually looking for assets for portals that work in VR that I could modify and use in unity. I would love to use your portal kit. Any ETA on when it will be publicly available? Also, will it be released free or have a price? Thanks. Look forward to checking your kit out.
     
  15. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    It will be out in the next couple of days, assuming that I can figure out how to fix Unity's bizarrely broken occlusion culling matrix. For some reason, it is scaling incorrectly with the actual occlusion matrix itself, causing absolutely bizarre issues where occlusion culling wraps around the exterior edge and explodes all over the scene. As performance was the entire focus of this project, obviously it was a bit of a wrench in the process, and I have to fix it before I release it to keep up with my performance claims.

    I'll likely be releasing a couple of versions. A base version for 5-10 dollars that works visually, a full version for ~20-40 with good optimizations, and a production version for ~100 that comes with all my custom optimization (portals effectively have no performance impact whatsoever) as well as all other features including physics passthrough, light passthrough, and more. The fully featured version would effectively allow you to make the game portal directly out of the box, as well as essentially anything else you need them for (like area portals etc)
     
    Dark-Muppeteer likes this.
  16. LividPineapple

    LividPineapple

    Joined:
    Jan 18, 2017
    Posts:
    2
    sounds great. Will the code be fully commented and will there be a complete readme so that developers can understand and modify the code? Thanks.
     
  17. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Yep! I'm actually working on documentation right now while I have this downtime trying to figure out the occlusion. My goal with this was to make the system as flexible as possible for developers.
     
    Dark-Muppeteer likes this.
  18. KamiKaze425

    KamiKaze425

    Joined:
    Nov 20, 2012
    Posts:
    207
    Hey there!
    Just wondering if there is an update on release for this. Looks pretty cool
    Thanks :D
     
  19. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    local306 and Dark-Muppeteer like this.
  20. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Didn't see this until just now! The asset is hitting the store tomorrow.
     
  21. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Looks like it's taking longer to review than I thought, it should be up within the week.

    5.5 is the oldest unity version that I personally recommend.
     
    Last edited: Jan 29, 2017
  22. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    There's lots of cool new features :)
    I would port it to older versions, but unfortunately I was developing on 5.6 and I could only serialize back to 5.5.
     
  23. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Any updates regarding an ETA?
     
  24. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Nope. It's been submitted and now the unity staff has to review it. I'll update the thread when it's out.
     
    local306 likes this.
  25. khemistry

    khemistry

    Joined:
    Jun 16, 2016
    Posts:
    18
    You are such a tease! But seriously, this looks amazing, and I know just what I want to do with it. Can't wait.
     
  26. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
  27. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @MCudlitz I've been very intrigued by this and I'm happy to see it's been released!

    Do you have a VR demo I could try out beforehand? From what I have seen it looks flawless, but I'm still curious to check out the VR transitions for myself.
     
  28. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Indeed I do! Check it out here:
    https://phygon.itch.io/vr-portal-demo
     
  29. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
  30. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    No problem! Hope it was to your liking :)
     
  31. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    It was pretty cool to check out for sure! I'm very impressed with how seamless it operates.

    By the way, the _Data folder needed a name change as I think maybe it was referencing an older project for the most recent demo.

    How general are the components needed for everything to work? As in, is there enough code reflection that you can add it to let's say the Unity standard asset FPS controller and expect it to work (as an example)? I currently have a VR project that would work as shown in your demo, but I also have a non VR project that I'm hoping I could apply it to using a UFPS asset controller.

    [EDIT]

    There was another portal asset I used in the past that allowed you to easily swap out sky boxes when passing through portals (also projected the corresponding sky boxes through the portals). Is this something that already exists for this asset, or perhaps something you would consider adding in later on? Just so you could have geometry that's beyond a shorter clipping pane, but make it feel like you are warping to some completely different location.

    Also, what about portal recursion? I realize for VR it may be a bit too expensive to compute at this point, but how about for non VR projects?
     
    Last edited: Feb 18, 2017
  32. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    The components needed for everything are super generalized. All that is needed for seamless camera passthrough is a small collider on the camera + a collider to which the camera is parented named PlayerExtents. It should work with 0 problem using the default FPS controller. If you wanted to swap out the skyboxes while traversing portals, you could just add a script that inherits from TeleportableScript to the player, which changes out the skybox on OnTeleport() (and also change the skybox on the portal camera itself for visual consistency). It is worth noting that for some users, there are apparently some issues with the unity default skybox- To fix this, I'm considering adding a custom skybox to the asset to cover any possible issues. With that being said, your skybox-swapping desire can easily be implemented with only a few lines of code, due to how general all the components are.
     
  33. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Oh, also, recursion! That's not working currently but I was actually getting cracking on that tonight. it's difficult due to my optimization method but it shouldn't be too hard to get functioning.
     
  34. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Thank you kindly for the response. I'm happy to hear about how easy it work with. I think I know what I might be picking up tomorrow morning :)
     
  35. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Sorry to bug you again. Does this work with single pass stereo as well?
     
  36. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Yep! As far as I know, it should work with anything that can be run through SteamVR's current version.
     
  37. ethancm

    ethancm

    Joined:
    Mar 9, 2016
    Posts:
    2
    Does this require SteamVR, or can it be used when targeting Oculus SDK natively?
     
  38. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    This does require SteamVR, as the individual eye matrices and the material matrix-based eye checking both use SteamVR components. As far as I know though, you could use SteamVR for your project with the Rift and have it operate as expected (and it'd also open up your game to other platforms).

    Also, general update:
    Recursion is essentially completely working for non-VR projects now. I should finish it for VR portals in the next couple of days, and then I'll upload it to the asset store which might take a week-ish.
     
    local306 likes this.
  39. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Nice! Looking forward to seeing it in action.
     
  40. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @MCudlitz I noticed that the prefab for the Global Portal Setting object doesn't link to the proper script. Can easily be replaced with the actual corresponding component, but figured I would let you know for future updates.

    [EDIT]

    Also get this error when no portal spawners are present:



    Doesn't stop the runtime though.
     
    Last edited: Feb 22, 2017
  41. KamiKaze425

    KamiKaze425

    Joined:
    Nov 20, 2012
    Posts:
    207
    Hey there,

    So not sure what I'm doing wrong: I made a new project. I imported SteamVR. Then I imported your asset. I copied the TagManager into ProjectSettings, and deleted both the nonVR folders.
    Then I made a build of your VR demo scene, and only one eye renders the portals. The other eye has them just black. Any ideas?

    Edit: Also, does the order of the layers matter? Or do we only need to make sure all the names are in the list?
     
    Last edited: Feb 23, 2017
  42. shawww

    shawww

    Joined:
    Sep 30, 2014
    Posts:
    43
    I bought this asset because you said that it supports Single Pass Stereo -- but it does not. SPSR gives a 30-40% framerate boost in most cases, and it absolutely critical for my project -- if you could update it, that'd be amazing.
     
  43. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Hey, sorry I didn't see this until just now! I was checking support emails but not Unity Forums posts. This was due to a bug that has since been fixed.

    It should support Single-Pass Stereo, as I developed the asset using it. A bug some users are reporting is that single-pass can be bugged with the scene view open. Please let me know if this works for you!
     
  44. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Fixing this now, it was a simple oversight. Thanks for the report!
     
  45. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Looks like a part of steamVR and/or Unity updated. I'm working on fixing it now.
    If it is absolutely critical that it must work right away, I would be able to process you a refund. I'm sorry that something didn't work that was advertised, but that's dependancies for ya.
     
  46. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Single pass stereo also fixed. Will be pushed in the update.
     
    local306 likes this.
  47. ManuelCosta

    ManuelCosta

    Joined:
    Dec 24, 2015
    Posts:
    9
    Can i use this without vr?
     
  48. I_Cudlitz

    I_Cudlitz

    Joined:
    Oct 22, 2016
    Posts:
    85
    Yep! It works with VR and Non VR applications equally well. When you first start up the asset it asks you to set it up for one or the other, and the guide makes it super easy :)
     
  49. tobaccoblonde

    tobaccoblonde

    Joined:
    Apr 18, 2017
    Posts:
    11
    hello!

    i recently purchased the portal kit pro. and on unity 5.5.1 the demo scenes were rendering the portals correctly. then i set up a new project under unity 5.6 and followed the quick setup guide in the manual and i don't know what i'm doing wrong, but my portals aren't rendering properly. i should also add my portals don't render properly in the provided demo scenes

    after pressing play with just a default camera, positioned to observe both PortalSpawner objects in the scene.



    after putting in an FPSCharacterController, giving it a Teleportable component, and walking through one of the portals, this happened.



    i tried the various notes and settings, but nothing seemed to give any result. i was wondering what am i missing, or mayeb it's a 5.6 thing?
     
    Last edited: Apr 18, 2017
  50. tobaccoblonde

    tobaccoblonde

    Joined:
    Apr 18, 2017
    Posts:
    11
    i'm still unsure what's happening, this is the furtherest i've got with the demo scene.

    Screen Shot 2017-04-19 at 1.49.37 AM.png