Code Monkey home page Code Monkey logo

portals's People

Contributors

rendoir avatar seblague avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

portals's Issues

Portals don't render fog correctly

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.

image

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!

GLSL Compilation failed

Error description: When importing the project, Unity throws an error regarding a failure in compiling the Portal shader.

Shader compilation error

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.

No prefabs / missing

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.

Question about portal camera movement through scene additive

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?

License of the project

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!

Render different portal through portal

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?

Tips on WebGL support?

Awesome work on this and I really enjoyed the tutorial. I'd love to get it working in WebGL, any pointers? The portals are currently rendering the skybox in WebGL builds, not that I've upgraded it to URP.

image

Top down Camera View

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.

image
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.

Player rotation very snappy

When transporting between 2 differently angled portals the player's position instantly snaps upright immediately, instead of gradually moving towards an upright position.

Android not working - fix candidate

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?

Portals Not Working In VR

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.

Conversion to HDRP

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.

  1. The portals no longer appear. This seems to be because HDRP does not use the OnPreCull event in MainCamera. I tried using LateUpdate instead to fix it - I'm sure you know a better way.
  2. The portal shader looks slightly too dark. I have no idea why this is occuring in HDRP.
  3. There seems to be a graphical glitch when crossing the portal that was not there previously. This may be because of the change to LateUpdate.

I really enjoy watching your vids. Keep it up.

Portals show blank texture when used in Additive Loading

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.

Mutliple portal pairs simultaneously

Hey!
I was wondering how would you go about making it possible for more than one visible pair of portals in the scene?
How would you render the view from the other pair of portals?
image

A setup sort of like this

Converting the shaders from BRP to URP?

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.

How could I implement a flashlight that works with the portals?

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.