Seamless portal

В hammer на source 1 очень нехватает бесшовного портала как в игре portal 2, и очень хотелось бы увидеть его на новом движке в более доработанном виде, а именно передачу звуков. Этого инструмента мне очень не хватала для карт, и через скрипты от сообщества мне удалось получить лишь более-менее рабочий только в плоскости стен, но не потолков и полов. Прошу добавить данный инструмент для создания безумных карт ломающих голову!

Google Translate
Hammer on source 1 really lacks a seamless portal like in the game portal 2, and I would really like to see it on the new engine in a more refined form, namely the transmission of sounds. I really missed this tool for maps, and through scripts from the community I managed to get only more or less working only in the plane of walls, but not ceilings and floors. Please add this tool to create crazy mind-breaking maps!


I think there’s already a few members of the community planning on doing portal mechanics. I think they should be possible with the tools we have right now, especially custom shaders and all that.

1 Like

В любом случае порталы либо получатся недостаточно функциональными, либо это затянется на долгое время. Даже по сей день в gmod нет скриптов которые буду работать хотя бы не хуже чем порталы в portal 2.
Поэтому я хочу увидеть данный инструмент в стандартных инструментах hammer sbox в наилучшем исполнение о Гарри.

1 Like

S&box (or even Garry’s Mod) is not about portals, there is no good reason to implement it in first place.

Portal was a game built around this feature and I’m pretty sure it was a hard work to make portals work properly as many different systems are required to handle these portals. I believe this will become a disaster in a sandbox game as there will be countless bugs with custom maps or add-ons or even new features in game updates from the devs.

Also, I assume you should write in english on english-speaking forum.


Да верно, игра не о порталах, а обо всем, и порталам в этом всем тоже есть место.

Вот именно что порталы работали отлично на старинном движке за исключением звука. И переписать скрипт основываясь на то что есть большого труда не составит. Не понял что ты имел во 2-ой части абзаца и не понимаю о каких возможных ошибках идет речь.

Форум не англоязычный, и писать я могу и буду на языке котором хочу.

1 Like

Layla has recently commented on how better and more customizable sound mechanics is something he/she is interested in, so even if a portal mechanic needs to be implemented by the community, the prospect of sounds and even voice being properly transmitted through them is still there, which is nice.

As to how this could be implemented if not directly by FP: Maybe if map geometry is editable during play, you can carve a box on the wall where the portal is shot and create a special shader to properly render the other side even if you are standing halfway through it.

I disagree, S&box (or even Garry’s Mod, to a lesser extent) is definitely about portals, simply because portals are a thing you can create. Same goes for flying machines, player customization, roleplay, melonbomber, etc.

What @Tastandut is basically asking for is that, since the mechanic he is interested in requires physics and geometry to play nice with him, support might have to be build in at an engine level to make this reasonably performant, specially if you want to be able to stand between portals, and not simply teleport to the other side when you touch a wall.

Não tem nada escrito nas regras de conduta do forum falando sobre manter as discussões em inglês (que bom!), e sinceramente, essa expectativa de que discussões devem ser feitas na sua lingua nativa é algo que somente pessoas que falam inglês como primeira lingua possuem, o resto entende que o munto é muito pluralizado pra isso que acomodações precisam ser feitas. Se você deseja que seu post atinja a maior quantidade de pessoas possivel, talvez você deva excrever em inglês, mas isso é algo totalmente opcional.

If a language restriction is put in place, I will abide to it, but if not, it takes 2 seconds and we do it all the time.


Yeah you are right, if there is no rule to speak only English then @garry should certainly add it.

Assuming that people should translate your posts because you’re lazy to at least translate them using Google translate is super rude and disrespectful.

I am also russian but I make the required effort, so please do too.


Молодец, и это отличный повод для @garry (если это вообще в его силах) добавить встроенный переводчик на форум который по нажатию 1 кнопки будет переводить с любого языка на английский, ибо гугл умеет определять подаваемый ему язык.

Google Translate
Well done, and this is a great excuse for @garry (if it is in his power at all) to add a built-in translator to the forum that, by pressing 1 button, will translate from any language into English, because Google can determine the language served to him.


I don’t really care about Portal styled portals, but I think it’d be really interesting if noone had to worry about the limitations of Euclidean space when mapping. That’d be a draw for a lot of people I assume.

I’m talking about doorways leading to the other side of the map without you necessarily realizing it, and lazy mappers adding spaces that would technically overlap each other. Imagine what those crazy abstract nipper maps would be like.

Most likely some engine edits or sketchy hacks will be required to make portals truly convincing in every way, so at least making sure a stable addon implementation is possible would be nice.


Я и говорил о порталах переход между которыми незаметен, и не в коем случае не имел виду дешевую онанжево-синию окантовку портала. Данные порталы есть в игре portal 2 для hammer и называется данная entity: linked_portal_door. Он позволяет сделать портал ломающий голову, но для многопользовательской игры он не подходит так как портал не переносит звуки и не может даже идти речи об их использовании в режимах где важен каждый шорох врага как в режиме TTT.
вот картинка с заставкой карты portal 2 где и понятен смысл данного портала.

Google translate
I talked about the portals, the transition between which is imperceptible, and in no way did I mean the cheap onange-blue edging of the portal. These portals are in the game portal 2 for hammer and they are called this entity: linked_portal_door. It allows you to make a portal that breaks your head, but it is not suitable for a multiplayer game, since the portal does not transfer sounds and there can even be no question of using them in modes where every rustle of the enemy is important, like in TTT mode.
here is a picture with the intro of the portal 2 map where the meaning of this portal is clear.

Вот кстати ссылка на скрипт на подобный портал который работает на gmod. Он мне однажды помог, и даже по моей просьбе поправил несколько багов с порталом, но карта все равно не получилась из-за глупых лимитов карты. Может каму нибудь он и понадобится.
By the way, here is a link to a script for a similar portal that runs on gmod. He helped me once, and even at my request he fixed several bugs with the portal, but the map still did not work because of the stupid map limits. Maybe someday he will need it.


I see the rendering part of this utilizing the Shader aspects Sam has been working up!


This is quite a complicated problem even for a singleplayer game, but for multiplayer it gets even harder.
I personally wouldn’t like to see portals support shipped with the game because it would encourage people using them too much without prior thought, leading to laggy maps and servers.

Portals are expensive to render (you need a whole separate render pass to draw their contents), the physics and sound engines would also need to support them, which would possibly bring additional overhead.

Valve’s Portal games make sure to keep maps simple and easy to render, small circular portals are also small for a reason, culling geometry in the portal greatly reduces the render cost, but the bigger the portal is and the closer you are to it, the more expensive it gets.


You wouldn’t need a shader to render portals, if anything a custom render pass would be needed, with stencil buffer clipping and that sort of thing. It’s something that needs to be implemented in the renderer as a feature not something we can really mod in easily. At least, without it being slow as shit anyway.

1 Like

This is a very good argument against shipping it by default. In my experience the majority of GMod’s community at least value novelty over more subtle concerns, so I can see it being misused rather a lot.

Nothing wrong with a map that takes advantage of it requiring a portal addon, except maybe poor programming and breaking upon updates.

So, at least making it practical and stable for the community to implement themselves would be ideal. I agree with @Legend286 that someone without the needed engine access would likely suffer from unnecessary performance impacts, and that’s assuming they could actually achieve an identical result.

1 Like

Ah alright, thanks for the insight!

1 Like

I disagree, while on a first look portals wouldn’t fit well on a game like this, it would come in handy as a replacement for teleports while adding style to it and communicating the player on where they will go in a more direct way, in Portal 2 they can be one way or double way and that amount of flexibility is really welcome for connecting areas that under normal circumstances, would be impossible to connect because of overlapping. Not saying teleports should be removed but it’s good to have options

And i suppose that may happen, so it may be better off as a separate addon by the community, also since the amount of time spent by the devs working on something rather niche could be well spent somewhere else

1 Like