nyuuzyou/wikis huggingface dataset:
$basetexture

__NOTOC__
 It typically defines a diffuse texture. It is very rare for a material not to use this parameter and some shaders will load a default texture if it stays undefined.
== VMT Syntax ==
 $basetexture	<texture without extension, relative to <game>/materials/>
 LightmappedGeneric
 {
 	$basetexture	"brick/brickwall031b"
 }
== Additional Parameters ==
{{MatParam|$frame|int| The frame displayed for a multi-frame texture. This is normally set by the or {{TextureToggle}} proxies, but can be set manually. }}
= $basetexture2 =
Some shaders (most notably ) allow the use of two albedos. The second texture is handled by a mirrored set of commands with '2' in their name:
There are further '2' commands applying to various shader effects, which are each documented in their respective articles.
== See also ==
* (specular mask)
* (environment map)
* (diffuse reflection)
* 
b
$bbox

It defines an axis-aligned bounding box used by the AI to detect collisions with the world, mostly for movement purposes.
Models will be culled (hidden) when the bounding box is no longer in the players field of view, as a means to optimize the game. Too small bounding boxes can cause a model to disappear before it really left the FOV.
This is also called the hull.
$bbox lines are automatically generated when compiling a model, as long as there are no lines existing already.
==Syntax==
 $bbox	(min x) (min y) (min z) (max x) (max y) (max z)
==See also==
* $cbox
* $hbox
* $hboxset
Category:Modeling
bbox
Category:Source__NOTOC__
$blendmodulatetexture

It changes the transition between the textures from a smooth, linear gradient to one "stamped" with a pattern.
== Caveats ==
* Incompatible with in . Works in . (use instead).
:
* Incompatible with in .
* Incompatible with and being used at the same time, in .
* Using with will cause a major graphical issue ( stripes over the texture ), except in and .
* Incompatible with $detailblendmode 7 in and 9 in 
* In , , and , incompatible with and .
* In , also incompatible with and .
* In , modulation textures are not aligned correctly. Use $blendmasktransform "center .5 .5 scale 1 -1 rotate 90 translate 0 0" to fix them up.
* In , not compatible with .
In some additional cases, textures will blend as if $blendmodulatetexture were not used:
* Does not display when viewed through water. 
* Does not display when illuminated with player's flashlight in . This is fixed in .
* Does not display in the Hammer Editor in most games. Known exceptions include , , , , and .
== Parameters ==
== Blend Modulation Textures ==
Only two color channels are read from the texture:
; Red
: Sharpens. 0 makes the transition binary, 255 effectively disables modulation.
: The red channel of Valve's snow modulation texture is a constant 99, which produces a fairly sharp falloff. Using different values in different places has the potential to produce a more complex effect.
; Green
: Biases in favor of $basetexture; high-value areas will be the most resistant to modulation. 128 is normal.
: The idea is to paint noise and patterns into this channel, so that the edge between the two textures becomes irregular. Valve's snow texture (see right) has lots of ragged edges in the green channel, and even some bootprints. There are also lines painted along the edges of the albedo's bricks that give them a tendency to have snow along their edges.
There is not always a need for the texture to be high resolution—high-frequency blends can be produced from low-res textures.
blendmodulatetexture
$blendtintbybasealpha

__FORCETOC__
 It can be used in .
