VBSP: Difference between revisions
Jump to navigation
Jump to search
Note:
(Added -StaticPropCombine, -StaticPropCombine_AutoCombine, and -StaticPropCombine_MinInstances.) |
(improve static prop combine info) |
||
| Line 114: | Line 114: | ||
; <code>-FullMinidumps</code> | ; <code>-FullMinidumps</code> | ||
: Write large minidumps on crash. | : Write large minidumps on crash. | ||
=== {{CSGO add|Static Prop Combine}} === | |||
: Merges | ; <code>-StaticPropCombine</code> | ||
; | : Merges static props together according to the rules defined in <code>scripts/hammer/spcombinerules/spcombinerules.txt</code>. This lowers the number of draw calls, increasing performance. It can also be used to lower the number of static props present in a map. | ||
: {{ | ; <code>-StaticPropCombine_AutoCombine</code> | ||
; {{ | : Automatically generate static prop combine rules for props that VBSP deems should be combined. {{Note|This does not write to <code>spcombinerules.txt.</code>}} | ||
: {{ | ; <code>-StaticPropCombine_ConsiderVis</code> | ||
}} | : Instead of using the distance limit, combine all props in the group that are within the same viscluster. | ||
: {{Confirm|Do the models being combined need collision models?}} | |||
; <code>-StaticPropCombine_SuggestRules</code> | |||
: Lists models sharing the same material that should be added to <code>spcombinerules.txt</code>. | |||
; <code>-StaticPropCombine_MinInstances <[[int]]></code> | |||
: Set the minimum number of props in a combine group required to create a combined prop. | |||
: {{Tip|Valve had this set to 3 for the new Dust 2.}} | |||
; <code>-StaticPropCombine_PrintCombineRules</code> | |||
: {{Confirm|Prints the combine rules? Hasn't been working for me.}} | |||
; <code>-StaticPropCombine_ColorInstances</code> | |||
: {{Confirm|Does this color the instances?}} | |||
; <code>-KeepSources</code> | |||
: Don't delete the autogenerated QCs and unpacked model files after finishing. | |||
; <code>-CombineIgnore_FastReflection</code> | |||
: Combine props, even if they have differing '''Render in Fast Reflections''' settings. | |||
; <code>-CombineIgnore_Normals</code> | |||
: Combine props, even if they have differing '''Ignore Normals''' settings. | |||
; <code>-CombineIgnore_NoShadow</code> | |||
: Combine props, even if they have differing '''Disable Shadows''' settings. | |||
; <code>-CombineIgnore_NoVertexLighting</code> | |||
: Combine props, even if they have differing '''Disable Vertex lighting''' settings. | |||
; <code>-CombineIgnore_NoFlashlight</code> | |||
: Combine props, even if they have differing '''Disable flashlight''' settings. | |||
; <code>-CombineIgnore_NoSelfShadowing</code> | |||
: Combine props, even if they have differing '''Disable Self-Shadowing''' settings. | |||
; <code>-CombineIgnore_DisableShadowDepth</code> | |||
: Combine props, even if they have differing '''Disable ShadowDepth''' settings. | |||
=== Nonfunctional Options === | === Nonfunctional Options === | ||
Revision as of 11:45, 28 June 2018
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:
- convert brushes to polygons
- generate visleaves
- generate detail props
- swallow most internal entities into the world
- replace specular materials with patched versions that link to the nearest cubemap
- embed the entity block
While the resulting BSP file can be played directly it has no visibility control (poor performance) and no lighting.
Launch options
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
-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.
-tmpoutwill cause the files will be written to\tmpinstead. -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.txtfile -embed <directory>- Embed the contents of <directory> in the packfile
Advanced options
{{ColumnBox|count=2|
-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.
Template:CSGO add
-StaticPropCombine- Merges static props together according to the rules defined in
scripts/hammer/spcombinerules/spcombinerules.txt. This lowers the number of draw calls, increasing performance. It can also be used to lower the number of static props present in a map. -StaticPropCombine_AutoCombine- Automatically generate static prop combine rules for props that VBSP deems should be combined.
Note:This does not write to spcombinerules.txt. -StaticPropCombine_ConsiderVis- Instead of using the distance limit, combine all props in the group that are within the same viscluster.
Confirm:Do the models being combined need collision models?-StaticPropCombine_SuggestRules- Lists models sharing the same material that should be added to
spcombinerules.txt. -StaticPropCombine_MinInstances <int>- Set the minimum number of props in a combine group required to create a combined prop.
Tip:Valve had this set to 3 for the new Dust 2.-StaticPropCombine_PrintCombineRules
Confirm:Prints the combine rules? Hasn't been working for me.-StaticPropCombine_ColorInstances
Confirm:Does this color the instances?-KeepSources- Don't delete the autogenerated QCs and unpacked model files after finishing.
-CombineIgnore_FastReflection- Combine props, even if they have differing Render in Fast Reflections settings.
-CombineIgnore_Normals- Combine props, even if they have differing Ignore Normals settings.
-CombineIgnore_NoShadow- Combine props, even if they have differing Disable Shadows settings.
-CombineIgnore_NoVertexLighting- Combine props, even if they have differing Disable Vertex lighting settings.
-CombineIgnore_NoFlashlight- Combine props, even if they have differing Disable flashlight settings.
-CombineIgnore_NoSelfShadowing- Combine props, even if they have differing Disable Self-Shadowing settings.
-CombineIgnore_DisableShadowDepth- Combine props, even if they have differing Disable ShadowDepth settings.
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.
Console output
Todo: Add description about every output (WriteBSP, other)
See also
| |||||||||||||||||||||||||||||