VBSP: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Fixing links)
(how to run VBSP from the command line! + other cleanup)
Line 1: Line 1:
A [[command-line]] tool that compiles the [[BSP]] (Binary Space Partition) file that will be your map. Can be run by itself to create a (test) map, but the additional use of the other two tools ([[VVIS]] and [[VRAD]]) is recommended for release maps.
{{toc-right}}


Vbsp also places [[Detail Props]] on appropriate surfaces in a map.
'''VBSP''' is the [[command-line]] tool that converts a raw [[VMF]] file to the compiled [[Binary Space Partition]] format. It is generally followed by [[VVIS]] and [[VRAD]].


There are various command-line options that can be used in combination with [[expert compile mode]], a batch file, or directly at a Windows command prompt. For a complete list, envoke <code>%sourcesdk%\bin\vbsp.exe</code> at the commmand prompt, with no other parameters.
VBSP will:
 
* Convert [[brush]]es to polygons
* Generate [[visleaf|visleaves]]
* Generate [[detail props]]
* Swallow most [[internal entity|internal entities]] into [[the world]]
* Embed the [[entity block]]
 
A .bsp file spat out by VBSP can be loaded in the engine and played, but will have no visibility control (poor performance) and no lighting (ugly).


== Syntax ==
== Syntax ==
vbsp [options...] mapfile


Example:
vbsp [options...] vmf_file
 
For example:
 
"%sourcesdk%\bin\orangebox\bin\vbsp" -onlyents sdk_trainstation_01
 
This will re-embed the entity block without affecting the world.


%sourcesdk%\bin\vbsp.exe -onlyents sdk_trainstation_01
{{bug|To find resources in GCF files, VBSP ''must'' be started in <code>%sourcesdk%\bin\orangebox\</code> (or ep1 as the case may be). You can do this with the <code>cd</code> command, or by setting the "Start In" value of a Windows shortcut. In [[Batch Compiler]], set the BinRoot variable.}}


== Common options ==
== Common options ==
; -v (or -verbose): Turn on verbose output (also shows more command-line options). Use without any other parameters.
;-onlyents : This option causes vbsp to only import the entities from the vmf-file. -onlyents won't reimport brush models.
;-onlyprops : Only update the static props and detail props.
;-glview : Writes .gl files in the current directory that can be viewed with glview.exe. If you use -tmpout, it will write the files into the \tmp folder.
;-nodetail : Get rid of all detail geometry. The geometry left over is what affects visibility.
;-nowater : Get rid of water brushes.
;-low : Run as an idle-priority process.
;-vproject <directory> : Override the VPROJECT environment variable.
;-game <directory> : Same as -vproject.


== Other options ==
; <code>-v</code>
Run <code>%sourcesdk%\bin\vbsp.exe -v</code> to display these options.
; <code>-verbose</code>
: Turn on verbose output (also shows more command-line options). Use without any other parameters.
; <code>-onlyents</code>
: Only import the entities from the VMF. Brushes and internal entities are not modified. Conserves existing lighting data.
; <code>-onlyprops</code>
: Only update static and detail props (i.e. the internal entities). Does not generate a .prt file, making VVIS fail!
; <code>-glview</code>
: Writes [[glview]] data to the VMF's directory. <code>-tmpout</code> will cause the files will be written to <code>\tmp</code> instead.
; <code>-nodetail</code>
: Removes [[func_detail]] brushes. The geometry left over is what affects visibility.
; <code>-nowater</code>
: Get rid of water brushes.
; <code>-low</code>
: Run as an idle-priority process.
; <code>-vproject <directory></code>
; <code>-game <directory></code>
: Override the [[VPROJECT]] environment variable.
 
== Advanced options ==