It allows tinting of a model's material using the $basetexture's alpha channel as a mask to determine tint intensity (but not the tint's RGB color!) Applying an actual color RGB values is done elsewhere - either in-game or in Hammer with entities using the 'rendercolor' keyvalue. This technique is used in games like Left 4 Dead to allow for recoloring of the vehicle props, and in for painting hats.
==Usage==
The tint mask simply controls the intensity of tinting. The more alpha, the more intense tinting is. 
In practice, it is a good idea to use the mask to avoid tinting parts of the model that aren't covered by paint: either elements like lights, license plates, wheels, warning stripes, or scratched off, rusted or dirty areas, where the paint lost its effect. 
Alternatively, this method can be used to only paint selected elements, like labels, colored glass, parts of clothing, character hair, makeup and so on.
File:Blendtint-truck-regular.jpg|Using rendercolor on prop physics or prop dynamic entities without $blendtintbybasealpha. The tint is applied across the entire texture, which in this case is undesireable.
File:Blendtint-truck-enabled.jpg|Same but with $blendtintbybasealpha enabled and the texture edited. The alpha channel of the texture, plus painting the base white, allows the trucks to be tinted in a desireable manner.
File:Blendtint-truck-textures.jpg|The example texture for the truck. The white base (top) eliminates unwanted color influences, and the alpha channel (bottom) contains the tint mask.
==$blendtintcoloroverbase==
$blendtintcoloroverbase, a related parameter, controls the amount of color replacement versus tinting. (replacing the color per pixel entirely, versus adding more color to make the colors closer to the tint RGB color.) A value of '0' will be full tint while a value of '1.00' will replace the albedo in the mask area with the color defined with $color2.
b
File:Blendtint-truck-coloroverbase.jpg|Using $blendtintbybasealpha as above plus $blendtintcoloroverbase at 1.0. The color replacement (instead of tinting) removes texture detail from the masked areas.
File:Blendtint-truck-colorreplacement.jpg|Same but with $color2 at "{255 0 0}".
==See also==
*$color and $color2
$body

It is used to add a reference mesh to a model. Without at least one $body the model will be invisible (exception: models with facial animation use $model instead).
== Syntax ==
 $body	<name> <reference mesh SMD> [reverse] [scale <int>]
== Example ==
 $modelname		"weapons/shell.mdl"
 $cdmaterials		"models/weapons/"
 $body		shell	"shell_ref"
 $sequence	idle	"shell_idle"
== See also ==
*Reference mesh
*, for lowering detail at a distance
*, for managing toggleable meshes
*, for facial animation
body
$bodygrouppreset

$bodygrouppreset is a QC command found in Counter-Strike: Global Offensive. It creates a bodygroup "preset", which when selected will toggle the state of multiple bodygroups at once. It is used to toggle silencers for the M4A1-S and USP-S, and magazines for many other weapons.
== Syntax ==
 $bodygrouppreset <preset name> {
 <bodygroup name> <bodygroup index>
 <bodygroup name> <bodygroup index>
 ...
 }
The bodygroup index is the body in the bodygroup that you want to be selected in the preset.
== Example ==
 
$bodygroup glasses {
 blank
 studio "glasses.smd"
}
$bodygroup hats {
 blank
 studio "tophatt"
 studio "fedora"
 studio "towering_pillar_of_hats"
}
$bodygroup cigar {
 blank
 studio "cigar"
}
$bodygrouppreset "glasses_fedora_nocigar" {
 "glasses" 1
 "hats" 2
 "cigar" 0
}
 
This will create a bodygroup preset that, when set, will hide the cigar, set the hat to a fedora, and make the glasses visible.
== See also ==
*$bodygroup
*$body
bodygrouppreset
$boneflexdriver

$boneflexdriver is a QC command which enables driving a flex with a bone's animation. This is particularly useful in multiplayer games where you can't pack VDC files into the map, as you can still use flex animation. It is also critical to vertex animation.
This command is available in the Source 2013 branch and further.
== Syntax ==
Source 2013:
$boneflexdriver <bone_name> <graph_axis> <flex_name> <min> <max>
Alien Swarm and later:
$boneflexdriver <bone_name> <graph_axis> <flex_name> <start_offset> <time_factor>
; bone_name
: The name of an existing bone that will host vertex animation for this model.
; graph_axis
: One of three values:
:; tx 
:: Source 2013: Controls the flex controller by the X-axis animation of the bone.
:: Alien Swarm and Later: Also links the target flex controller to the weight of the animation (much like a skeletal animation's).
:; ty
:: Source 2013: Controls the flex controller by the Y-axis animation of the bone.
:: Alien Swarm and Later: Also links the target flex controller to the current frame of vertex animation.
:; tz
:: Source 2013: Controls the flex controller by the Z-axis animation of the bone.
:: Alien Swarm and Later: Unknown function.
; flex_name
: The name of the flex controller this command operates on. 
: In Alien Swarm and later, there are two sensible options:
:* <vca_name> (for tx)
:* multi_<vca_name> (for ty)
: In both cases, <vca_name> is the name of the model's vcafile minus any file extension.
; min
: Minimum weight value of the controller.
; max
: Maximum weight value of the controller.
; start_offset
: Adds a delay before the vertex animation starts.
; time_factor
: The keyframe rate of the animation is multiplied by this value. It doesn't actually change the animation's duration however, making it of little use.
== Example ==
For vertex animation:
$boneflexdriver "flexAnimBone" tx "my_vca_name" 0 1
$boneflexdriver "flexAnimBone" ty "multi_my_vca_name" 0 1
b
$bonemerge

It sets the bonemerge flag on the specified bone, which serves as a hint to the game code that the named bone will be used for bone merges (see Attachments) during the game. If this flag is not present, the bone can still be used for bone merging, but you'll get performance warnings.
$bonemerge also has several alternate uses:
* Typically† prevents studiomdl from collapsing bones during model compilation. As part of the optimization process, studiomdl will attempt to cull bones from the output MDL that are not strictly necessary. The prime candidates are 1) bones that have 0 vertices weighted to them and 2) any bone which is the only bone that its skinned vertices are weighted to. Unused bones are removed without issue, and, in the latter case, the bone is deleted and its vertex skinning weights are moved to its parent bone. Set $bonemerge on these types of bones to force studiomdl to keep them in the output MDL file. Setting $bonemerge on every bone in a model's skeleton potentially† ensures that the entire skeleton will be available in engine.
:
* The bonemerge flag is a critical component of procedurally-driven flexes. Procedural bones must have $bonemerge set on them in order for the technique to work.
* SFM typically hides $proceduralbones in the outliner and the viewport. Setting $bonemerge on the procedural bones forces SFM to always display them.
== Syntax ==
 $bonemerge <bone name>
