This is something I’ve always been interested in and has always been very awkward in gmod - portals.
Portals are far from being a mere gimmick, they have a wide variety of very interesting uses for gamemodes, mapping, and general shenanigans. For instance, they allow mappers to decouple “inside” areas from “outside” areas, they allow coders to duplicate instances of the same room/space into multiple locations seamlessly, they can be used for interesting game mechanics or for maps with non-eucledian space.
Rendering portals is fairly straightforward. You set up a custom view point, adjust the cull frustrum so that you don’t render more geometry than needed, and draw over the screen using either stencils or UV mapping over a texture. The crucial part here is the custom cull frustrum - I’m not sure whether gmod had (has?) support for this, but portals had a really bad performance impact if done using the renderview/stencil method.
Another very tricky aspects of portals is handling physics through a portal. This requires being able to create a special kind of “mirroring” constraint between two physics objects (so that they follow each others’ movements relative to the two sides of the portal), and to be able to programmatically ignore contact points. In particular, on a physics object all contact points that appear on the portal or behind it are ignored, so that the object can “go through” walls and not interact with objects its not supposed to.
I don’t think gmod had either of these two things, and most attempts at recreating portals were really jank or prone to strange behaviours. Someone correct me if I’m wrong.
Here’s an example of a portal done using PhysX using the method above (contact points and portal constraint)
Hope this can be done in Rubikon too, and hope we’ll have the necessary bindings to do it