seblague / portals Goto Github PK
View Code? Open in Web Editor NEWPortals in Unity
Home Page: https://www.youtube.com/watch?v=cWpFZbjtSQg
License: MIT License
Portals in Unity
Home Page: https://www.youtube.com/watch?v=cWpFZbjtSQg
License: MIT License
Having issues with even opening it in Unity, not sure if this is you at fault or Unity but when I open the project there are always errors.
I was trying to get this to work with URP, and I was having a lot of trouble getting the fog working on the portals. I figured I'd backtrack and load up the example scenes with the built in renderer, and it's the same problem.
Here you can see i've gone pretty aggressive on the fog here to better illustrate the point.
I think this is more a unity thing, than a problem with this project, but just putting the problem here in case anyone has any ideas. Thanks!
Error description: When importing the project, Unity throws an error regarding a failure in compiling the Portal shader.
Source of the problem: This is happening because there is a variable called active in the Portal.shader while the GLSL Specification for OpenGL 4.60 considers the keyword active to be "reserved for future use" and warns that "using them will result in a compile-time
error".
Possible solution: The simplest solution is to change the name of the variable active to, for example, displayMask.
Software details: I'm using Ubuntu 18.04 with NVIDIA proprietary 435 drivers. I tested in Unity 2019.3.2f1 being run on OpenGL.
I have issues with the project, all the prefabs are missing, which makes it to where nothing is there and I just freefall, for the desert and forest world. Also opening project says it was made in 2019.4.x but another part said that It was 2019.1.3f and opening with that one crashed my unity editor app.
Hello hello and thank you for this! its a life saver! A quick question though as im using a scene additive approach to loading levels and moving through the portals to them, which works just fine apart from the render texture in the portal cameras. Even though i can go back and forth the additive levels the cameras wont move nor do they render whats inside. for now i do have a simple warp effect to mask this but i would like to make it render the other side properly! any ideas or recommendations?
Hi there,
I wanted to ask what license applies for this project. Is it allowed to use the code supplied in my own project and extend it? Adding a license to clear this up would really help me.
Thanks in advanced and keep up the great work!
Lets say we have a scene with the worlds A
, B
and C
and the portals A⮂B
and B⮂C
.
I can't wrap my head around the approach to make the world C
visible through B
looking from A
.
Has anybody an idea how to achieve this?
Hello!
I've started on a project using precisely this awesome portal feature.
However, my project is top down, means I'm dealing with an extra camera to keep track of.
This is what I'm looking at, for some reason the portal (In top-down view) seems to be displaying the main camera, instead of the player's camera.
However, from the player's camera pov, it's displaying the other end correctly.
Does anyone know how to fix it?
Cheers!
Edit: I forgot to mention, that I believe It's most likely to do with line 40 in the portal.shader o.screenpos = ComputeScreenPos(o.vertex)
I'm assuming this'll grab the main camera's display. Which I don't want.
When transporting between 2 differently angled portals the player's position instantly snaps upright immediately, instead of gradually moving towards an upright position.
I thought that was an issue related to shaders, but looks like there is something about render textures.
Replacing:
viewTexture = new RenderTexture (Screen.width, Screen.height, 0);
by:
viewTexture = new RenderTexture (Screen.width, Screen.height, 24);
Portals are rendered, but with no recursion.
Why is this happening? Is feasible to fix recursion with Android?
So I have tried using the portals with android for the Oculus Quest as I'm trying to get these portals to work in VR. The portals seem to work fine in the editor but after building to android and placing the build on the Oculus Quest whenever I try to enter a portal, I am teleported to a random location and left to fall through the map. All the scripts are the same as the default ones except for a render script that I changed to work on android but this should not affect teleportation as all I changed was the following,
portalCam.Render();
to
RenderTexture buffer = RenderTexture.GetTemporary(Screen.width, Screen.height, 24);
portalCam.targetTexture = buffer;
portalCam.Render();
Graphics.Blit(buffer, viewTexture);
RenderTexture.ReleaseTemporary(buffer);
I have been trying to fix this for a couple of weeks if anyone has any ideas help would be much appreciated.
Hi Sebastian, love your work.
I tried converting your project to HDRP and noticed a number of issues with it. Thought you might like to know. If you solve them, I'd be keen to hear about it.
I really enjoy watching your vids. Keep it up.
it says wrong version and when i press continue from that then im in the project but theres nothing there
Any luck with that? has anyone managed to convert it to URP please?
I am attempting to use this portal package alongside an Additive Scene Loading system. The idea is that the user will enter the loading volume, which will cause the relevant scene to be loaded asynchronously to the game along with any portals that would also be in that scene.
The problem is that when the scene is loaded, the portals load with it but have blank gray textures on the screens instead of the correct renderTexture. Unloading and reloading the scene doesn't affect it. Oddly enough, the portals are perfectly functional otherwise. The player is able to move through them without issue. They just look like blank gray walls instead of clear portals.
When I load the scenes individually to test the portals work as expected. If I don't use Additive Loading then they work as expected. If I place a player object in the second scene facing the portal, then start the game from the first scene, walk into the loading volume, and jump back out to the editor view, I can see that the Main Camera from the first scene does indeed see the correct texture on the portal.
Does anyone know how to convert the Portal.shader and the Slice.shader in order to make it work with the Universal Render Pipeline? I'm new to everything, and basically I'm not being able to make either of this work.
Hope that someone has faced this issue and will be willing to share the acquired knowledge.
If i look to the portal it lag so much, even without postprocessing, im using StandardAssets for the fps controller that is using cinemachine.
I don't know what the issue is
The idea is basically to make the light that gets out of the flashlight pass through the portal, or simply make the cameras in the other side of the portal have their own flashlight to give the illusion of light passage (I particularly tried this one and didn't got a smooth result , cause probably by the portal camera stoping their movement if the player is looking the portal from the sideways or looking at it's corners).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.