== Writing Bonemerge in Notepad++ ==
There is no automated function for this yet, but you can do it manually using Regex in Notepad++. This process takes about two minutes.
#Open your mesh.smd in Notepad++.
#Copy the bone names from the very top into a new, empty file.
#Press Ctrl&H to enter "Replace" mode.
#In the "Find What" field, enter: ^\s*\d+\s*"(.+)"\s*-?\d+\s*$
#In the "Replace with" field enter: $bonemerge "\1"
#Make sure that ". Matches newline" is disabled.
#Click "Replace all"
Now you can paste those lines in your qc file, or use as a qci file.
bonemerge
$bonesaveframe

When using demand loaded animations (see $animblocksize and $sectionframes) and asynchronous loading is enabled in the engine, the first frame of every animation is stored in a highly compressed form that the animation system will use while waiting for the real data to show up. By default, all bones are written out in their entirety, but this is sometimes wasteful as not all bones need to both rotate & translate. This command allows you to specify which information is actually stored, in this case.
== Syntax ==
 $bonesaveframe <bone name> ["position"] ["rotation"]
== Example ==
 $BoneSaveFrame "Dog_Model.Pelvis" position rotation
 $BoneSaveFrame "Dog_Model.Leg1_L" rotation
 $BoneSaveFrame "Dog_Model.Leg2_L" rotation
 $BoneSaveFrame "Dog_Model.Foot_L" rotation
 $BoneSaveFrame "Dog_Model.Leg1_R" rotation
 $BoneSaveFrame "Dog_Model.Leg2_R" rotation
 $BoneSaveFrame "Dog_Model.Foot_R" rotation
 $BoneSaveFrame "Dog_Model.Spine1" rotation
 $BoneSaveFrame "Dog_Model.Spine2" rotation
 $BoneSaveFrame "Dog_Model.Spine3" rotation
 $BoneSaveFrame "Dog_Model.Neck1" rotation
 $BoneSaveFrame "Dog_Model.Neck1_Length" rotation
 $BoneSaveFrame "Dog_Model.Neck2" rotation
 $BoneSaveFrame "Dog_Model.Neck2_Length" position rotation
 $BoneSaveFrame "Dog_Model.Clavical_L" rotation
 $BoneSaveFrame "Dog_Model.Arm1_L" rotation
 $BoneSaveFrame "Dog_Model.Arm2_L" rotation
 $BoneSaveFrame "Dog_Model.Hand_L" rotation
 $BoneSaveFrame "Dog_Model.BigPhys_Attachment" position rotation
 $BoneSaveFrame "Dog_Model.Pully_Arm_L" rotation
 $BoneSaveFrame "Dog_Model.Clavical_R" rotation
 $BoneSaveFrame "Dog_Model.Arm1_R" rotation
 $BoneSaveFrame "Dog_Model.Arm2_R" rotation
 $BoneSaveFrame "Dog_Model.Hand_R" rotation
 $BoneSaveFrame "Dog_Model.Hand_R_Drill" rotation
 $BoneSaveFrame "Dog_Model.forward" rotation
== See also ==
* $animblocksize
* $sectionframes
bonesaveframe__NOTOC__
$brightness

