New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-Euclidean World Geometry #25031
Comments
I have not looked at the source code but I'm pretty sure it's "just" using multiple cameras as seen in the Portal games and duplicates of rooms to archieve this. The geometry itself is very much euclidean but uses visual tricks (portals), as well as teleporting the player around or resize them to create this illusion. It's definitely well made but I think one sould be able to do this in Godot right now. Features such as stencil tagging would make this easier / faster in the future but the basic requirements are already there I think. Edit: That being said, you can definitely do some cool stuff with non-euclidean geometry. I'm just not sure how you would combine it with a traditional 3D renderer, simply because the type of geometry is so different. |
My brain melted seeing that video in the previous post. Pretty cool nonetheless. |
Eh. This is a very "wishlist" feature but I would really like a built in portal system that "just works" with rendering, lighting and physics and such. This requires a lot more than rendering too. How do you calculate the physics of something half in a portal? How do you stop it from colliding with the wall or objects behind it? |
@ElfEars As much as I like Portal, I don't think this functionality is something that belongs into godot's core. The points you brought up need to be treated a lot differently depending on what you're building. Implementations need to be very specific and making something that "just works" in every case is probably impossible considering how much freedom and possibilities there are. |
I think that having a portal system built into Godot is too much to ask from a generic game engine, but it would be nice to have features in each of those systems (rendering and physics mainly, but potentially audio as well) that would allow us to create games using portals. |
Yeah. Fair enough. Admittedly, I was mostly just throwing stuff at the wall. Questions I was having trouble with when thinking on how I'd personally implement it. |
I've been thinking how to achieve this with the current state of Godot. According to Portal 2 Developer Commentary on linked_portal_door, it could be used as a very powerful prototyping tool. Maybe it could be implemented as a module similar to GridMap. |
Can you achieve this with 3d viewports? Are 3d viewports implemented (showing the screen of the camera on the wall)? |
Yes, but you'll have to go a bit further when you want to implement interaction. For example, you'll have to cut a hole in the wall for the player to actually be able to go "through" the viewport. I assume portal uses some form of CSG to archieve this. |
@CptPotato The wall has no collision, so you will only notice the difference when you go through the portal. |
I think this would be something you can "cheat" utilizing some tricks. The author of the video said he avoided Unity because of some rending limitations. But, if you pass through a certain set of coordinates set the player size you could achieve most if not all of the tricks the author provided in the video. Even writing your own engine or building similar features into core code wouldn't be as useful as just creating the magic itself. Non-Euclid math is just a trick in the end anyway. Anyway, those are my basic thoughts. I would love to see this conversation continue. I'm a recent Godot convert and am looking forward to becoming a member of the community 🙏🏻🤙🏻 |
Here is also a nice video (level transitions): https://twitter.com/duckinator/status/1125832679415537665 |
https://youtu.be/eUJUHO28sLQ |
But it seems like the transition isn't perfect yet. |
https://www.youtube.com/watch?v=xQ1b8cmUa8w I haven't added seamless transitions yet but it is definitely possible. Godot 3.1 is very capable of faking a non-euclidean world. EDIT: Shoutout to this guy for sharing his code on Github :D I took his code and used it for my project: https://github.com/io12/godot-portal-demo |
https://github.com/EricPlayZ/NonEuclidean-Godot I've posted my whole project on Github if anyone wants to experiment with it, or further develop it. @io12 still takes credit though for a few lines of code (and other stuff) I needed :P |
I'm pretty sure I can make this fully seamless (but maybe not performant?) for 3.2. 3.2 has the new frustum camera mode which apparently allows oblique near-planes. |
That's nice. I don't need it to be performant though. Can't wait for 3.2 anyway though :D |
The only engine I know of that has this as a first-class feature is the Source engine. Not only in the Portal games, but also in other Source games, the 3D skybox is a separate area with "portals" that make it appear huge and outside of the normal play area. |
@aaronfranke Speaking of infinite sky, I wonder if this can be reproduced in Godot: http://aras-p.info/blog/2019/02/01/Infinite-sky-shader-for-Unity/ |
This shouldn't be too hard to reproduce. It just needs a few lines in the vertex shader. |
This can be done easily with viewport textures that act like portals. This is the way Portal 2 did it. Just make the portals fill the entire room. As far as I know, the game Portal dosn't use any fancy tricks like CSG and just duplicates the Entity on both sides. https://www.youtube.com/watch?v=_SmPR5mvH7w |
@Byzantian Only seamless transitions don't work yet. But non-euclidian geometry is something different: EricPlayZ/NonEuclidean-Godot#1 |
https://github.com/io12/godot-portal-demo I tried to implement portals in Godot and at this point I'm pretty sure Godot doesn't have enough features to get them seamless. We still need:
The priority right now seems to be getting vulkan support ready, so it's unlikely that portals will be possible any time soon. |
@LinuxUserGD |
I think something like this is possible with shaders without changing the coordinate system. Don't know how they did it in this video: https://youtu.be/ztsi0CLxmjw |
There's no many any tutorials and code explanation about this to easily replicate the result, so... As i think, easiest way to make a portal is to use shader, that renders input image behind anything else but in front of object, teleport anything going behind the portal, and disable collisions between wall portal placed on and object touching the portal but portal frame must have collider. IDK how to make it code-wise, im not a great coder, but i think all this can be a solution. Sorry for bad english, i was too sleepy. |
You could use my code as a start. https://github.com/io12/godot-portal-demo At this point, I'm pretty convinced that Godot doesn't yet have enough features to implement portals as seamlessly as in other game engines. Also, cool username :) |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
The stuff in the video is not really non-euclidian geometry, it´s just tricks of viewport-rendering on planes inside the structures and teleporting to the shown position. Check out hyprrrogue and hyperbolica (both on steam) for actual non euclidian geometry. These games act in hyperbolic spaces, what causes shrinking and deforming of distant structures in order to squeeze the floor flat again. |
This isn't the place to discuss this any longer, if you want to discuss the feature please open a proposal, otherwise this was closed four years ago and don't think anyone here are active on this topic, if there was an interest I'd say a proposal would have been opened |
Where else would we discuss this? This is great conversations and I took two things away (game recs, thanks, @Drachenbauer). |
See the comment above explaining this in detail #25031 (comment) |
Yea, I read that. But you're claiming this thread needs to die because you're tired of seeing replies to it? We're just having a conversation. |
No... I'm saying this isn't the place for proposals this is for bugs Please behave professionally and follow the code of conduct your behaviour isn't acceptable, accusing me of things I've never done isn't okay, and you aren't having a conversation, you just joined now, a conversation that ended almost four years ago, with someone saying to move it to the right place Come on... |
If you want to continue this topic open a proposal, and link it here, otherwise this isn't the place for this kind of discussions, it stopped being that four years ago, and this conversation was revived only today, the conversation was dead before then Be reasonable |
Godot version:
Possibly a Version 4.0 feature request
I just happen to spot the video (Link Below) and at the end it mentions the potential of using Non-Euclidean in VR. Do you think Godot would be capable of doing that someday? Or is it something already implemented:
[Non-Euclidean Worlds Engine]
https://www.youtube.com/watch?v=kEB11PQ9Eo8
P.S. The creator also revealed that It was written in OpenGl and code is posted on Github for anybody to look at: https://github.com/HackerPoet/NonEuclidean (Normally I don't do this type of stuff but sharing source code that shows how it works could inspire a possible new feature for Godot. Plus, figure I give heads up on what was recently discovered.)
The text was updated successfully, but these errors were encountered: