Source 2 Is Here - What Does That Mean?
[Technical Article written by 9yz]
This March, amidst previously unseen levels of hype and speculation, Valve finally unveiled CS:GO’s long-awaited upgrade to their Source 2 engine. It’s an update that has been prophesied for years, yet nobody could put their finger on exactly what it would bring. Now that Counter-Strike 2 is here (and we have access!), it’s finally time to take a look at this much-anticipated update. Because much hay has been made of the gameplay and visual changes, I’m going to focus more on the base engine features that have changed, to hopefully explain how this update improves the game technically.
To understand why Source 2 is such a big deal, we need to take a look at the history of Valve’s Source engine. And to understand that, we need to look at the original Quake. Released in 1996, id Software’s Quake is one of the legends of video game history and the immediate successor to the similarly legendary Doom series. It brought with it proper 3d rendering and multiplayer support, as well as tools to create new maps and mods. It was with these features and tools that dozens of other games were created.
So, when Gabe Newell and Mike Harrington came together, founded Valve, and set ahead with creating a video game, it was a logical choice to build off of the Quake engine. After 2 years of development, Valve released their debut game, Half-Life, built on their own variant of the Quake engine: GoldSrc. Half-Life was a major success (several publications proclaimed it “Game of the Decade” and it sports a 96/100 on Metacritic), a feat buoyed by its engine that allowed for excellent quality rendering, lighting, sound, and animations.
Shortly after Half-Life’s release, Valve set ahead with the bold task of creating a sequel that was better than the original in every way. Gabe Newell later stated, “Why spend four years of your life building something that isn't innovative and is basically pointless?”
The new Source engine, built on a fork of GoldSrc, was developed alongside to help Half-Life 2 meet that goal. This meant an overhaul to large parts of the engine: level geometry, which previously could only be composed of flat planes, could now be sculpted and shaped; surfaces, which were previously given a flat texture and shaded only by the lighting, could now be enhanced with a variety of shader effects including reflections, refractions, and normal maps; NPCs could now realistically animate their faces, allowing the expression of complex emotions and nuanced speech.
Half-Life 2 was an unbridled success, with critics proclaiming the game even better than the original. But it was there that engine development significantly slowed down. While Valve continued to release new games, the engine changes these brought were relatively minor: the Half-Life 2 Episodes brought new NPC interactions and animations along with new shader features, the Left 4 Dead series gave improved bot navigation, and the Portal series improved real-time shadow rendering and water effects. The most recent substantial upgrade to Source came with the 2012 release of Counter-Strike: Global Offensive. This was a larger upgrade than previous engine branches, bringing real-time sun shadows, various compile-time lighting upgrades and map optimizations, and several shader improvements.
These incremental changes primarily served to keep the engine up to date with modern graphic standards and, combined with increased model and texture resolutions, ensured that Source games wouldn’t fall behind the modern standard of graphics.
However, 15 years of incremental upgrades had resulted in an engine built upon a patchwork of different systems and were difficult to upgrade without substantial effort. Some portions of the engine dated back to the original Quake and had remained untouched since. This accumulated technical debt led Valve to work on building an entirely new engine rather than continue to upgrade its older one.
Valve began building Source 2 sometime around 2010, but the first time the public got their hands on it was in 2015 when Dota 2 was ported over from Source. Valve released a handful of smaller games using the engine over the intervening years, but the next major Source 2 release would not be until 2020’s Half-Life: Alyx, a full-length VR game and the first installment in the Half-Life series since 2007. And of course, now we have Counter-Strike 2.
So, what’s new?
The answer: basically everything. The mapping tools and the systems for geometry, models, lighting, and materials have all been rebuilt essentially from scratch, implementing modern practices. As an example, let's look at a fundamental part of every map: the base geometry - the environment in which all gameplay takes place.
In Source, the world is primarily composed of 3 different kinds of objects. Brushes, the most basic, are extremely simple. They are simple 3d primitive shapes, where every face (side) must be flat, and the whole object must be convex (you cannot draw a straight line that exits the brush and then re-enters it). These are also the only objects that can block visibility for optimization purposes.
The next kind of object is the displacement, a flat, square plane that is subdivided into many smaller triangles and can be shaped, sculpted, and can blend between textures. These are often used for bumpy ground (think dirt and grass) and any surface where texture blending is needed (imagine a plaster wall decaying to the bare brick beneath).
The final object is the static prop, which is a complex model that is created in external modeling software and is placed into the map as a single unit that can be identically duplicated as needed. Most world detail is composed of these (cars, trees, crates, fences, etc).
In Source 2, this distinction between world geometry (brushes and displacements that are created and edited in the level editor) and models is gone. Any surface can be shaped in any way, subdivided at will, and blend textures, any object can block visibility, and models created in external programs can be edited in-editor, and geometry created in-editor can be converted into a model. Also gone are Source 1’s numerical limits, which imposed a strict cap on the number of different objects in a map (you could not have more than 8192 brushes or 16384 static props). This enhanced flexibility greatly increases the speed and quality at which content can be made, by removing restrictions that interrupt a level designer’s workflow.
Another system that has had the same quality upgrade is the game’s lighting. In Source, lighting (with few exceptions) is limited to static lighting that is baked into the map when it is compiled. These lights can be toggled or flicker, but they cannot move and do not cast shadows from dynamic (moving) objects. The only light source that can cast dynamic shadows is the sun. In Source 2, lights now cast shadows from dynamic objects, can move (though the number of moving lights is often kept to a minimum for performance reasons), and are generally higher quality. VRAD (Valve RADiosity), the compile-time program that bakes lighting into the map, has been upgraded to its third iteration, bringing much more realistic and higher-fidelity lighting, at the cost of longer compiles.
The high-fidelity lighting also augments the power of Source 2’s upgraded material system. In Source, there are 2 primary shaders, one for world geometry and one for models. While they share many parameters, others are different, and even using the same settings the two shaders will result in a slightly different look that can be annoying when trying to make a seamless transition between world geometry and a model. Additionally, these shaders lack many modern features that allow for higher-quality rendering, like physically based rendering (PBR) or parallax occlusion maps. This means that textures created in popular material creation tools, like Substance Painter, often need adjustments or need to have their color channels changed to be compatible with Source’s nearly 20-year-old material setup.
Source 2 supports all of these features and more (notably, CS2’s new water rendering). Additionally, the unified geometry system (see above) means that any shader can be applied to any surface with no disparity between different object types. This modern material system generally enhances the look of the game and also makes it easier to produce content for, by allowing direct importing of materials from common texturing tools.