;-novconfig : Don't bring up graphical UI on vproject errors.
<div style="-moz-column-count:2;">
;-threads : Control the number of threads vbsp uses (defaults to the # of processors (times 2 for Hypertreading CPU's) on your machine).
; <code>-novconfig</code>
;-verboseentities: If -v is on, this disables verbose output for submodels.
: Don't bring up graphical UI on vproject errors.
;-noweld : Don't join face vertexes together.
; <code>-threads</code>
;-nocsg : Don't chop out intersecting brush areas.
: Control the number of threads vbsp uses (defaults to the # of processors (times 2 for Hypertreading CPU's) on your machine).
;-noshare : Emit unique face edges instead of sharing them.
; <code>-verboseentities</code>
;-notjunc : Don't fixup t-junctions.
: If -v is on, this disables verbose output for submodels.
;-noopt : By default, vbsp removes the 'outer shell' of the map, which are all the faces you can't see because you can never get outside the map. -noopt disables this behavior.
; <code>-noweld</code>
;-noprune : Don't prune neighboring solid nodes.
: Don't join face vertexes together.
;-nomerge : Don't merge together chopped faces on nodes.
; <code>-nocsg</code>
;-nomergewater: Don't merge together chopped faces on water.
: Don't chop out intersecting brush areas.
;-nosubdiv : Don't subdivide faces for lightmapping.
; <code>-noshare</code>
;-micro <#> : vbsp will warn when brushes are output with a volume less than this number (default: 1.0).
: Emit unique face edges instead of sharing them.
;-fulldetail : Mark all detail geometry as normal geometry (so all detail geometry will affect visibility).
; <code>-notjunc</code>
;-leaktest : Stop processing the map if a leak is detected. Whether or not this flag is set, a leak file will be written out at <vmf filename>.lin, and it can be imported into Hammer.
: Don't fixup t-junctions.
;-bumpall : Force all surfaces to be bump mapped.
; <code>-noopt</code>
;-snapaxial : Snap axial planes to integer coordinates.
: By default, vbsp removes the 'outer shell' of the map, which are all the faces you can't see because you can never get outside the map. -noopt disables this behavior.
;-block # # : Control the grid size mins that vbsp chops the level on.
; <code>-noprune</code>
;-blocks # # # # : Enter the mins and maxs for the grid size vbsp uses.
: Don't prune neighboring solid nodes.
;-dumpstaticprops: Dump static props to staticprop*.txt
; <code>-nomerge</code>
;-dumpcollide : Write files with collision info.
: Don't merge together chopped faces on nodes.
;-luxelscale # : Scale all lightmaps by this amount (default: 1.0).
; <code>-nomergewater</code>
;-lightifmissing : Force lightmaps to be generated for all surfaces even if they don't need lightmaps.
: Don't merge together chopped faces on water.
;-keepstalezip : Keep the BSP's zip files intact but regenerate everything else.
; <code>-nosubdiv</code>
;-xbox : Enable mandatory xbox optionsm (Can cause memory leaks on Windows with out applying the patch code to your mod found at [[SDK_Known_Issues_List]])
: Don't subdivide faces for lightmapping.
;-replacematerials : Substitute materials according to materialsub.txt in content\maps
; <code>-micro <#></code>
;-FullMinidumps : Write large minidumps on crash.
: vbsp will warn when brushes are output with a volume less than this number (default: 1.0).
; <code>-fulldetail</code>
: Mark all detail geometry as normal geometry (so all detail geometry will affect visibility).
; <code>-leaktest</code>
: Stop processing the map if a leak is detected. Whether or not this flag is set, a leak file will be written out at <vmf filename>.lin, and it can be imported into Hammer.
; <code>-bumpall</code>
: Force all surfaces to be bump mapped.
; <code>-snapaxial</code>
: Snap axial planes to integer coordinates.
; <code>-block # #</code>
: Control the grid size mins that vbsp chops the level on.
; <code>-blocks # # # #</code>
: Enter the mins and maxs for the grid size vbsp uses.
; <code>-dumpstaticprops</code>
: Dump static props to staticprop*.txt
; <code>-dumpcollide</code>
: Write files with collision info.
; <code>-luxelscale #</code>
: Scale all lightmaps by this amount (default: 1.0).
; <code>-lightifmissing</code>
: Force lightmaps to be generated for all surfaces even if they don't need lightmaps.
; <code>-keepstalezip</code>
: Keep the BSP's zip files intact but regenerate everything else.
; <code>-replacematerials</code>
: Substitute materials according to materialsub.txt in content\maps
; <code>-FullMinidumps</code>
: Write large minidumps on crash.
</div>


== Nonfunctional Options ==
== Nonfunctional Options ==
;-linuxdata : Force it to write physics data for linux multiplayer servers. ( It will automatically write this data if it finds certain entities like info_player_terrorist, info_player_deathmatch, info_player_teamspawn, info_player_axis, or info_player_coop. )
 
;-nolinuxdata : Force it to not write physics data for linux multiplayer servers, even if there are multiplayer entities in the map.
; <code>-linuxdata</code>
;-virtualdispphysics : Use virtual (not precomputed) displacement collision models
: Force it to write physics data for linux multiplayer servers. ( It will automatically write this data if it finds certain entities like info_player_terrorist, info_player_deathmatch, info_player_teamspawn, info_player_axis, or info_player_coop. )
; <code>-nolinuxdata</code>
: Force it to not write physics data for linux multiplayer servers, even if there are multiplayer entities in the map.
; <code>-virtualdispphysics</code>
: Use virtual (not precomputed) displacement collision models
; <code>-xbox</code>
: Enable mandatory Xbox 1 optimisation.


== See also ==
== See also ==
* [[VRAD]]
* [[VRAD]]
* [[VVIS]]
* [[VVIS]]
Line 67: Line 123:
[[Category:Tools]]
[[Category:Tools]]
[[Category:Level Design]]
[[Category:Level Design]]
[[Category:Glossary]]

Revision as of 04:20, 14 November 2009

VBSP is the command-line tool that converts a raw VMF file to the compiled Binary Space Partition format. It is generally followed by VVIS and VRAD.

VBSP will:

A .bsp file spat out by VBSP can be loaded in the engine and played, but will have no visibility control (poor performance) and no lighting (ugly).

Syntax

vbsp [options...] vmf_file

For example:

"%sourcesdk%\bin\orangebox\bin\vbsp" -onlyents sdk_trainstation_01

This will re-embed the entity block without affecting the world.

Icon-Bug.pngBug:To find resources in GCF files, VBSP must be started in %sourcesdk%\bin\orangebox\ (or ep1 as the case may be). You can do this with the cd command, or by setting the "Start In" value of a Windows shortcut. In Batch Compiler, set the BinRoot variable.  [todo tested in ?]

Common options

-v
-verbose
Turn on verbose output (also shows more command-line options). Use without any other parameters.
-onlyents
Only import the entities from the VMF. Brushes and internal entities are not modified. Conserves existing lighting data.
-onlyprops
Only update static and detail props (i.e. the internal entities). Does not generate a .prt file, making VVIS fail!
-glview
Writes glview data to the VMF's directory. -tmpout will cause the files will be written to \tmp instead.
-nodetail
Removes func_detail brushes. The geometry left over is what affects visibility.
-nowater
Get rid of water brushes.
-low
Run as an idle-priority process.
-vproject <directory>
-game <directory>
Override the VPROJECT environment variable.

Advanced options

-novconfig
Don't bring up graphical UI on vproject errors.
-threads
Control the number of threads vbsp uses (defaults to the # of processors (times 2 for Hypertreading CPU's) on your machine).
-verboseentities
If -v is on, this disables verbose output for submodels.
-noweld
Don't join face vertexes together.
-nocsg
Don't chop out intersecting brush areas.
-noshare
Emit unique face edges instead of sharing them.
-notjunc
Don't fixup t-junctions.
-noopt
By default, vbsp removes the 'outer shell' of the map, which are all the faces you can't see because you can never get outside the map. -noopt disables this behavior.
-noprune
Don't prune neighboring solid nodes.
-nomerge
Don't merge together chopped faces on nodes.
-nomergewater
Don't merge together chopped faces on water.
-nosubdiv
Don't subdivide faces for lightmapping.
-micro <#>
vbsp will warn when brushes are output with a volume less than this number (default: 1.0).
-fulldetail
Mark all detail geometry as normal geometry (so all detail geometry will affect visibility).
-leaktest
Stop processing the map if a leak is detected. Whether or not this flag is set, a leak file will be written out at <vmf filename>.lin, and it can be imported into Hammer.
-bumpall
Force all surfaces to be bump mapped.
-snapaxial
Snap axial planes to integer coordinates.
-block # #
Control the grid size mins that vbsp chops the level on.
-blocks # # # #
Enter the mins and maxs for the grid size vbsp uses.
-dumpstaticprops
Dump static props to staticprop*.txt
-dumpcollide
Write files with collision info.
-luxelscale #
Scale all lightmaps by this amount (default: 1.0).
-lightifmissing
Force lightmaps to be generated for all surfaces even if they don't need lightmaps.
-keepstalezip
Keep the BSP's zip files intact but regenerate everything else.
-replacematerials
Substitute materials according to materialsub.txt in content\maps
-FullMinidumps
Write large minidumps on crash.

Nonfunctional Options

-linuxdata
Force it to write physics data for linux multiplayer servers. ( It will automatically write this data if it finds certain entities like info_player_terrorist, info_player_deathmatch, info_player_teamspawn, info_player_axis, or info_player_coop. )
-nolinuxdata
Force it to not write physics data for linux multiplayer servers, even if there are multiplayer entities in the map.
-virtualdispphysics
Use virtual (not precomputed) displacement collision models
-xbox
Enable mandatory Xbox 1 optimisation.

See also