VBSP: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (improve wording)
(Updated the example in the Syntax section, removed a GCF note, and added a bug about .mdl file headers.)
Line 13: Line 13:


While the resulting BSP file can be played directly it has no visibility control (poor performance) and no lighting.
While the resulting BSP file can be played directly it has no visibility control (poor performance) and no lighting.
{{bug|<code>.mdl</code> files that have the <code>IDST1</code> header will fail to load for VBSP, see [[VRAD]]'s bugs.}}


== Syntax ==
== Syntax ==
Line 20: Line 22:
For example:
For example:


  "%sourcesdk%\bin\orangebox\bin\vbsp" -onlyents sdk_trainstation_01
  "Half-Life 2\bin\vbsp.exe" -onlyents sdk_trainstation_01


This will re-embed the entity block without affecting the world.
This will re-embed the entity block without affecting the world.
{{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 ==

Revision as of 12:42, 27 September 2017

VBSP is the tool that compiles a raw VMF file into the Binary Space Partition format. It is generally followed by VVIS and VRAD.

VBSP does:

While the resulting BSP file can be played directly it has no visibility control (poor performance) and no lighting.

Icon-Bug.pngBug:.mdl files that have the IDST1 header will fail to load for VBSP, see VRAD's bugs.  [todo tested in ?]

Syntax

vbsp [options...] vmf_file

For example:

"Half-Life 2\bin\vbsp.exe" -onlyents sdk_trainstation_01

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

Common options

Note.pngNote:-onlyents and -keepstalezip will mark the map as stale by embedding the file stale.txt into the BSP. Loading stale maps in the engine will cause a "This map is not final!!" warning message in the console.
-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>
Override the VPROJECT environment variable.
-game <directory>
Specify the folder of the gameinfo.txt file
-embed <directory>
Embed the contents of <directory> in the packfile

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/SMT 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.
-localphysx
Todo: Currently unknown.
-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