Thank you all for the support!~ 💕 I have wanted to make this video for almost *10* years now. Stay tuned for more, consider Subscribing for more potential Portal 2 content... 👁👁
As far as i remember, the intro cutscene's weird physics is why speedrunners start from a save after it. Something about it being impossible to use any speed-tech to get to the end of the cutscene any quicker than casually.
Isn't that kind of cheating? Also, what I do is, while the announcer is saying his first line, I immediately walk over to the painting and look up so I'm already in position for the first buzzer and the painting which saves time.
@@NukeDragon-ry2xw I think they add the time of the intro afterwards, so it's not uncounted. There are some minor optimizations you can do, but mostly it's on-rails so you can't really make it go any quicker. The room you're physically stuck in is made of world brushes, with no physics objects or portal gun, which is what most skips use.
@@sourestcake I've not seen the runs in question, but I'd assume they'd still need to incorporate everything leading up to the final player input that triggers the movement sequence into the run. After all, not every player is going to cause Wheatley to enter the room in the same amount of time, press the jump button to "say apple" in the same amount of time, etc. Same logic as to why Ocarina of Time speedrunners can't just skip the intro cutscene with a save state.
Hi casual Portal 2 speedrunner here. The intro section in question is completely skipped up until the point where the orange portal opens in what is left of the relaxation vault. This skips roughly 5 mins of boring and tedious gameplay. In the event that a "full run" needs to be shown, runners often record demos that can be replayed ingame. This intro section has a sort of "community demo" that you can stitch onto the start of your run to have it show the entire game. This means that everyone is effectively running the exact same intro section but you only gain control once you reach the relaxation vault. As for why it's skipped, I'm not entirely sure but i know it would be a real nuisance to have to sit through what is effectively 5 minutes of standing still, so I like it
The two "lightswitch" teleports are indeed due to issues with togglable lights in source. It is actually a less painful solution to have duplicate rooms with different lighting setups than having a bunch of lights be toggled. As for the world portal bit - the custom test chambers from the perpetual testing editor actually use world portals as well, one for entrance and exit from the test chamber, with entry and exit elevators being placed elsewhere within the level.
In hindsight, when considering the retro chamber specifically, there’s TONS of different kinds of lights. So definitely yes, it’s an easy way around that nightmare, lol.
Yup, the main issue with togglable lights is that the vrad light compiler needs to compile the lighting for each light state, the more togglable lights the more potential states thus longer compilation time and filesize.
You can actually make impossible geometry in a custom chamber with this. While the editor blocks you from putting geometry where the entrance and exit hallways would be, it does not account for the elevator shafts.
I was already aware of the "Stationary Fall" trick. This happened when I (who loves the Portal series and spends hundreds of hours total on in), discovered that the player movement is still on during the Fall. I collided with POTaTOS' hitbox on timing that made me clip out of shaft, making me still fall outside of the map, continuously teleporting me to the top every few seconds. At the end I continued to fall until I hit the "true" bottom of the map, which triggered a death-like sequence. Note: I did this on Xbox One
I absolutely adore that, after 12 years, this game still has secrets that we can uncover thanks to a wonderful community of passionate fans. This franchise is simply one of a kind.
9:24 The room IS an impossible space because the floor of the test chamber is thicker from the outside than it is from the inside: The exit door is level with the ground (from the inside) but from outside you can see that it is located a few meters above the bottom of the chamber, making the floor really thick. However, looking through the hole in the floor that you shoot a portal through the floor appears only a few inches thick. That is what's impossible about the space.
I distinctly remember some of those dramatic changes in lighting and being like "wow, they must have really updated source's lighting." Nope, still baked lightmaps. Teleporting to another precalculated area is a neat way to squeeze more life out of the dated engine though.
Another thing I *_just_* remembered is that the testing spheres in the 'underground' levels are smaller on the outside (or the insides being bigger). Most people just don't notice it, as both are relatively big compared to the player anyway.
I remember noticing this a few years back. I was sketching a map of the chambers based on those “you are here” diagrams, and something about the spacing wasn’t adding up. I dubbed them “TARDIS-spheres” afterwards lol
@@dubioustheatreyt8096 I was tempted to make a Tardis reference myself! Cave Johnson really loved to mess with time & space a lot, to the point where he just straight up made Tardis Spheres to 'fit more science inside of science'.
@@protoborgthey aren't world portals in this instance lol, they're map transitions there's only one exception, that being the conversion gel intro, but there the sphere is actually smaller
As I recall, they said in the Dev commentary that the wake up room was done like that mainly because the physics of moving and destroying the room were so complicated they had to precalculate it all, and having the player able to interact with all of it would've made it possible for the physics to be changed.
No one ever talks about it, but given I have spend too much time in this game as well as what makes the maps tick. At the map you wake up glados she throws you into an incinerator, this is yet another "world portal" as the space under it is impossible to fall through, this is the most unlisted thing in portal 2 but like the wheatley room it allows players to fall into the incinerator.
@@protoborg ...no??? Go into the game, enable no clip, you will see that all the elevators are connected to the test chambers, no world portals involved.
@@lake4433 He means before unloading a level. While navigating in an elevator. It's easiest while you are still waiting for dialogue to see it repeats (it's repetition is due to a world portal)
Lights that can be toggled are rather unpleasant and can bleed through walls in some cases, whereas non-toggleable lights appear more accurate and in better quality (not to forget that animated lights can cause severe framerate issues in larger areas) hence why you get teleported from one room to another when the lights are drastically different. And it's easier too, avoiding having to toggle every single light entity, you just get teleported in a room where the lights are already on by default. At least that comes from my own observation and experience, that is.
A similar but more primitive technique was already used back in Blueshift when the elevator drops. It actually drops a bit but then they just put the shaft walls on the outside that move upwards and repeat. I think it literally was just a func_train. The "fall" in Blueshift doesn't take that super long but it seems it was long enough to apply this trick. It probably also avoided physics glitches since the actual elevator was just held stationary. I've found the footage here around 10m in: NQghsJenN84#t=10m10s The same two pieces of wall was moved along the side about 9 times before you "crash". For portal 2 they put a lot more efford into this effect :) Well, Portal came out 10 years later, so we can expect "some" progress :D
The reason why the "seamless teleports" are used is because source doesn't like dynamic lighting. Yes, you CAN have I/O controlled pre-baked lighting, but in such cases there is no second bounce, meaning that the best solution without compromising performance on actual dynamic lighting is to create two rooms, each with the lighting conditions you want.
@@That_Mr_Mike oh also, there's two more sneaky places I know of where the game silently teleports you. When Glados gives you the surprise, the lights go out, and when they come back on, the game faces you towards the room. Similar thing happens in Wheatley's flashlight
@@zarrg5611 Precisely. In theory, light bounces an infinite amount of times. In source engine, all "lightmap-lit" surfaces get their lighting from a static light map, comprising of pre-calculated lighting data for all of the map's static geometry. For every face a toggle-able light group, two variations of these light maps specific to these faces must be made. If more than one toggle able light group shines at a face, you need exponentialy more lightmaps for any possible combination of affecting lights being on/off. If every light from toggleable light bounces were to have a second, third or even fourth bounce, you are increasing file sizes massively. Source 2 doesn't have this problem thanks to something called light indexing, where light maps have metadata that tracks which static lights cast what, allowing you to change the light's properties without any drawback or perf loss
I remember hearing about this on the developer commentary. It is such a great way to not have to deal with the weird physics or the player falling of the vault.
there are all these videos with vague title and thumbnails so I really never know if I am getting a video on the story, the beauty, the gameplay, or the technical side of portal, but I always enjoy them
This is a really well made video, this was very informative. I don't know as much about Portal 2 so a lot of these tricks pulled off by the devs were news to me. I really like the editing in this video too. Great job. The bonk at 7:00 was great too lol.
4:22 i believe this is used because toggleable lights in the source engine would all have to have their contribution to the the lighting stored in separate individual lightmaps which would be very heavy on filesize and compile times while also making the map generally a lot messier in hammer. Also I've heard that named or toggleable lights in source don't have bounce lighting but i haven't confirmed this. also at 9:31 i'm pretty sure a world portal is also used for the view down the incinerator shaft in the first version of glados's room
The thought popped in my head so I figured I would share just in case. For all you smooth brains out there, the Earth seen in the ending moon skybox: no this is NOT proof that the earth is flat. smh. Anyway, Valve are incredibly clever with their camera and asset tricks.
This was a really cool deep dive into the dev side of portal 2. My suggestion: You should do a voice over next time. I'm working on my game as I watch this and it was just a tad bit annoying to have to stare at the other monitor for the entire video. I like to hear voice overs because I can switch my perspective from one monitor to the other with ease and without pausing
Technically true! The video just points out the examples of sudden, almost 1 frame teleports to give off the illusion of the player always being in the same space.
@That_Mr_Mike yeah. Absolutely outstanding video by the way. And I know quite alot about the source engine and the maps and hammer, but I had no idea on the 1st one. That blew my mind
My guess on the lighting teleport is that the engine mostly relies on baked lightmaps for "realistic" lighting as this was made in an era that full real time global illumination was just too expensive for most systems to run at a good framerate, especially consoles. The duplicate environments would allow them to have both baked GI lighting setups available for use.
We really need more Portal games. They're just fantastic puzzle games with good humor and interesting mechanics and it'd be a shame to never get another one again. Just one more good sequel. Doesn't have to be the same characters, necessarily. Chell can go live her life. I mean honestly idk how it would work narratively. I don't really want anything to undo the previous games. GLaDOS is still evil and in charge and has kicked Chell out properly this time, and hopefully it stuck, but at the same time, will we really never get taunted by her again? Never to be told we're fat and adopted? That's just not a world I want to live in.
for "seamless teleport" i have some limited knowledge of portal 2 mapping, and something i learned is that lighting in source is just very hard to work dynamically. Most lights are bre-baked into the maps. So for the map to have many lights be able to turn on/off would be very costly. So the logic was that it was cheaper to make a dark and light version in seperate places instead. This is my best guess atleast
4:24 I think I saw a video that explained the reason these two teleports were used was because it was easier to teleport the player to a separate room with preset lights rather than actually work with the lights dynamically in just one room.
5:17 That's actually always what I thought, how the fall was made possible. I already know some of source's quirks for a while, including the map size limit. And I already assumed, that the fall is way too long to fit in a map in one piece. And the first idea to solve this that came to my mind, is putting them exactly like this in seperated pieces beside each other. Though, I thought the player was just falling through a set of world portals. I had no explanation for why you couldn't move, even with coclip on. But still a funny coincident, that I apparently had more or less the same Idea as Valve had, which probably just because it's the most simple solution to that problem.
The second trick which teleports you in the same room with different lighing conditions is beacause in games there is two types of lights. The first one is realtime lighting this is the light where the shadows and light intensity is updated every frame, this type is expensive since the CPU has to calculate alot of things every frame. The second type of lighting is baked light, this type uses a different technique, it calculates shadows and light intensity before the game even start and it becomes part of the object, so for instance when you move an object the shadow won't move with you it will stay still, this technique is used for static objects, like walls, etc.... Note : it is possible to use baked and realtime lights in the same scene.
Lighting in Source is done through pre-rendered, fully raytraced lightmaps The problem with toggling every single light in a scene on and off is that A. It would be too expensive to calculate light bounce, so with toggled lights the source engine doesn't actually capture bounce lighting, and B. It would make the file size of the map too large to justify, since a bunch of lightmaps takes up way more storage than just extra geometry.
In first seconds I almost didn't want to watch the video because there is no narration, but I'm glad i stayed. I think I know Portal very well, but these little tricks I had no idea about. Thanks for the great video! Quite well made too!
Wow, the moon one really blew my mind. I played a lot of Portal 2 but never played the original until recently, so now I'm finally getting a lot of the callbacks that I missed the first time. It was a bit weird seeing the final chamber in its original state and having a vague recollection of the deteriorated version.
Thank you for this. As someone who doesn’t understand programming and code I love to see videos like this to see how my favorite game of all time was made
I love learning about this kinda stuff. Also loved the vid about fixing continuity mistakes in Portal 2, I never even realized that was the incinerator in Portal 2. Definitely subbed ^^
I remember when I first got the game. I bought a physical copy, but that only gave me a steam key (I don't know why), so it took TWO DAYS to download the game on my early 2010's internet. After multiple attempts. And the intro cutscene was WILDLY bugged out. Sometimes I couldn't move at all. Sonetimes I couldn't jump. Major assets were replaced by giant, floating, blue "ERROR" signs. I think I had to reinstall the game multiple times before I could play. And the funniest one was that sometimes, the room would just fly away from me instead of moving me with it, leaving me soft-locked in the void. Good times. 😂
Another Seamless Teleport is used in the second-to-last Wheatley test chamber, the one before the trick one. At the end of the chamber after the exit door closes you are teleported to a different version of the room.
I think the reason that the seamless teleports are used when lighting is updated might be because in Source, a lot of lighting is ray traced, but baked into the map file. I know that's how CS maps often work. This means the lighting looks wonderful, but can't be updated in normal play. For something like a flashlight, or a spotlight, a toggle light might be fine, but for the normal lighting in the map, probably not.
I love learning about behind-the-scenes stuff like this, be it movie or video game or whatnot. It doesn't ruin the magic, imo it actually makes it MORE magical oftentimes, as the 'hows' are just as impressive as the effects they create. It's the magic behind the magic!
This video was incredibly well made, with the amazing transitions and choice of music. Really interesting topic too. Geniunely took me for shock so well done!
I'm sure plenty of other people have commented this already, so sorry in advance, but as for why the teleportation occurs in environments where the lights change is due to the way the source engine handles lighting. lighting is baked into the environment during the compilation of the map, and dynamic lights are very resource intensive (relatively speaking) so it would be cheaper to teleport the player to a duplicated environment with lighting that's been baked differently than to redo the lighting at runtime.
I think someone needs to come up with a Stanley parable like game where world portals constantly dump you back at the beginning of the game rather than the game suddenly stop and restart. For example, grabbed by the Ghoulies constantly loops back to the first room, but each room is a separate level. This technique could be used to directly carry over all of the level geometry and connect each room to the next without worrying about making everything line up.
I'm so glad this video goes into actual technical detail and showing the maps in hammer, and isn't one that's like "portal 2 has these tiny skyboxs to make distant things look bigger" Everyone has noclipped before everyone knows what a 3D skybox is it's the same tier of trivia as super Mario bros 2 actually originating as a different game Anyway very good video
@@That_Mr_Mike i was pretty tired and cranky when i wrote that lol, a small quick explanation for people who arent familiar with it would have been fine tbh
Source nerd here! The reason for not using dynamic lights in the seamless transition area is because Source, even in 2011, baked lightmaps. And using dynamic lights means that the map compiler has to bake two versions of the light maps, increasing both compile times, and file size. It’s faster to compile the same two versions visable leafs (Vis-Leafs), than it is to have hundreds of dynamic lights being baked all at the same time. All lights have to be baked, and with dynamic ones, its more expensive, and thus the larger file size.
The fact I found the impossible space while just having fun with funnel fly glitch... Wow, I never knew this is actually why my y cord went from 0 to like 18k.
Fantastic video! There is one more seamless teleport that I'm aware of. At the end of the last chamber in chapter eight, there's a tiny room between the exit door and elevator room that's used for a teleport, hidden within a forced camera shake. It was done so that the developers didn't have to put in excessive work hiding the giant elevator shaft. I've always found this one to be a little odd, since there isn't a change in lighting like the other teleports. It could have been done with a world portal, which I thought would have been easier, but I guess not.
Teleporting to toggle lights could have been done so that both the lit and unlit versions were using static lighting, far cheaper than dynamic lights. In addition it would be far easier to preview and adjust the lighting for both in the editor with both versions easily accessible.
In the case of the first scenario with the moving room, you can actually see when you're in the "real room," because of the lack of a crosshair. As soon as you're teleported to the fake room at the end of the sequence, your crosshair comes back.
With The Fall, I'd speculate that the brushes didn't work well enough so they just slapped in the 'player_speedmod' mod in and didn't bother to remove the brushes because compiling maps takes a long time.
pretty sure that the seamless teleport is used in those two cases because valve wanted the version with light to have baked shadows, i'm just guessing though
I’m a game dev, and the reason why they teleport you between the two rooms seamlessly, with one being more illuminated than the other, is so that the game won’t require dynamic lights that need to be turned off. The lighting information is most likely baked into the textures in those rooms, which is more computationally efficient than rendering lighting information in real-time, so this method of teleporting seamlessly versus actually turning off/on all the lights is probably just to save on computational resources.
Thank you all for the support!~ 💕 I have wanted to make this video for almost *10* years now.
Stay tuned for more, consider Subscribing for more potential Portal 2 content... 👁👁
As far as i remember, the intro cutscene's weird physics is why speedrunners start from a save after it. Something about it being impossible to use any speed-tech to get to the end of the cutscene any quicker than casually.
Omg a fellow brony
Isn't that kind of cheating? Also, what I do is, while the announcer is saying his first line, I immediately walk over to the painting and look up so I'm already in position for the first buzzer and the painting which saves time.
@@NukeDragon-ry2xw I think they add the time of the intro afterwards, so it's not uncounted. There are some minor optimizations you can do, but mostly it's on-rails so you can't really make it go any quicker. The room you're physically stuck in is made of world brushes, with no physics objects or portal gun, which is what most skips use.
@@sourestcake I've not seen the runs in question, but I'd assume they'd still need to incorporate everything leading up to the final player input that triggers the movement sequence into the run. After all, not every player is going to cause Wheatley to enter the room in the same amount of time, press the jump button to "say apple" in the same amount of time, etc. Same logic as to why Ocarina of Time speedrunners can't just skip the intro cutscene with a save state.
Hi casual Portal 2 speedrunner here. The intro section in question is completely skipped up until the point where the orange portal opens in what is left of the relaxation vault. This skips roughly 5 mins of boring and tedious gameplay. In the event that a "full run" needs to be shown, runners often record demos that can be replayed ingame. This intro section has a sort of "community demo" that you can stitch onto the start of your run to have it show the entire game. This means that everyone is effectively running the exact same intro section but you only gain control once you reach the relaxation vault. As for why it's skipped, I'm not entirely sure but i know it would be a real nuisance to have to sit through what is effectively 5 minutes of standing still, so I like it
The two "lightswitch" teleports are indeed due to issues with togglable lights in source. It is actually a less painful solution to have duplicate rooms with different lighting setups than having a bunch of lights be toggled.
As for the world portal bit - the custom test chambers from the perpetual testing editor actually use world portals as well, one for entrance and exit from the test chamber, with entry and exit elevators being placed elsewhere within the level.
In hindsight, when considering the retro chamber specifically, there’s TONS of different kinds of lights. So definitely yes, it’s an easy way around that nightmare, lol.
Yup, the main issue with togglable lights is that the vrad light compiler needs to compile the lighting for each light state, the more togglable lights the more potential states thus longer compilation time and filesize.
@@AsG_Alligator Oh I see, that would make sense then.🤔
@@AsG_Alligator Do you think Desolation lighting engine would fix that?
You can actually make impossible geometry in a custom chamber with this. While the editor blocks you from putting geometry where the entrance and exit hallways would be, it does not account for the elevator shafts.
I was already aware of the "Stationary Fall" trick. This happened when I (who loves the Portal series and spends hundreds of hours total on in), discovered that the player movement is still on during the Fall. I collided with POTaTOS' hitbox on timing that made me clip out of shaft, making me still fall outside of the map, continuously teleporting me to the top every few seconds. At the end I continued to fall until I hit the "true" bottom of the map, which triggered a death-like sequence. Note: I did this on Xbox One
I absolutely adore that, after 12 years, this game still has secrets that we can uncover thanks to a wonderful community of passionate fans.
This franchise is simply one of a kind.
9:24 The room IS an impossible space because the floor of the test chamber is thicker from the outside than it is from the inside: The exit door is level with the ground (from the inside) but from outside you can see that it is located a few meters above the bottom of the chamber, making the floor really thick. However, looking through the hole in the floor that you shoot a portal through the floor appears only a few inches thick. That is what's impossible about the space.
Nice catch!
That lighting cut is a great way to have good looking baked lighting with lights on and off and no need for dynamic lights
I distinctly remember some of those dramatic changes in lighting and being like "wow, they must have really updated source's lighting." Nope, still baked lightmaps. Teleporting to another precalculated area is a neat way to squeeze more life out of the dated engine though.
Another thing I *_just_* remembered is that the testing spheres in the 'underground' levels are smaller on the outside (or the insides being bigger).
Most people just don't notice it, as both are relatively big compared to the player anyway.
I remember noticing this a few years back. I was sketching a map of the chambers based on those “you are here” diagrams, and something about the spacing wasn’t adding up. I dubbed them “TARDIS-spheres” afterwards lol
@@dubioustheatreyt8096
I was tempted to make a Tardis reference myself!
Cave Johnson really loved to mess with time & space a lot, to the point where he just straight up made Tardis Spheres to 'fit more science inside of science'.
Another instance of world portals that people ignore completely.
@@protoborgthey aren't world portals in this instance lol, they're map transitions
there's only one exception, that being the conversion gel intro, but there the sphere is actually smaller
@@MrGermandeutsch _What's better science than science that gives you 50% more science per science?_
-Cave Johnson
As I recall, they said in the Dev commentary that the wake up room was done like that mainly because the physics of moving and destroying the room were so complicated they had to precalculate it all, and having the player able to interact with all of it would've made it possible for the physics to be changed.
No one ever talks about it, but given I have spend too much time in this game as well as what makes the maps tick. At the map you wake up glados she throws you into an incinerator, this is yet another "world portal" as the space under it is impossible to fall through, this is the most unlisted thing in portal 2 but like the wheatley room it allows players to fall into the incinerator.
Oh shoot, you’re totally right! Interesting!
Every elevator you encounter in the map uses a world portal, genius. THAT is the most "unlisted" thing in Portal 2.
@@protoborg r/confidentlyincorrect
@@protoborg ...no??? Go into the game, enable no clip, you will see that all the elevators are connected to the test chambers, no world portals involved.
@@lake4433 He means before unloading a level. While navigating in an elevator. It's easiest while you are still waiting for dialogue to see it repeats (it's repetition is due to a world portal)
Lights that can be toggled are rather unpleasant and can bleed through walls in some cases, whereas non-toggleable lights appear more accurate and in better quality (not to forget that animated lights can cause severe framerate issues in larger areas) hence why you get teleported from one room to another when the lights are drastically different.
And it's easier too, avoiding having to toggle every single light entity, you just get teleported in a room where the lights are already on by default.
At least that comes from my own observation and experience, that is.
Also shadow and light maps!
I always thought the fall was using the classic infiniting looping hallway trick, that's much more interesting (and probably better tbh)
I thought it'd be some 3d skybox trickery with how long the fall is, didn't know it was split up to segments like that
A similar but more primitive technique was already used back in Blueshift when the elevator drops. It actually drops a bit but then they just put the shaft walls on the outside that move upwards and repeat. I think it literally was just a func_train. The "fall" in Blueshift doesn't take that super long but it seems it was long enough to apply this trick. It probably also avoided physics glitches since the actual elevator was just held stationary. I've found the footage here around 10m in:
NQghsJenN84#t=10m10s
The same two pieces of wall was moved along the side about 9 times before you "crash". For portal 2 they put a lot more efford into this effect :) Well, Portal came out 10 years later, so we can expect "some" progress :D
I've been watching portal videos for over a decade, and this is probably the best one I've ever seen
Oh wow, much appreciated haha. ✌
I agree as it actually had some new interesting information. Idk any other video that has explained most of these things.
the transition at 7:01 was amazing
Thank you, it's my favorite unintentional transition, lmao.
"when life hits your face with a cube, you make a transition"
or... was it a lemonade..?
Idk why but it scared the hell out of me. Goddamn jumpscare transition Xd
It scared the fuck out of me. Was the last thing I was expecting lmao
Yeah major jumpscare
I had no idea about the fall one, thats crazy and also really clever
I figured there was trickery going on due to the hammer unit limit, but I didn’t know about the intro room!
@@ghost_ship_supremePortal 2 is full of mysteries! 👁️👁️
It's also completely WRONG.
how?@@protoborg
but i think they could've made the whole fall to be in 1 section if they made the skybox scale larger than 16
The reason why the "seamless teleports" are used is because source doesn't like dynamic lighting. Yes, you CAN have I/O controlled pre-baked lighting, but in such cases there is no second bounce, meaning that the best solution without compromising performance on actual dynamic lighting is to create two rooms, each with the lighting conditions you want.
Agree, totally makes sense to me in hindsight. 🤔
@@That_Mr_Mike oh also, there's two more sneaky places I know of where the game silently teleports you. When Glados gives you the surprise, the lights go out, and when they come back on, the game faces you towards the room. Similar thing happens in Wheatley's flashlight
Is that why you can get weird black areas when useing lights with variable brightness or a toggle?
@@zarrg5611 Precisely. In theory, light bounces an infinite amount of times. In source engine, all "lightmap-lit" surfaces get their lighting from a static light map, comprising of pre-calculated lighting data for all of the map's static geometry.
For every face a toggle-able light group, two variations of these light maps specific to these faces must be made. If more than one toggle able light group shines at a face, you need exponentialy more lightmaps for any possible combination of affecting lights being on/off. If every light from toggleable light bounces were to have a second, third or even fourth bounce, you are increasing file sizes massively.
Source 2 doesn't have this problem thanks to something called light indexing, where light maps have metadata that tracks which static lights cast what, allowing you to change the light's properties without any drawback or perf loss
I remember hearing about this on the developer commentary. It is such a great way to not have to deal with the weird physics or the player falling of the vault.
there are all these videos with vague title and thumbnails so I really never know if I am getting a video on the story, the beauty, the gameplay, or the technical side of portal, but I always enjoy them
The Mystery Box of content, lol. 🎁
The fall to the incenerator is also stationary, but not all of it. You speed up to 2500 ups and than stop, when you start to hit the walls
This is a really well made video, this was very informative. I don't know as much about Portal 2 so a lot of these tricks pulled off by the devs were news to me. I really like the editing in this video too. Great job.
The bonk at 7:00 was great too lol.
4:22 i believe this is used because toggleable lights in the source engine would all have to have their contribution to the the lighting stored in separate individual lightmaps which would be very heavy on filesize and compile times while also making the map generally a lot messier in hammer. Also I've heard that named or toggleable lights in source don't have bounce lighting but i haven't confirmed this.
also at 9:31 i'm pretty sure a world portal is also used for the view down the incinerator shaft in the first version of glados's room
It surprises me how smooth the teleportation is. Good job Valve.
The thought popped in my head so I figured I would share just in case. For all you smooth brains out there, the Earth seen in the ending moon skybox: no this is NOT proof that the earth is flat. smh.
Anyway, Valve are incredibly clever with their camera and asset tricks.
Perhaps proof of a flat earth in the Half-Life universe?… 🤔
Lmao
This was a really cool deep dive into the dev side of portal 2. My suggestion: You should do a voice over next time. I'm working on my game as I watch this and it was just a tad bit annoying to have to stare at the other monitor for the entire video. I like to hear voice overs because I can switch my perspective from one monitor to the other with ease and without pausing
There is also another Semingless teleport somewhere at the end of the game where you get teleported to a different room
Technically true! The video just points out the examples of sudden, almost 1 frame teleports to give off the illusion of the player always being in the same space.
@That_Mr_Mike yeah. Absolutely outstanding video by the way. And I know quite alot about the source engine and the maps and hammer, but I had no idea on the 1st one. That blew my mind
5:15 same technique is used in hl2 d3_citadel_05
My guess on the lighting teleport is that the engine mostly relies on baked lightmaps for "realistic" lighting as this was made in an era that full real time global illumination was just too expensive for most systems to run at a good framerate, especially consoles.
The duplicate environments would allow them to have both baked GI lighting setups available for use.
We really need more Portal games. They're just fantastic puzzle games with good humor and interesting mechanics and it'd be a shame to never get another one again. Just one more good sequel. Doesn't have to be the same characters, necessarily. Chell can go live her life.
I mean honestly idk how it would work narratively. I don't really want anything to undo the previous games. GLaDOS is still evil and in charge and has kicked Chell out properly this time, and hopefully it stuck, but at the same time, will we really never get taunted by her again? Never to be told we're fat and adopted? That's just not a world I want to live in.
for "seamless teleport" i have some limited knowledge of portal 2 mapping, and something i learned is that lighting in source is just very hard to work dynamically. Most lights are bre-baked into the maps. So for the map to have many lights be able to turn on/off would be very costly. So the logic was that it was cheaper to make a dark and light version in seperate places instead.
This is my best guess atleast
11:38 "SUN ALSO CONFIRMED FOR FLAT!"
I was always impressed with the relaxation pod scene, especially considering it's a source game. Just got to work around the limitations.
That's just clever game design
Beautiful, well researched and entertaining video. One of the best Portal videos I've seen!
4:24 I think I saw a video that explained the reason these two teleports were used was because it was easier to teleport the player to a separate room with preset lights rather than actually work with the lights dynamically in just one room.
5:17 That's actually always what I thought, how the fall was made possible. I already know some of source's quirks for a while, including the map size limit. And I already assumed, that the fall is way too long to fit in a map in one piece. And the first idea to solve this that came to my mind, is putting them exactly like this in seperated pieces beside each other. Though, I thought the player was just falling through a set of world portals. I had no explanation for why you couldn't move, even with coclip on. But still a funny coincident, that I apparently had more or less the same Idea as Valve had, which probably just because it's the most simple solution to that problem.
The second trick which teleports you in the same room with different lighing conditions is beacause in games there is two types of lights. The first one is realtime lighting this is the light where the shadows and light intensity is updated every frame, this type is expensive since the CPU has to calculate alot of things every frame. The second type of lighting is baked light, this type uses a different technique, it calculates shadows and light intensity before the game even start and it becomes part of the object, so for instance when you move an object the shadow won't move with you it will stay still, this technique is used for static objects, like walls, etc....
Note : it is possible to use baked and realtime lights in the same scene.
Lighting in Source is done through pre-rendered, fully raytraced lightmaps
The problem with toggling every single light in a scene on and off is that
A. It would be too expensive to calculate light bounce, so with toggled lights the source engine doesn't actually capture bounce lighting, and
B. It would make the file size of the map too large to justify, since a bunch of lightmaps takes up way more storage than just extra geometry.
In first seconds I almost didn't want to watch the video because there is no narration, but I'm glad i stayed. I think I know Portal very well, but these little tricks I had no idea about. Thanks for the great video! Quite well made too!
Wow, the moon one really blew my mind. I played a lot of Portal 2 but never played the original until recently, so now I'm finally getting a lot of the callbacks that I missed the first time. It was a bit weird seeing the final chamber in its original state and having a vague recollection of the deteriorated version.
Thank you for this. As someone who doesn’t understand programming and code I love to see videos like this to see how my favorite game of all time was made
So interesting, i love learning about tricks developers use when making my favourite games.
I love learning about this kinda stuff. Also loved the vid about fixing continuity mistakes in Portal 2, I never even realized that was the incinerator in Portal 2. Definitely subbed ^^
I remember when I first got the game. I bought a physical copy, but that only gave me a steam key (I don't know why), so it took TWO DAYS to download the game on my early 2010's internet. After multiple attempts. And the intro cutscene was WILDLY bugged out.
Sometimes I couldn't move at all. Sonetimes I couldn't jump. Major assets were replaced by giant, floating, blue "ERROR" signs. I think I had to reinstall the game multiple times before I could play. And the funniest one was that sometimes, the room would just fly away from me instead of moving me with it, leaving me soft-locked in the void.
Good times. 😂
Another Seamless Teleport is used in the second-to-last Wheatley test chamber, the one before the trick one. At the end of the chamber after the exit door closes you are teleported to a different version of the room.
Oh hell nah... Cool video
I think the reason that the seamless teleports are used when lighting is updated might be because in Source, a lot of lighting is ray traced, but baked into the map file. I know that's how CS maps often work. This means the lighting looks wonderful, but can't be updated in normal play. For something like a flashlight, or a spotlight, a toggle light might be fine, but for the normal lighting in the map, probably not.
Extremely underated video and channel, something so weirdly nostalgic about this video...
Amazing video! It's so neat seeing all the weird little tricks source uses
I love learning about behind-the-scenes stuff like this, be it movie or video game or whatnot. It doesn't ruin the magic, imo it actually makes it MORE magical oftentimes, as the 'hows' are just as impressive as the effects they create. It's the magic behind the magic!
This is a FANTASTIC video. Love getting to see the weird aspects of Source games (especially Portal). Very well edited, too.
Thanks! ✌️
the transition at 7:00 is so cool
This video was incredibly well made, with the amazing transitions and choice of music. Really interesting topic too. Geniunely took me for shock so well done!
I'm sure plenty of other people have commented this already, so sorry in advance, but as for why the teleportation occurs in environments where the lights change is due to the way the source engine handles lighting. lighting is baked into the environment during the compilation of the map, and dynamic lights are very resource intensive (relatively speaking) so it would be cheaper to teleport the player to a duplicated environment with lighting that's been baked differently than to redo the lighting at runtime.
Oh man, how does this only have 35 views?
I think someone needs to come up with a Stanley parable like game where world portals constantly dump you back at the beginning of the game rather than the game suddenly stop and restart.
For example, grabbed by the Ghoulies constantly loops back to the first room, but each room is a separate level. This technique could be used to directly carry over all of the level geometry and connect each room to the next without worrying about making everything line up.
I'm so glad this video goes into actual technical detail and showing the maps in hammer, and isn't one that's like "portal 2 has these tiny skyboxs to make distant things look bigger"
Everyone has noclipped before everyone knows what a 3D skybox is it's the same tier of trivia as super Mario bros 2 actually originating as a different game
Anyway very good video
I had a section recorded quickly explaining skyboxes, but left it out feeling it dragged the video for too long and being unfitting.
@@That_Mr_Mike i was pretty tired and cranky when i wrote that lol, a small quick explanation for people who arent familiar with it would have been fine tbh
Thank you for using portal 1 ost, it really add an atmosphere to ur video, great job !
Source nerd here!
The reason for not using dynamic lights in the seamless transition area is because Source, even in 2011, baked lightmaps. And using dynamic lights means that the map compiler has to bake two versions of the light maps, increasing both compile times, and file size. It’s faster to compile the same two versions visable leafs (Vis-Leafs), than it is to have hundreds of dynamic lights being baked all at the same time. All lights have to be baked, and with dynamic ones, its more expensive, and thus the larger file size.
Ohh~ Interesting, thanks for sharing! 🤔
9:35 Is NOT a Chainsaw Man reference. ( it is. )
How did I never know the moon one? that's so cool!
This is high quality! Hope you get more views :)
it's crazy that you can still learn new things about this game so many years later.
The fact I found the impossible space while just having fun with funnel fly glitch... Wow, I never knew this is actually why my y cord went from 0 to like 18k.
I always knew there were multiple tricks used but always thought they were different. Very interesting.
Really nice video, thank you for uploading!
9:36 ah, the Escherian Stairwell, a classic world portal maneuver
You know I was expecting this to be some kind of analysis of the story, but honestly this is even better. I love little bits of trivia like this :D
The cube at 7:01 scared the shit out of me
Really cool video! Really quite amazing to see these clever and creative solutions!
Fantastic video! There is one more seamless teleport that I'm aware of. At the end of the last chamber in chapter eight, there's a tiny room between the exit door and elevator room that's used for a teleport, hidden within a forced camera shake. It was done so that the developers didn't have to put in excessive work hiding the giant elevator shaft.
I've always found this one to be a little odd, since there isn't a change in lighting like the other teleports. It could have been done with a world portal, which I thought would have been easier, but I guess not.
3:18 Why is there a man standing on the platform on the right?
I think its just a optical illusion
I always wondered why the intro sequence seemed to have smoother mouse sensitivity. I wanted to apply that to the rest of the game, but I never could.
Amazing video! It really is all done extremely seamless in game
Teleporting to toggle lights could have been done so that both the lit and unlit versions were using static lighting, far cheaper than dynamic lights. In addition it would be far easier to preview and adjust the lighting for both in the editor with both versions easily accessible.
This is extremely well edited
Wow I never thought it's implemented that way.
im surprised this only has 10k views, this video is fantastic.
Im always a big fan of clever tricks to get arround inherent game limitations.
Love technical deep dives like these, fantastic video!
My assumption about the lighting teleports would be for global illumination reasons.
the game actually does the teleportation trick on the map repulsion polarity (the final map of chapter 8)
In the case of the first scenario with the moving room, you can actually see when you're in the "real room," because of the lack of a crosshair. As soon as you're teleported to the fake room at the end of the sequence, your crosshair comes back.
Programming magic never fails to amaze me
oh wow
also amazing video
With The Fall, I'd speculate that the brushes didn't work well enough so they just slapped in the 'player_speedmod' mod in and didn't bother to remove the brushes because compiling maps takes a long time.
9:55 I GOT SCARED SO HARD BRO 💀💀💀💀
That cube got me! 😅
very interesting and a fun video, cant wait to see if valve will make a s2 portal game that will be just amazing
11:40 flat earth confirmed
HOLY THIS DESERVES MORE
pretty sure that the seamless teleport is used in those two cases because valve wanted the version with light to have baked shadows, i'm just guessing though
I’m a game dev, and the reason why they teleport you between the two rooms seamlessly, with one being more illuminated than the other, is so that the game won’t require dynamic lights that need to be turned off. The lighting information is most likely baked into the textures in those rooms, which is more computationally efficient than rendering lighting information in real-time, so this method of teleporting seamlessly versus actually turning off/on all the lights is probably just to save on computational resources.
Thank you. That was good stuff.
what an awesome video, thank you for making it
7:02 as tf2 soldier said: -I AM HAVING A HEART ATTACK!
The Stanley Parable also uses world portals extensively.
Huh, that would make a lot of sense actually. 🤔
I wonder if that's the reason they went with the Portal 2 engine. Seamless portals are built right in.
@@XeZrunner That's exactly why they did it.
How about the sequel? That's not even in the same engine.
@@SimonClarkstone Well obviously they didn't use the source world portals for that. They probably used a similar alternative.
great topic and great editing, deserves more views!
11:45 dawg u just killed millions of people
Anything for the sake of science, my friend. 🫡
this is really interesting!