Sorry, you don't have access to the chatbox yet, VIPs and people with more than 2 posts get access to the chatbox :)


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
History of Source Engine
17-08-2010, 08:43 PM, (This post was last modified: 17-08-2010, 08:48 PM by Rong.)
Post: #1
History of Source Engine
Just an interesting copy+paste that someone might find worth knowing.

Written by: TerabyteS

I'm writing this because it's really hard to trace back the real roots of the engine, and one would have to run trough various documentation pages.

-DOOM engine (AKA Id Tech 1), 1993
The first real implementation of BSP seen in an engine is the one in Id Tech 1, also known as the engine which powered DOOM, DOOM II and various other games. A BSP tree structure, where the level was subdivided in "leaves", or areas, was useful to aid the engine in the rendering step, where otherwise the whole level would have to be rendered, and then overdrawn by the nearest faces the player is looking at.
The technology at the time was really bare. There wasn't the possibility to create multiple levels (I.E. levels with multiple floors one over another) or diagonal shapes, and the map was divided in sectors, which weren't real 3-dimensional areas but rather square or triangular areas of the map (which was designed in 2d) with a set floor and ceiling height. The rendering itself was also kind of "clunky". It was not real 3D rendering, with polygons and textures applied to them. This is also the reason why the player could not look up or down. The rendering was divided in 3 steps. First the walls were rendered. A scan-line method was used, meaning that the walls were rendered with 1-pixel-wide vertical lines. Then it was the floor to be rendered, and that was done with a floodfill-like algorythm, which drew the floor (and celing) textures and then cut them along the walls, to avoid drawing over them. This is also the reason why the floors keep getting rendered when a player is out of the map.
The last step in the rendering were the sprites. During the other wall drawing step, track of the order faces were drawn in and their distance was kept in a buffer, which then was used to hide sprites which weren't visible to the player.
Level designers, when creating levels, had a 2D top-down grid on which to draw sectors on, and assign them a floor and ceiling height. When the map was compiled (as we call it today, or preprocessed as it was called at the time), the map was divided in a BSP tree as explained earlier, and per-sector lighting was computed.

[Image: evdxf5.png]

[Image: 240px-Doom_mapformat_screen.png]

-Quake engine (AKA Id Tech 2-0), 1996
The Quake engine was the very first game engine to feature real 3d rendering. It also introduced lightmap based lighting and the possibility to display 3D models. This let the level designer create a numerous set of new shapes and levels. Floor stacking was also finally allowed. Quake also did have up-down mouse look, but it was disabled in the options by default.
The way the maps were "preprocessed" before becoming playable had also been changed. Since the maps now were fully 3-dimensional, there was now the possibility to create a "leak", or a hole in the map geometry which linked the map with the "void" outside, which made it impossible to the engine to prune the level and subdivide it into areas (the "void" is an infinite space, so processing it would take an infinite amount of time).
If a map was properly sealed, the faces outside it were removed (often 50-80 percent of the invisible faces were removed by this step). To help the engine by removing the most possible load from the rendering step, the BSP leaves were then used to calculate the PVS (potentially visible set), which consisted in the calculation of the leaves visible by every leaf. This step took hours and hours (and it still does in today's maps if heavily unoptimised). The last step was lighting. Instead of per-sector/leaf lighting (leaves could now be of various shapes so it would have been very unpractical to perform it), a different method involving Radiosity and lightmaps was approached. Every face in a map had a lightmap, an image containing the intensity of the lighting on a grid, which then was used to light the face and the objects standing near it (the direction of light could not be found, though). Nearby models (like npcs) were now rendered in 3D, and if far enough away, they were rendered using voxels (3D pixels) elaborated from the texture data.
[Image: Quake_Vertex_Pruning_Preprocessor.PNG]

-GLQuake or Quakeworld (AKA Id Tech 2), 1996
GLQuake was a renewed version of the Quake engine. Its main feature was the rendering completely changed to make use of OpenGL and hardware acceleration, thus giving far more fluid game interaction and the ability to display newer effects. Another notable feature was the switch to Windows from DOS, which also allowed the use of Dynamic Link Libraries to contain game elements, which was to allow modders to access only selected parts of the engine. The rendering was also switchable from OpenGL to traditional software rendering via the switch between rendering DLLs.

-Half-Life (AKA GoldSrc/GoldSource), 1998
Valve LLC is known to have acquired a regular license to modification of the Quake 2 (Id Tech 2) engine in 1996.
Part of Half-Life was first developed over an un-modified version of such engine, which was then reworked to use the heavily modified Id Tech 2 engine, also known as GoldSrc. Many things were changed from Id Tech 2 to GoldSrc. One notable feature was the addition of dynamic brushes which would move when pushed, or rotate (the casserole in the microwave), particle effects or energy/laser beams. Another important change introduced in this branch (and then also used in the regular branch, which originated Doom 3) was the shift of the weapon model to the right rather than the center.

-Half-Life 2 (AKA Source), 2004
The Source engine is a branch of the GoldSrc engine. Months before shipping Half-Life, new features were engineered, but they were risky to be put in the retail version. This is why a new branch of the GoldSrc code, called src, was created. The name then stuck and it became Source.
The new notable features in this engine are the extended support for props (the havok physics engine was implemented to simulate realistic physical interactions), and a shader system which allowed for realistic glass distortion effects, normal mapping and so on.

The basic structure of the engine stuck anyway, and it's very interesting to find common points between Id Tech 1 and Source noewadays. One of the features most noticed is the console, which nowadays uses the same command syntax, if not even the same commands (noclip or god are an example).

Here is a picture of the derivation of the engines:

[Image: e88vib.png]


Reply




Users browsing this thread: 1 Guest(s)