I have an idea on how to continue this project.
Program a automatic portal system using the stencil buffer and use code from Hopper's 5-D Intersections plugin for Weland.
Here is how I would program automatic portals.
Check for 5D space intersections and ignore those polygons that intersect, then build map.
Next put the 5D space polygons into a list and check for nearest neighbor.
Next different lists are made then continue checking nearest neighbor.
Next check nearest neighbor until there are no more, then there are two or more groups.
Next build the 5D space polygon groups from the lists.
Next if a 5D space polygon portal wall connects to a polygon that is not on the group list then build those portal walls.
Next flip the normals on the portal walls so they point outward from the polygon group.
Next put stencil shaders on the 5D space polygons and stencil shaders to the portal walls.
Next assign reference numbers to the different groups stencil shaders, different number for each group.
Next both portal walls and 5D space polygons of the same group share the same reference number.
Next the 5D space polygons stencil shader comparison function is set to equal and the portal walls are set to always.
Next change the render queue for each group, render queue is different for each group. (important)
Next check the 5D space polygon groups if they intersect with each other and assign them to different layers.
Next two groups of intersecting polygons are separated into two layers, if three groups intersect then three layers.
Next assign layer 8 scripts to layer 8 portals and layer 9 scripts to layer 9 portals.
The layers are changed so they do not interact with each other.
When the player is a certain distance in front of the portal then the player changes layers to match that group.
I don't know exactly how to make this and I'm not an expert in C#.
https://forum.unity.com/threads/sharing ... ct.986004/