$brightness is a deprecated shader parameter referenced only in the pre-release HDR version of the shader. 
It would contribute additively to the brightness of the alpha channel of the main texture. However, it is effectively commented out and unused.
References to it can still be found in a couple materials in the final game; it does nothing.
"UnlitGeneric"
{
	// Original shader: AddTexture
	"$basetexture" "effects/spark"
	"$brightness" "effects/spark_brightness"
	"$additive" 1
	"$vertexcolor" 1
}
Spark.png|spark.vtf
Spark brightness.png|spark_brightness.vtf
B
$bumpmap

It specifies a texture that will provide three-dimensional lighting information for a material. The texture is a bump map, but the process it is used for is called . The two terms are often used interchangeably, however.
==Basic Syntax==
LightmappedGeneric
{
	$basetexture	brick/brickwall021a
	$surfaceprop	brick
	$bumpmap		brick/brickwall021a_normal
}
==Additional Parameters==
==Console Commands==
==See also==
* 
* Bump map, for technical details and a guide to creation.
$burning

$burning is a material shader parameter available in the and . It covers the $basetexture with a $burndetailtexture, to give the illusion that the model has been injured by fire. It does this by switching the clean version of the texture to a different .vmt with a "_burning" prefix, which slowly increases the opacity of the $burndetailtexture up to 100%.
==Syntax==
 $burning	<bool>
burning
$cbox

It sets the clipping bounding box for the model. This box is used for the culling of models in the game for optimization.
A model will be culled as soon as the clipping bounding box is no longer in view of the camera.
If the coordinates of the clipping bounding box are all zero, $bbox is used instead.
==Syntax==
 $cbox (min x) (min y) (min z) (max x) (max y) (max z)
==See also==
* $bbox
* $hbox
* $hboxset
Category:Modeling
cbox
Category:Source__NOTOC__
$cdmaterials

It defines the folders in which the game will search for the model's materials (subfolders are not searched). Each path is relative to <game>\materials\.
It is traditional to specify the \models subfolder before any others, to prevent the materials from appearing in Hammer.
== Syntax ==
 $cdmaterials <path> <path 2> [...]
== Example ==
 $modelname		"weapons\shell.mdl"
 $cdmaterials		"models\weapons\"
 $body		shell	"shell_ref.smd"
 $sequence	idle	"shell_idle.smd"
cdmaterials
$checkuv

$checkuv is a QC command available in Source 2013. It checks the UVs of meshes and prints out messages if the checks fail.
== Syntax ==
$checkuv <0to1> <overlap> <inverse> <gutter [res] [min]>
; 0to1
: Checks that all UVs are in the [0, 1] range
; overlap
: Checks that all polygons in UV do not overlap
; inverse
: Check that all polygons in UV have the correct winding, i.e. the cross product of edge AB x BC points the right direction
; gutter
: Checks that the distance between edges in UV islands is a minimum number of pixels for a given texture size
c
$cliptotextures

__NOTOC__
The QC command $cliptotextures instructs the compiler to clamp all vertex texture co-ordinates to the range [0 1]. This will distort the texture projection for any triangles whose vertices contain values outside this range, so is usually not required unless you have a specific reason to use it.
If $cliptotextures is not specified, the compiler will leave the texture co-ordinates at their original values (or optimised equivalents). Under normal circumstances, texture co-ordinates outside the [0 1] range will simply wrap around the texture image, meaning they will look identical to co-ordinates within the [0 1] range.
3D artists occasionally make use of this wrapping behaviour in the UV mapping step of creating a model. If multiple sections of a model need to make use of the same area of the underlying texture, placing vertices over each other at the same co-ordinates can be more difficult to work with in the modeling software. Placing vertices at higher or lower multiples of these co-ordinates can allow the artist to visually separate the vertices in the modeling software, and have these vertices map back to the same area of the texture when the model is compiled. In this case, $cliptotextures would not be used when compiling the model, as the out-of-range texture co-ordinates would be clamped to values that the artist did not intend.
== Syntax ==
== See also ==
==External links==
* clip_texcoords in the portable studiomdl sources, whose value is set by the presence of $cliptotextures.
cliptotextures
$cmdlist

It creates a reusable list of $animation tokens, allowing you to reuse the same set of options for multiple $animations.
This in turn lets you not only save space, but also lets you edit multiple animations at once.
== Syntax ==
 $cmdlist (name) [options...]
