# Non-Euclidean Mechanics

I have seen many people marveling at some videos of Non-Euclidean geometry, so I decided to port it to roblox, with the HUGE help of some of the modules inside @EgoMoose’s Portal Demo.

## Videos:

The Shrinking Tunnel:

The Growing Tunnel:

The two examples in this place are nowhere near perfect, but are just to give the questioning an example of how a system like this can be created. The slight fuzzy blur that occurs occasionally, is just the ViewPortFrame’s being naughty.

Time for a brief summary of how this works!
This whole illusion is based off of portals, similar to the ones in the game “Portal”.

Whenever you touch one of the ends of the hallway, you are sneakily teleported inside or outside into the hallway in the other world.

There are two worlds for each illusion. The world in the workspace, which is what you physically see from the outside, and the inside world( The children of the World and World2 folders in the source project ), which is what you are inside of while in the center of the hallway and what are shown through ViewPortFrames when looking into the hallway.

What makes this illusion trippy though, is the ViewPortFrame’s.
They are what make each hallway appear very long / very short from the outside. In reality, each is not physically too long / too short compared to the outside, until you enter the portal and are teleported to the other world, and just reflects what you would be seeing from the other world.

An example of what I mean:

The long-ness of the hallway is merely a disguise, created by the ViewPortFrame:

Without the ViewPortFrame, it looks as it truly is physically:

To understand better what the ViewPortFrame’s are doing, go to the explorer while the game is running, and search for and remove each ViewPortFrame one by one. Then test the difference it makes on the gameplay.

I’m not going to go into any of specifics or mathematical details behind camera placement, but am going to leave that up to you to investigate and figure out yourself.

Note about the Decals in the Big>Small hallway

If you have opened up the place I linked and looked at the shrinking tunnel, you may have noticed that the parts themselves of the outside physical world are transparent, and are represented by Decals.

The reason I have done this, is because Decals are only viewable from one direction, and are completely un-viewable from the opposite side. Since the big to small hallway gets smaller, you cannot be seeing the physical parts from the inside. It instead needs to be completely replaced by the fake ViewPortFrame version.

With Decal surface:

Without Decal surface:

It looks so weird in this image, because you are seeing the full length of the hallway that is normally hidden by the Decals, instead of just the fake replacement.

## Un-Copylocked Place:

I hope this is found useful and interesting by you guys!
I hope I did an “ok” job at explaining, and everything is comprehensible and makes at least some sense.

Have fun!

Known Glitches:
• You can glitch into the outside of World2 if you wiggle back and forth quickly on the edge of the hallway.
78 Likes

Thank you ExcessEnergy, very cool! Despite the limitations of viewportframes, it still looks very convincing, very good job there! I will be sure to take a good look at how you implemented it.

3 Likes

Thank you for your contribution to humanity. I have seen many of the same videos and I always wanted it in roblox. I even considered making this myself, using the same method you did, but I didn’t try it.

3 Likes

For those who don’t know, this is inspired by the following video:

10 Likes

This is indeed what prompted me to make this. I planned to include this link in the post, but must have forgotten.

1 Like

I love this!

A lot of people just copy paste my teleportation demo, but it’s great to see someone add and expand upon it too!

9 Likes

As I mentioned, I was thinking of doing this, but using it for a horror game. Your version is a little buggy though

I just attempted to stand in the portal and look at the other tunnel and then stepped out

How did you get to this point? This means that you are below the map, and dropped down to the section you are not intended to be in.

I edited the top comment about how I did it. Feel free to join me to see

Yeah I figured out how to do it. I can show u. If not, just stand halfway in the door of the portal and try to look at the other tunnel, and look up as well

1 Like

the pathways seem similar to mine with a different mechanic. That’s really cool! Good work

I know I’ve seen this video an uncountable amount of times xd!

Would it somehow be possible to have the viewport frame on a screengui, and use clip descendants with a frame to give it the illusion of being blocked off, so it wouldn’t have the fuzzy effect?