BSP (file format)

.BSP is a map file extension used in games such as the Quake series, and games that use the Source engine, such as the Half-Life series and Portal series. .BSP files use binary space partitioning to generate levels that can be rendered quickly while minimizing the number of polygons that need to be redrawn every time the screen refreshes. One of the biggest problems with the .BSP file format is that large open areas do not work well due to the nature of the partitioning algorithm used.

Unlike the maps used in Unreal Tournament, .BSP files work by defining the edges of the map objects, as opposed to defining the hollow areas. .BSP files can be produced by compiling .MAP files using tools such as Q3Map2. .MAP files can be generated using exporters for such modelling tools as 3D Studio Max or using game-specific tools, like GtkRadiant. A .BSP file includes everything necessary to display the map, except the textures (with the exception of Quake and, optionally, Half-Life, BSP versions 29 and 30, respectively). Games such as Quake III Arena, James Bond 007: Nightfire and the Call of Duty series store the textures in separate assets files, contained in archive files such as .PAK, .PK3, .007, .IWD, etc. This map file format is also used in RenderWare (as version 11) for levels of the game such as Sonic Heroes, Shadow the Hedgehog, Tony Hawk's Pro Skater 3 and others.

Lumps

Lumps are chunks of data, the offsets and lengths (in bytes) of which are defined in the file header, which may also contain the version of the BSP. The number of lumps in a BSP differs from version to version, and the version used differs from game to game. For example, Quake II uses version 38 with 19 lumps, whereas James Bond 007: Nightfire uses version 42, with 18 lumps. For this reason, there are compatibility issues between games, and though conversion is possible, it is quite difficult.

Although the number of lumps, and therefore their functions, changes from version to version, most versions of the BSP contain lumps with similar functions, and sometimes even have identical formats. These include:

Other lumps are used by different versions to manipulate these lumps in many ways, and can be used to get nearly, if not exactly, the same effect in any version of the BSP.

Compilation

Compiling tools are used to convert plain-text .map files into .BSP files.

With games using the GoldSource engine, there were four steps in the compilation. BSP is preceded by CSG (constructive solid geometry), which parses the brushes, places entities, indexes textures, and sets up the general framework of the level for the BSP pass which generally only performed space partitioning. In the Source engine, the plain-text .vmf map file stores the files in a CSG format, rather than vertex based, and lets the BSP tool handle all the entity placement tasks, so the CSG process has effectively been merged into BSP.

See also

External links

This article is issued from Wikipedia - version of the 9/23/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.