=== Example ===
$cmdlist shared_stuff { ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 }
$Sequence	"shoot"		"anim/shoot"	cmdlist shared_stuff delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence	"draw" 	"anim/draw"		cmdlist shared_stuff delta ACT_VM_DEPLOY_LAYER
$Sequence	"reload" 	"anim/reload"	cmdlist shared_stuff delta ACT_VM_RELOAD_LAYER
Without using cmdlist, the QC would look like this
$Sequence	"shoot"		"anim/shoot"	ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 delta ACT_VM_PRIMARYATTACK_LAYER
$Sequence	"draw" 	"anim/draw"		ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 delta ACT_VM_DEPLOY_LAYER
$Sequence	"reload" 	"anim/reload"	ikrule rhand touch Weapon usesource ikrule lhand touch Weapon usesource Subtract a_idle 0 delta ACT_VM_RELOAD_LAYER
== Options ==
These commands are available to be used inside a cmdlist. Essentially the same as $animation, but with less options. 
As example Frames is missing.
*align
*alignboneto
*alignto
*compress
*counterrotate
*counterrotateto
*derivative
*fixuploop
*ikfixup
*ikrule
*lineardelta
*match
*matchblend
*noanimation
*numframes
*presubtract
*rotateto
*splinedelta
*subtract (but not delta)
*walkalign
*walkalignto
*walkframe
*weightlist
*worldspaceblend
*worldspaceblendloop
== See also ==
* $sequence
cmdlist
$collisionjoints

It is used to define a collision mesh made up of multiple independent parts, either for a ragdoll or for an animated object. If your model has no moving parts that need to collide, use $collisionmodel instead.
A ragdoll can have up to 32 separate parts (i.e. 32 bones can be simulated, 24 on older versions of Source). The limit for an animated model is 99 separate parts.
== Syntax ==
 $collisionjoints <collision mesh SMD/DMX>
 {
 <options>
 }
== Options ==
; All $collisionmodel options, except $concave
: 
; $concaveperjoint
: Permit concave collision geometry for individual bones.
; $rootbone <string|bone>
: Overrides the collision mesh's root bone.
; $jointskip <string|bone>
: Eliminates a joint in the skeleton that you don't want to use in collisions.
; $jointmerge <string|bone1> <string|bone2>
: Merges the vertex assignments for two joints. 
; $jointconstrain <string|bone> <axis> <allow_option> <min_angle> <max_angle> <friction>
: Limits of the a bone's movement relative to its parent bone. See $jointconstrain for a full description.
; $jointinertia <string|bone> <float|scale>
: Per-bone $inertia.
; $jointdamping <string|bone> <float|scale>
: Per-bone $damping. 
; $jointrotdamping <string|bone> <float|scale>
: Per-bone $rotdamping.
; $jointmassbias <string|bone> <float|bias>
: Mass is automatically distributed by volume, this lets you bias it per-bone.
; $noselfcollisions
: Disables collisions between bones in the same collision model for performance.
: 
; $jointcollide <string|bone1> <string|bone2>
: If any $jointcollide pairs are specified, only those joints collide with each other. 
: 
; $animatedfriction <float|FrictionTimeIn> <float|FrictionTimeOut> <float|FrictionTimeHold> <float|MinAnimatedFriction> <float|MaxAnimatedFriction>
: Used to animate the amount of friction on joints over time. This can be used to make character death ragdolls tense up.
: 
== Example ==
$collisionjoints "bip01_phys.smd"
{
	$mass			115.0
	$inertia		2.00
	$damping		0.01
	$rotdamping		0.40
	$rootbone		"bip01_pelvis"
	$jointmerge		"bip01_pelvis"	"bip01_spine"
	$jointmassbias		"bip01_l_arm2"	2.00
	$jointconstrain		"bip01_l_arm2"	x limit	0.00 0.00 0.00
	$jointconstrain		"bip01_l_arm2"	y limit	0.00 0.00 0.00
	$jointconstrain		"bip01_l_arm2"	z limit	-120.00 4.00 0.20
	$jointrotdamping	"bip01_head"	5.00
	$jointconstrain		"bip01_head"	x limit	-20.00 20.00 0.00
	$jointconstrain		"bip01_head"	y limit	-25.00 25.00 0.04
	$jointconstrain		"bip01_head"	z limit	-13.00 30.00 0.04
}
== See also ==
*$weightlist
*VPhysics
*Physics and Ragdolls
*$collisionmodel
* YouTube tutorial on $collisionjoints
collisionjoints