QBSP(1)
okay so welcome to qbsp(1), straight out of the General Commands Manual β this is the Quake map compiler, bestie, and we're about to make a .bsp out of a .map like it's absolutely nothing πβ¨
β¨ NAME β¨
Compile a Quake BSP file from a MAP source file β that's it, that's the whole main-character job. Map goes in, BSP comes out, everybody claps. π
π SYNOPSIS π
qbsp [OPTION]... SOURCFILE [DESTFILE]
yep, SOURCFILE is spelled like that in the synopsis β it's your source map, no cap. DESTFILE is optional, bestie.
π DESCRIPTION π
okay so qbsp is a tool used in the creation of maps for the id Software game Quake. It takes a .map file as input and produces a .bsp file playable in the Quake engine. If you don't supply the DESTFILE argument, the output filename gets chosen by stripping the file extension (if any) from SOURCEFILE and appending the .bsp extension. That's the pipeline, fr fr. π¦
πΈ OPTIONS πΈ
-nofillβ doesn't perform outside filling. No filling, no stress.-noclipβ doesn't build clip hulls. We're skipping the clip-hull arc.-noskipβ doesn't remove faces using theskiptexture. Those faces stay in the mix.-onlyentsβ only updates.mapentities. Entity-only glow-up, okay?-verboseβ prints out more.mapinformation. Chatty era, we love her.-noverboseβ prints out almost no information at all. The silent treatment, but productive.-splitspecialβ doesn't combine sky and water faces into one large face. They stay separate, periodt.-transwaterβ computes portal information for transparent water. This is the default, bestie.-notranswaterβ computes portal information for opaque water. Opaque water gets its portal moment.-transskyβ computes portal information for transparent sky. Sky portals, slay.-nooldaxisβ use alternate texture alignment algorithm. The default is to use the original QBSP texture alignment algorithm, which required the-oldaxisswitch intyrutils-ericw v0.15.1and earlier.-forcegoodtree(experimental) β force use of expensive processing for SolidBSP stage. Often results in a more optimal BSP file in terms of file size, at the expense of extra processing time. Experimental, so handle with care β¨-bspleakβ creates a.porfile, used in the BSP editor.-oldleakβ create an old-style QBSP.PTSfile. Default is new.-leaktestβ makes it a compile error if a leak is detected. Leak = not slay.-nopercentβ prevents output of percent completion information. No little percentage guy.-bsp2β create the output BSP file inBSP2format. Allows the creation of much larger and more complex maps than the originalBSP 29format.-2psbβ create the output BSP file in2PSBformat. This is an earlier version of theBSP2format, supported by the RMQ engine (and thus is also known as theBSP2rmqorRMQebsp format). The source text also has the trailing fragmentoriginal BSP 29 format).here β we're keeping it, no erasure π-leakdist [n]β space between leakfile points. Default is2.-subdivide [n]β use different texture subdivision. Default is240.-wadpath <dir>β search this directory for wad files. Default iscwd.-oldrottexβ use old method of texturingrotate_brushes where the mapper aligns textures for the object at(0 0 0).-maxNodeSize [n]β switch to the cheap spatial subdivision bsp heuristic when splitting nodes of this size (in any dimension). This gives much faster qbsp processing times on large maps and should generate better bsp trees as well. Fromtxqbsp-xt, thanks rebb. Default is1024;0disables it.-hexen2β generate a hexen2 bsp.-wrbrushesβ (bspx) includes a list of brushes for brush-based collision.-wrbrushesonlyβ-wrbrushescombined with-noclipargument. Two-for-one.-notexβ write only placeholder textures, to depend upon replacements.-omitdetailβ detail brushes are omitted from the compile.-convert <fmt>β convert a.MAPto a different.MAPformat.fmtcan be:quake,quake2,valve,bp(brush primitives). Conversions toquakeorquake2format may not be able to match the texture alignment in the source map, other conversions are lossless. The converted map is saved to<source map name>-<fmt>.map.
π§ SPECIAL TEXTURE NAMES π§
The contents inside a brush depend on the texture name(s) assigned to it. By default brush contents are solid unless they have a special name. Names beginning with an asterisk are liquids. A prefix of *slime indicates slime, *lava is for lava and anything else beginning with * will have contents as water. π«Ά
All faces of a brush must have textures which indicate the same contents. Mixed content types will cause qbsp to print an error and exit. No mixing, bestie β it's giving chaos and qbsp is not here for it.
π SKIP π
Any surfaces assigned a texture name of skip will be compiled into the bsp as invisible surfaces. Solid surfaces will still be solid (e.g. the player can't walk or shoot through them) but they will not be drawn. Water, slime and lava surfaces can be made invisible using the texture names *waterskip, *slimeskip and *lavaskip respectively. Invisible but still solid? iconic. π
π¦ HINT π¦
Hint surfaces cause a bsp split and portal to be generated on the surface plane, after which they are removed from the final bsp β they are neither visible, nor structural. Strategic placement of hint surfaces can be used by a map author to optimise the PVS calculations so as to limit overdraw by the engine (see also: vis(1)). Big brain map-author energy.
Use a texture with the name hintskip on any surfaces of a hint brush which you don't want to generate bsp splits or portals. All surfaces of a hint brush must use either the hint or hintskip texture name.
π EXTERNAL MAP PREFAB SUPPORT π
This qbsp has a prefab system using a point entity named "misc_external_map". The idea is, each "misc_external_map" imports brushes from an external .map file, applies rotations specified by the "_external_map_angles" key, then translates them to the "origin" key of the "misc_external_map" entity. Finally, the classname of the "misc_external_map" is switched to the one provided by the mapper in the "_external_map_classname" key. (The "origin" key is also cleared to "0 0 0" before saving the .bsp). Obsessed with this little import machine. π
The external .map file should consist of worldspawn brushes only, although you can use func_group for editing convenience. Brush entities are merged with the worldspawn brushes during import. All worldspawn keys, and any point entities are ignored. Currently, this means that the "wad" key is not handled, so you need to add any texture wads required by the external .map file to your main map.
Note that you can set other entity keys on the "misc_external_map" to configure the final entity type. e.g. if you set "_external_map_classname" to "func_door", you can also set a "targetname" key on the "misc_external_map", or any other keys for "func_door".
_external_mapβ Specifies the filename of the.mapto import._external_map_classnameβ What entity you want the external map to turn in to. You can use internal qbsp entity types such as"func_detail", or a regular bmodel classname like"func_wall"or"func_door"._external_map_anglesβ Rotation for the prefab,"pitch yaw roll"format. Assuming the external map is facing the +X axis, positive pitch is down. Yaw of 180, for example, would rotate it to face -X._external_map_angleβ Short version of"_external_map_angles"for when you want to specify just a yaw rotation._external_map_scaleβ Scale factor for the prefab, defaults to1. Either specify a single value or three scales,"x y z".
π₯ DETAIL BRUSH SUPPORT π₯
This version of qbsp supports detail brushes which are similar in concept to Quake 2's detail brushes. They don't seal the map (previous versions did). Lowkey a glow-up.
To be compatible with existing Quake 1 mapping tools, detail brushes can be added by creating an entity with classname "func_detail". When qbsp reads the map file, it will add any brushes included in a func_detail entity into the worldspawn as details and remove the func_detail entity. Any number of func_detail entities can be used (useful for grouping) and all included brushes will be added to the worldspawn.
Here's an example entity definition suitable to add to the .QC files used by BSP Editor:
/*QUAKED func_detail (0.5 0.5 0.9) ?
Detail brushes add visual details to
the world, but do not block visibility.
func_detail entities are merged into
the worldspawn entity by the qbsp compiler
and do not appear as separate entities in
the compiled bsp.
*/
For WorldCraft in .FGD format (untested):
@SolidClass color(128 128 230) = func_detail: "Detail" []
For Radiant in .ENT format:
<group name="func_detail" color="0 .5 .8">
Detail brushes add visual details to the world, but do not
block visibility. func_detail entities are merged into the
worldspawn entity by the qbsp compiler and do not appear as
separate entities in the compiled bsp.
</group>
What should be written to the .map file is a simple entity with one or more brushes. E.g.:
{
"classname" "func_detail"
{
( -176 80 0 ) ( -208 80 0 ) ( -208 48 0 ) COP1_1 0 0 0 1.0 1.0
( -192 -80 64 ) ( -208 -80 0 ) ( -192 -64 64 ) COP1_1 0 0 0 1.0 1.0
( -176 -80 0 ) ( -192 -80 64 ) ( -176 -64 0 ) COP1_1 0 0 0 1.0 1.0
( -16 48 0 ) ( -16 64 64 ) ( 0 48 0 ) COP1_1 0 0 0 1.0 1.0
( -16 64 64 ) ( -16 80 0 ) ( 0 64 64 ) COP1_1 0 0 0 1.0 1.0
}
}
When qbsp detects detail brushes, it outputs a modified portal file format with the header PRT2 (default is PRT1). This portal file contains extra information needed by vis to compute the potentially visible set (PVS) for the map/bsp. So you will also need a vis util capable of processing the PRT2 file format.
π DETAIL VARIANTS π
π func_detail_illusionary π
func_detail variant with no collision (players / monsters / gunfire) and doesn't split world faces. Doesn't cast shadows unless enabled with "_shadow" "1". Useful for hanging vines. Still creates BSP leafs, which is unavoidable without a new .bsp file format.
π func_detail_wall π
func_detail variant that doesn't split world faces. Useful for when you want a decoration touching a floor or wall to not split the floor/wall faces (you'll get some overdraw instead.) If it completely covers up a world face, that face will get clipped away, so it's not suitable for fence textures; see func_detail_fence instead.
π func_detail_fence π
Similar to func_detail_wall except it's suitable for fence textures, never clips away world faces. Useful for fences, grates, etc., that are solid and block gunfire.
π MODEL ENTITY KEYS π
"_lmscale" "n"β Generates anLMSHIFTbspx lump for use by a light util. Note that both scaled and unscaled lighting will normally be used."_mirrorinside" "n"β Set to1to save mirrored inside faces for bmodels, so when the player view is inside the bmodel, they will still see the faces. (e.g. forfunc_water, orfunc_illusionary)
π«Ά OTHER SPECIAL-PURPOSE ENTITIES π«Ά
π
func_illusionary_visblocker π
okay so this one is for making vis-blocking illusionary brushes β literally the same energy as func_detail_illusionary or func_illusionary, and yes, the player can walk right through them π«Ά. It gives the same effect as water brushes when the -notranswater flag is used, except the interior of these brushes is saved as CONTENTS_EMPTY.
β οΈ one thing to be aware of, bestie: if the playerβs view is very close to the faces of these brushes, they might be able to see into the void (depending on the engine). Fitzquake family engines have a workaround for this that is enabled if the brushes are textured with a water texture (* prefix). β¨
π MAP COMPATIBILITY π
In addition to standard Quake 1 .map files, ericw-tools QBSP is compatible with:
- Floating point brush coordinates and texture alignments β decimals are invited to the party π
- Valveβs 220 map format as produced by the Hammer editor π¨
- Extended texture positioning as supported by the QuArK editor π§
- Standard Quake 2 map format (leading paths in texture names are stripped and any extra surface properties are ignored) π
- Brush Primitives produce by Radiant editors (normally a Quake 3 format) β iconic, no cap π
π AUTHOR π
- Eric Wasylishen
- Kevin Shanahan (aka Tyrann) -
http://disenchant.net - Based on source provided by id Software and Greg Lewis
π REPORTING BUGS π
Please post bug reports at https://github.com/ericwa/ericw-tools/issues. Improvements to the documentation are welcome and encouraged β fr fr, docs glow-ups are always accepted π«Άβ¨
π COPYRIGHT π
- Copyright (C) 2017 Eric Wasylishen
- Copyright (C) 2013 Kevin Shanahan
- Copyright (C) 1997 Greg Lewis
- Copyright (C) 1997 id Software
- License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/gpl2.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
π¦ SEE ALSO π¦
light(1) vis(1) bspinfo(1) bsputil(1) quake(6) β go read those too, bestie, the whole Unix family is iconic π
π source/version: TYRUTILS / TYR_VERSION; date: the manpage footerβs stamp; manual title: QBSP(1) β mwah, go make something slay β¨
π¦ where this page comes from
- nixpkgs unstable: ericw-tools 0.18.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms