@@TheFalseShepphard in the map there’s a small little area called a sky box, when something is in that little area it’s loaded into said skybox area, making it look larger in the normal map, including players
TF2's optimizations were perfect for the 2007 game, but in 2021 theres been so much stuff stuck ontop of the base game that I dont think anyone could call it optimised today. The game was built without ever knowing that every player model would have up to 4 additional models stuck to it for example.
Have to disagree. There were MUCH more complex games made in 2007 that run and look better than TF2. And by better I mean several orders of magnitude better.
@@Aryzon13 yeah perfect was porbably the wrong word, my point is that its silly to say that the game has many optimisation techniques so therefore anyone who complains is playing on a terrible pc on a badly made map.
This is why we NEED the Team Comtress patch. It's been finished and sent to Valve, but in classic Valve fashion they used it to fix overlapping problems in DOTA 2.
No one even plays Dota-2 Its such a shit game bruh. Everyone plays LOL instead. Why tf does Valve put so much resources into DOTA-2 instead of fucking TF2. Just sell that shit to microsoft bruh what are these clowns doing.
Ya, this is more correct than what I said. The trigger to change lod is taking up less screen space and not from increase in distance alone. Subsequently fov settings modify when things change lod as things will take more screen space at lower fields of view. Interestingly, the fade-out of props could also be set to be based on screen space over distance.
@@s4videos This was probably done in order to adjust automatically the LODs with your game's resolution. Which would mean low LODs will likely trigger at a closer radius around you if you are playing on a lower resolution, and vice-versa. ( In old games like Super Mario 64, it's based on distance, and as a result, the HD port on Switch in 720p will show Mario's lowpoly model much more clearly than it used to. )
A few author's notes: I regret over-simplifying a few things: Reflections aren't “pre-rendered”, that's not the best term to use. What I mean is they're not updated in real time. The far z clip plane can be any value. I say it's after the fog is fully opaque as it normally is but it can be a lower value like it is on 2fort. Lighting is baked into the maps. All lighting is always technically rendered live but there's a big difference between what TF2 does and what happens with more modern forms of lighting. I am 90% sure it was the Hatless update that changed the game to stream assets as needed but it could have been the Steampipe update. A lot of rocks actually do have textured bottoms as a lot of rock props are meant to be rotated. Doing more research it seems it's actually super rare that areaportal windows are used. Map devs forget to use this form of optimization often. Same for doors that toggle area portals when opened/closed. Super rare despite being powerful at saving resources. I wrote this video way before TF2's source code was leaked. If I wrote it now the ending would be a bit different. All these optimization tricks still work and are still great but the code showed us that TF2 is actually trash under the hood. It's unrefined and inefficient. Like the code contains things such as randomly calling to rendering things multiple times in sequence. Super poor multi-threaded performance due to stupid oversights. Things like that. The far z clip plane is the strangest thing to record because source games are buggy. Right now if you load 2fort in-game the far z clip plane sometimes doesn't work. If you look at the decompiled map it's there. They programmed it into 2fort. It's literally a coin flip if the map will stop rendering at a distance. I find if I first join a server running 2fort, disconnect then load the map from console it'll have a working far z clip plane, otherwise it will not. Good code, love it Valve. I know I said you shouldn't play this game on integrated graphics and expect good performance but I think eventually it will be a possibility. Come back to this video in 20 years and tell me about how well the game runs on integrated graphics on computers from 2041. I'd love to hear it. It would be really screwed up if even a bad computer couldn't play a game from 34 years ago.
I remember when 2fort had dust and particle effects. Other details and even some lighting effects have been taken out. Valve removed these details overtime because they needed more room for hats!
I am not aware of a version of 2Fort that had dust and more particle effects. I played the 2008 version of TF2 and the map looks about the same. When you look at TF2 gameplay on consoles (which are stuck with an early patch) I also can't see any such detail. I think you're remembering incorrectly.
@@Ultra289 Except for an a game like TF2 it's not exactly fast pace often often I'm especially when you've got things like friendly's like friendly's it's not a bad idea
Nah, it's actually LODL. Which stands for Levels of Detail LODL. Which stands for Levels of Detail Levels of Detail LODL. Which stands for Levels of Detail Levels of Detail Levels of Detail LODL. I forgot what that last one stands for.
What's really sad is that mastercoms has a huge, huge list of in-depth fixes for TF2 that are ready to be implemented and would fix much of the performance issues caused by coding oversights. Valve would just need to get in contact with her and work on implementing it but it doesn't seem like they have a lot of interest in doing that which is hella frustrating.
Some valve employee actually used masterconfig work for dota Ofc ,not every employee will agree with other employee ideas or solutions so stuff like this can happen
I have a very shitty laptop that can run TF2 at a pretty smooth 60 FPS somehow, yet one of the few times I had a big frame drop was when I was observing my team while waiting to respawn
As a fellow potato gamer, would you mind sharing what settings or whatnot you use? I'm pretty tech un-savvy but my not even that old laptop still doesn't really get anything above like 45 fps consistently unless its setup time
@@yoshifan2334 I just kind of lowered the detail stuff on the models, textures and other stuff down to medium, or low.Oh yeah and I also lowered the resolution. It stays on 60-50fps most of the time, but if there are a lot of things on screen it dips down to 30-25fps
As a fun fact, bot NAV meshes in CS:GO actually automatically generate on custom maps when you first play them, because of the countless maps that were and are being created for the Game. They are somewhat accurate, depending on the maps' complexity, and can (but not always) help the map creator at least a little bit to make accurate bot NAV meshes for their map(s), even if they aren't that accurate when first generated.
This is present since css where the bot system was ported from cs1.6, then they used those bots for l4d, l4d2, csgo, and then backported the system to TF2. Its not automatically done in most of those games when no nav mesh is found but the command exists.
There's a ton of work that goes into optimization from mapmakers and model creators, yet the in one part where it matters the most, the engine, it is neglected. 😔
Fact: tf2 can run on a 2010 i3 laptop with integrated graphics at 40+ fps with a low enough resolution and mods like mastercomfig. It will, however, run a bit bad on a 2006 celeron with a 2010 amd gpu. So my conclusion is that tf2 runs mostly on cpu rather than gpu
I created that x4 variant you showed at the end. (viper, snow) It was my first map which was mostly just a modification of x4. I added those trenches and tunnels and props. I really had no clue what I was doing and to this day I’m shocked people still play it. Pretty sure there’s a complete area under the map that is rendered for no reason. I don’t recognize the ramps at spawn so someone probably copied my terrible work. The cycle goes on. 😂
3 года назад
still waiting for an option to turn off player's cosmetics
6:48 i find it more eaisly noticeable if you pay attention to the hitmans heatmaker reflection on the scope since it is very reflective, moving from one room to another will just change the picture, so its not snooth moving and just snaps to that picture
See, here's the thing. Tf2 was worked on for nine years, changing to the Source engine partway through. It release in 2007 on an engine from 2004, and received constant updates for over a decade. Take the slight jank of the Source engine, some ancient code and a decade of new code bolted on and you get a bit of a mess. The game has these optimisations, and is better off for them, but someone needs to go into the metaphorical tangle of cables to sort out all the newer stuff. For instance, did you know that the GRU's health drain stat is directly connected to the Eviction Notice's stat? Same thing for the damage resistance on the Natascha and Brass Beast. Tf2 is filled with weird quirks and things that are implemented in very strange ways. Little issues, but there's a *lot* of them. They stack up over time, especially in a 15 year old engine. TL;DR: TF2 was optimised at launch, but is bogged down by a decade of updates.
I don’t know much about compter rendering and stuff, but i remember in the developer commentary maps they said that they send the particle calculations to a graphics accelerator to save rescources. and this was when the game was first released, they’re really pushing the limits nowadays with their burning flames, sunbeams holy grail unusuals
Particle effects are actually pretty taxing in TF2. When I originally played the game in 2010, I was fascinated that my framerate would drop from 60+ to 20 or so when I looked at water and fired a shotgun at it. All the splashes right up in the camera (i.e. rendering in full quality) literally made the game a slideshow for a second.
The Source engine is indeed optimized, just not exactly in the hardware department. Considering the fact that most GPU's are barely utilized and the framerate dips reflect that it's just hard to consider any hardware aspects "optimized".
09:50 valve actually used to do this with every weapon in 1st-person as well, only parts of the weapon that were visible or would be visible during appropriate animations were modeled. when more unlockable weapons started coming out, valve converted every weapon in the game to the new c_model format, wherein the weapon in 1st and 3rd person are the same, and the player's arms are a separate model that the weapon is then attached to. this also makes it easier to mod in weapons since all you need is the weapon model with proper rigging.
6:56 To explain more, They use non real-time simulation programs and convert the sim into an animation. This saves on recources, but won't interact with dynamic (moving) things
They do actually interact with players. Some of the larger objects in the animation kill you when you stand in the area that they drop on, as they drop. I suspect it's probably just a death trigger that activates for a short duration timed to be in sync with the animation, so it's not a true interaction but a nice trick nontheless.
Man i remember getting up fo 247fps back in 2015 in tf2, after tough break it took a hit and then after jungle inferno my pc struggles to run it at 120fps while games like csgo still run well over 200fps
My favorite part of TF2 is that my cpu is utilized at about 20% with my gpu max at 29%. I don't get how TF2 is not optimized to fully use a GPU in 2021.
as someone still using windows 7, I never thought tf2 was unoptimized. in fact its one of the only games that runs without reducing the settings to "ultra low"
TF2 is a "well optimized game" but it's greatly held back by its spaghetti code and hundreds of cosmetics that's simply too much for the source engine to handle. not only is the source engine pretty limited but it's also an old engine, meaning it was made to utilize single core CPU clock speeds rather than CPU's with multiple cores/threads and GPUs. I get 40-80 FPS average on vs saxton hale servers with less than 15 people without any configs and I have a 1660 super and ryzen 5 2600
@@jveerf8573 I don't play casual but I mostly play vsh and I get constant framerate fluctuation if there's more than 10 players on the server even with mastercomfig low
@@OutlawedPoet Weird I play vsh too and the only issues That I had is with the server lagging because of some bosses. But the fps is over 100 normally with over 24 players
10:00 3D artist here. I want to offer a quick correction here and say that it's not a wall that is transparent. It instead is a wall that _does not exist_ at all. Instead of having 4 faces for 4 walls, you just delete the rear face, leaving only 3 walls. Also this is called a model, not a texture. Models are the physical entity, which had a material plugged into it which defines what it is (affects sounds, and bullet decals), which has textures plugged into it that make it look like concrete, or brick, or sand, etc.
In the Source engine to make a wall with no visible texture you set its texture as the "no draw" texture. When assigned this texture the wall still exists, it just appears transparent. It continues to have collision and block projectiles. In the game's level editor the points in space that represent the corners of the rectangular prism that is the walls always exist. The faces of a wall continue to exist even when invisible. In Source the walls are called brushes and they're a separate thing from the models that appear on maps. Perhaps what you say is true in a different context, such as in newer game engines but in this instance it's not correct.
@@s4videos Oooooh... that kinda rocked my world. I knew Source was an old engine but.... WOW. That just kinda turned my world around on what I knew. Thanks for the explanation.
I'm no expert but I doubt newer games still utilize techniques like BSP trees or vis planes. I think modern techniques involve using the GPU for culling object rather than CPU calculations. Might be the limitations of Valve being still stuck on a DX9 engine...
for the render "transparent" side of objects, its not that the model doesnt have textures, on 3d planes/faces have 2 sides, one visible and one thats invisible, so what you see on the example at 10:19 its not that it isnt textured, they just take away the faces that u wont see, that means down parts of an object, parts of the object that faces to a wall, etc. all tho, to save resources and not use 2 planes/faces for an object, you can use a double sided material so it can show the texture on both sides of the plane, weirdly enough on source even if you see the material it will be posible to see an object through the double sided material
thankfully knowing the majority of these really makes the lowend experience way better because ik what's the issue and how to fix it also i knew it that seeking tf2 optimization will make us source engine experts
the problem is that visleaves are very static and you can end up with huge rooms where everything is loaded even if things aren't in line of sight. lazarus is a great example of this, as the capture point is sort of in an L-shaped "room", but things around the bend are always loaded, even when you are in the hallways with the windows. modern games basically flipped the use of visleaves and occluders. big open areas always check for line of sight to occlude objects, while doors and hallways are linked to triggers that load and unload entire areas. i say modern games, but Crysis already used this back in 2007.
One thing I noticed about map unloading is that it seems to consider glass oddly. Back when I still actually played on turbine I noticed looking down the enemy intel hall through the glass from way back in your team's hall would allow you to see that nothing would be loaded behind the glass.
The ending is fun as you watch people play this game but don't realize all these complicated optimizations that are in place to have a smooth experience. Really made me think about how much more is probably going on under the hood as I play.
very interesting, most people would argue that tf2's optimization is bad but it has very similar optimization features from other source games, it's just that it's not very fit for a game that's as chaotic as tf2, excellent video. i'd like to see more of these stuff.
Let's not forget that in options, when you set most of 'advanced, video' to low, things can get real low quality. I used Pyro's Dragon Fury for a while with model detail bottomed out, and I ended disliking the model so much I decided to go through my computer and optimize it. Glad I did because a privacy and access violation was found, likely someone or something trying to download malware on site.
14:00 sure... one problem though: source runs mostly on the CPU, so even though I have a graphics card and it's not being 100% utilized, I still lag. It was well optimized in 2007, but after 14 more years of updates and hardware changes, it's extremely poorly optimized.
The chunks being culled is leftover from half life two, it uses binary space partitioning to identify occluded chunks, this technique was originally used in doom
A bit strange to call it a left over, as it's a core part of how all source games render. It's just as much a left over of hl2 as it is hl, quake, and like you said doom.
That end bit really resonates with me. All too often I see people complain that games on steam are bad ports or poorly optimized because it doesn't work as expected on their specific combination of hardware. It's always nice if devs can patch their games to better support said hardware combinations, but throwing shade because of the problem existing to begin with just comes off as immature to me. It's unreasonable to expect devs to have tested their game on every possible combination of hardware known to mankind.
The first section isn't strictly true. While, yes, what you don't see behind solid brushes gets culled, doors hiding things behind them is controlled by the mapper and is an entity called an "areaporal", which is linked to the door. The same goes for when walking round corners and the map isn't culled in one go, models disappear as you walk. When the visleaf is behind a solid brush it is culled, but if its even near visible the entire leaf is shown. I know its nit-picking but just thought I should put this out there for those who are curious.
So basically this video is just 3kliksphilip video he made about this when danger zone maps was released for csgo but instead just tf2 images are shown
I know it isn't the focus of the video in the slightest but hey, u seem to know what you're talking about so I may as well ask it, what's the point in ray tracing then? If it's essentially rendering lighting and reflections in real time, then surely having the map and whatnot prerender them themselves is easier on your PC? Apologies for how stupid of a question it is, but I just really fail to understand the fuss over ray tracing in games these days, I can never notice it.
Ray tracing is realtime. So for example your playermodel will be seen in the reflection. Not only that, but as it's said in the video, dynamic props (payload cart) will not reflect actually on a close by surface. (Imagine the cart next to a shiny wall (Rarely seen in TF2 though because of the artstyle) won't be reflected correctly as you move)
@@ambreiaju But, and correct me if I'm wrong here, but haven't similar techniques existed in games for years? I could've sworn older games pulled off the same effects and there was never any mention of ray tracing.
@@oldoldmeme Some games use clever techniques like Portals (not those portals). Imagine a surface with a portal spanning it's whole face. In the world inside you can have the same props as in the real world. You attach those props with the "real" ones with constraints to make them mimic their movement. And then overlay on the "mirror" a semitransparent material (for example metal). Lastly if you need you add post processing on that mirror (blur for making it mate, bloom for realism, etc.). Or if you won't have problems with impossible geometry you can do the same thing without that portal. Like the mirror in Super Mario 64 where there's only a copy of the room and Mario on the other side while is made to mimic your movement. There are other countless techniques
@@oldoldmeme check out this video which explains some stuff about cubemaps in the Source Engine and their flaws when you can: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uX5krqI51hQ.html
I mean either way their point still stands, Valve never made any proper improvements to TF2's code and just lazily decided to downgrade the game's looks and features instead so that they could fit more hats into the game lol, and not even in short term was a good change because it barely improved anything and it just made the game look worse and in long term? TF2 is literally considered the most unoptimized source game ever made as of today. I gotta say the guy in the video kinda dropped the ball on this one.
8:15 is that why randomly your mad milk and holy mackerel will have their physics completely glitch out when equipped (and work once you re equip them)
Yes I think the reason the weapons sometimes get misshapen is due to the jiggling stopping and starting again. The more dips in fps a person has the higher the likelihood.
This game does not meet with modern optimization standards. The engine is just outdated. 32bit that allow you only to use 4 cores (but by default it uses only 2 xD), and up to 4GB of ram. Also it barely takes usage of external graphic cards.
Man, I didn't even know optimization came in the form of the map itself. I thought it would be just how it gets rendered, as well as some code underneath.
you know, i wonder what would happen to the bots if Valve suddenly decided to remove the bot mesh from their server maps? It'd be all server side, so there's really be nothing the bot makers could do about it. it'd make certain single player things harder to work around, but i think it ccould be a simple & elegant solution to the problem at hand.
*we are very sorry for the miscommunication and want to point out that while saying team fortress 2 is "well optimized" we forgot to take wutville into account.*
If a game cant handle my Custom 2021 particle effects, High poly anime models, artificial ray tracing, 3 gb size custom map, special weapon animations and personalized HUD ABOVE 300 fps then it is a poorly optimized game for me
Hmm, let me see... Yes you're correct. What the heck, all but a small portion of the map is always rendered. Even hallways that lead to spawn rooms that twist (as if to cut line of sight) don't have good optimization and still render what's beyond. It looks like the makers didn't know how to optimize maps as the optimization is atrocious. The map's second biggest optimization failure is that all the large props around the map should utilize fade-out distances but bafflingly don't. What a poorly-made map. There's so much that's wrong with the map's optimization that I could probably make a video about it.
This video should really be titled "Map Optimization in Team Fortress 2". Map optimization is an important part of any game (Wutville is a perfect example of what happens when it's done all wrong, and if Valve said "yes, this is gud map", then that might be very telling on how they see optimization as a whole now), but the rest of the game has... questionable optimization, and unfortunately it's part of the reason why so many people experience low framerates even on modern PCs, and for a game made in 2007, intended to run on Windows XP, that's unacceptable. A lot of this stuff I do recognize from other games of the same era, and most of these tricks are still used today (Trainz Railroad Simulator uses model and world LODs, not rendering objects behind the camera, fog), but how well they're implemented is another story.
I think the reason some things load/stay loaded even when they are technically out of site is an attempt to avoid obvious things popping in and out of existence in the player's view.
I disagree yes all of these things are indeed clever and help the game run better however, the reason why I personally call tf2 unoptimized is that it makes poor use of most hardware It offloads too much to the cpu, and on top of that it can only use 3 cores of the cpu (which is not intentional but a mistake in the games code that has been adressed in the community made team comtress fix) meaning it doesnt make good use of modern, and even older multicore cpus nor of GPUs (ironically meaning that yes tf2 could run well on integrated graphics provided they are paired with a good cpu) Since Ive already mentioned team comtress, Benchmarking demos played on the vannilla game and on team comtress shows that team comtress has an increased performance of up to 40%, simply by offloading some things to the gpu and fixing the multicore bug. This is and INSANE diffrence and I think it objectively proves that tf2 is an unoptimised game
i have a very low config but even with that i can have desent fps when a pyro spams the m1 literally dies my freaking fps or when there is rocket explotion,overheal and stuff it dies and idk what to do
And about the end bit I play on a 3 or 4 year old gaming laptop so hardware should be fine but I still get frame drops, even when playing 6s. Maybe it's because everyone is an explosive class, maybe it's because everyone is grouped together. Maybe it's because I have an unusual medigun. Idk, I just want to be able to play without fearing that I'll drop to 20 fps without notice
@@OctovenderReal I play on 7-8 year old "not gaming" laptop that has an fried graphics card which will shut down the screen and force me to wipe the memory if I try to activate it, yet I get more fps than you with the mastercomfig low. What? Is it just the sorse magic?