nyuuzyou/wikis huggingface dataset:
$collisionmodel

It is used to embed a static collision mesh in a model for use in VPhysics calculations. Animated models (including ones that will become ragdolls) should use instead.
== Syntax ==
 $collisionmodel	<collision mesh SMD/DMX>
 {
 	<options>
 }
== Options ==
; 
: Manually set the mass of the model, in kilograms. 
;
: Calculate the mass of the model based on the volume of the collision model and the material defined in its prop_data.
; 
: By default, studiomdl will generate a single convex hull by 'shrinkwrapping' any concavities. You can create a concave hull by including multiple convex shapes (potentially overlapping) in your collision model, smoothing the hulls’ shading, and passing this command.
; 
:By default, the model compiler limits a concave collision model to twenty convex pieces. This command can be used to override the limit if you are creating a Costly collision model. 
; 
: Override the center of mass, in local coords.
; 
: Inertia scale. Higher values will make the physics object more sturdy, while lower values will make it more wobbly.
; 
: Linear damping scale. Affects how quickly an object's velocity drops to zero.
; 
: Rotational damping scale. Affects how quickly an object's angular velocity drops to zero. 
; 
: Scales air resistance. Essentially a more subtle version of $damping. 
; 
: Rarely used. Eliminates a joint in the collision model that you don't want to use. (i.e. if you were using a render model as a ragdoll, and it has bones you don't want).
; 
: Merges the vertex assignments for two joints.
; 
: Like $inertia, but per-bone.
; 
: Like $damping, but per-bone.
; 
: Mass is automatically distributed by volume, this lets you bias it per-bone.
; 
: Like $rotdamping, but per-bone.
; 
: If any $jointcollide pairs are specified, only those joints collide with each other.
; 
: The limits of the joint's movement.
; 
: The parent-most bone that actually has collision geometry.
; 
: Turns off all collisions between bones in this model.
; 
: Used to animate the amount of friction on joints over time.
; 
: Adds a convex model onto the collision model with the specified position, angle, and scale. The "concave" option is optional. 
; 
: Used to remove flat shaded faces. Off by default.
; 
: The amount of distance tolerance to use when trying to merge vertices of separate concave pieces in order to create a single concave piece.
; 
: The amount of tolerance to check if the vertice normal is similar enough to consider merging to a unique vertice. Used in conjunction with $weldposition.
; 
: Assumes the joints are positioned in world space.
== Example ==
 $collisionmodel "tree_deciduous_01a_physbox"
 {
 	$mass 350.0
 	$concave
 }
==See also==
* Collision mesh
* $collisionjoints
* Costly collision model
* VPhysics
* Physics and Ragdolls
collisionmodel
$collisiontext

It defines custom gibs for a breakable model. Generic gibs are instead defined by $keyvalues > prop_data > breakable_model.
== Examples ==
 $collisiontext
 { 
 	break { model	mycustomgib1	health 0 }
 	break { ragdoll	mycustomgib2	health 25	fadetime 15	debris 1	burst 300 }
 	break { model	mycustomgib3	health 10	fadetime 30	fademindist 20	fademaxdist 30 }
 	break { model	mycustomgib4	health 10	fadetime 20	offset -2 3.68 12.4 }
 }
 $collisiontext
 { 
 	break
 	{
 		"model"	"mycustomgib1"
 		"health" "0"
 	}
 
 	break
 	{
 		"ragdoll" "mycustomgib2"
 		"health" "25"
 		"fadetime" "15"
 		"debris" "1"
 		"burst" "300"
 	}
 
 	break
 	{
 		"model"	"mycustomgib3"
 		"health" "10"
 		"fadetime" "30"
 		"fademindist" "20"
 		"fademaxdist" "30"
 	}
 
 	break
 	{
 		"model"	"mycustomgib4"
 		"health" "10"
 		"fadetime" "20"
 		"offset" "-2 3.68 12.4"
 	}
 }
== Options ==
; model <path\name>
: The (compiled) model path to spawn as a gib. Make sure the model used as a gib is properly setup to work as a physics prop.
; ragdoll <path\name>
: The (compiled) model path to spawn as a ragdoll.
; offset <Vector>
: Offsets the current gib. Values are in units.
; health <float>
: Overrides the model's own health value "This sometimes has to be placed in the $keyvalues line."
; fadetime <float|seconds>
: Time before gibs start to fade away. They are removed once the fade is complete. Setting this will also set the gib to not collide with dynamic objects (however it can be overriden by debris option).
; fademindist <float|units>
: Distance from the camera at which to start rendering the gib.
; fademaxdist <float|units>
: Distance from the camera at which to stop rendering the gib.
; debris <bool>
: Prevents the gib model from colliding with dynamic objects when made true. It is strongly recommended to be enabled for any small gibs.
; burst <float>
: Adds force, in units per second, to the gib, pushing it outward when the parent model breaks. This is useful if you want to make gibs go flying further away from the origin. Not defining this can lead into gibs simply falling flat to the ground. If $autocenter wasn't used, it will apply the force from the center of the gib piece instead of the parent model's origin.
; placementbone <bone>
: If set to a bone name, it will spawn the gib at the bone's origin.
; placementattachment <attachment>
: If set to an attachment name, it will spawn the gib at the attachment's position.
; motiondisabled <bool>
: Disables all movement, motion, of the gib if enabled.
; multiplayer_break <string>
: If set to server, the gib will not be spawned by the client. If set to client, the gib will not be spawned by the server. By default, both paths are allowed.
; velocity <Vector>
: Applies velocity to the gib. The default value is 0 0 0 (no velocity).
== See also ==
* Prop Data#Gibs
collisiontext
$color

__NOTOC__
 independently scales the red, green and blue channels of an albedo. There are two ways of expressing a value:
===Syntax===
 $color "[ <float> <float> <float> ]"
 $color "{ <int> <int> <int> }"
==Gamma==
Source uses a gamma correction of 2.2 by default. This must be taken into account when attempting to adjust the color of a texture to match some other color in a screenshot (for example, when trying to match the color of the bottom of a skybox material to the color of fog in the map). This is done by raising the initially calculated scale to the power of 2.2 before setting the $color value for your material. For example, if the sample (target) color in a screenshot is 120, the color of your texture at the point of interest is 240, and you want the two colors to match, you need to compute the albedo scale for your material as (120 / 240) ^ 2.2 = 0.218 (not 0.5, as one might expect).
==Solid color==
This parameter can be used without an albedo to display a solid color without the need of a texture (except a %tooltexture). As well as a small saving in performance and memory footprint, can be used to completely change the material's color at run-time if desired.
In this scenario, "[1 1 1]" is pure white.
====
 works the same way as but for use on models.
===Syntax===
 $color2 "[ <float> <float> <float> ]"
 $color2 "{ <int> <int> <int> }"
===Additional Model Parameters===
 Enables the use of an alpha mask to define areas on the model to tint. Uses the alpha channel of the $basetexture.
 Sets the amount to replace with solid 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. Default value is '0'.
 Use a seperate texture as a mask for color tinting instead of the alpha. Only the green channel is used for tinting. 
 Prevents the model's material from being tinted by $color2 or rendercolor.
 Prevents the model's material from being tinted by $color2 or rendercolor.
==Caveats==
* $color2 is incompatible with the use of $selfillum, as it will override the glow properties used by both $selfillum & $selfillummask. Use the $selfillumtint command to adjust the glow so it properly appears.
==External links==
* Convert RGB Values to Percent
$constantdirectionallight

If set, constdirectionallightdot is used to calculate light intensity rather than the normal directional dot product. Only valid if STUDIOHDR_FLAGS_STATIC_PROP ($staticprop) is also set.
==Syntax==
 $constantdirectionallight <scale>
==Example==
 $modelname		"props_foliage\hedge_256_128.mdl"
 
 $staticprop
 
 $body		body	"hedge_256_128.smd"
 
 $constantdirectionallight	0.15
 
 $surfaceprop		"wood_solid"
__NOTOC__
Category:Modeling
constantdirectionallight
Category:Source
$contents

It specifies a list of the contents types to use for SolidMask tests during non-hitbox traces. 
* This feature was specifically added to allow us to make things like fences out of props instead of brush models. 
* See also .
== Example ==
 $contents "monster" "grate"
Available contents types are:
; 
: Makes it a grate.
: Grates are not solid to bullets or line of sight, but solid to everything else. 
: 
: 
; 
: Marks it as a monster, better known in Source as an NPC.
; 
: Makes it not solid to anything.
: Nonsolid cannot be combined with any other contents flags.
; 
: Makes it solid.
: Solid is the default value, so this parameter is usually used only for the command, to make a solid child of a non-solid parent.
; 
: Makes it a ladder. 
: Whether a prop ladder is actually climbable is dependent upon the game; see Working Ladders.
; 
: Marks it as debris. 
: Debris is solid to brushes, hitscan weapons, and non-debris physics objects, but is nonsolid to everything else, including players.
Additional contents from can be set via , although results may vary. For example, set the contents to (debris) to make it block bullets without blocking players.
== See also ==
* CollisionProperty
contents__NOTOC__
$continue

It is used to insert more parameters to sequences or animations after declared, by expanding it. This somehow also allow expand macros. 
== Syntax ==
 $continue "SequenceName" <options>
== Examples ==
$definemacro SpyMeleeGestureAttackIKRelease gesturename filename activityname \\
$sequence $gesturename$ { \\
	$filename$ \\
	weightlist SpymeleeRightArmBlend \\
	subtract $gesturename$ 0 \\
	delta \\
	ikrule lhand release \\
	ikrule rhand release \\
	iklock rfoot 1 0 iklock lfoot 1 0 \\
	activity $activityname$ 1 \\
} \\
$continue $gesturename$
$definemacro SelfDeltaSequence FileName \\
$animation a_$FileName$ $FileName$ subtract a_$FileName$ 0 \\
$sequence $FileName$ a_$FileName$ predelta \\
$continue $FileName$ \\
// make a sequence named DLC1_Intro_Male_LeanUp with above macro, tell to lock both feets in position and set activity
$SelfDeltaSequence DLC1_Intro_Male_LeanUp {
	iklock "rfoot" 1 0
	iklock "lfoot" 1 0
	activity ACT_DLCINTRO_01 -1
}
// edit above sequence $animation, constraining it start and end
$continue a_DLC1_Intro_Male_LeanUp frames 0 269
== See also ==
* $prepend Add more options to the specified sequences or animations before any other option.
* $append Add more options to the specified sequences or animations after all other options.
* $definemacro
* $definevariable
Category:Modeling
A
continue__NOTOC__
Category:Source__NOTOC__
$controller

It creates a channel to manually set a single axis position or angle on a bone through game code. Not recommended for use, as this functionality was succeeded by $poseparameter and $sequence.
== Syntax ==
 $controller <number> "<bone_name>" [L]<axis>[R] <start> <end>
where
; <number> : The number of the controller (you may need multiple controllers). 0-3 for custom controller, 4 or "mouth" for jaw (GoldSrc only).
; <bone_name> : The name of the bone to control.
; <L> : The prefix 'L' specifies that the controller is to loop the bone movement from the <end> to the <start>. 
; <axis> : The axis can be either X, Y, or Z. You need to specify a new controller for each axis of movement/rotation. 
; [R] : The suffix 'R' specifies that the bone is to be rotated from <start> to <end> . Not including 'R' simply moves the bone along the <axis> from <start> world units to <end> world units.
; <start> : Starting value of the controller.
; <end> : End value of the controller.
== Example ==
 $modelname "WScanner_Single.mdl"
 $model "WScanner" "WScanner_Single_Waste_Scanner_Reference.smd"
 $cdmaterials "models\obsolete\waste_scanner\"
 //This controller rotates the root bone from 0 to 360 degrees.
 $controller 0 "Dummy (Root)" ZR 0 360
 //Controller 1 has two entries to allow for the bone to travel 17 units in the X(-Z) direction.
 //$controller lines can only have one direction specified, so this allows for blending the movement.
 //move the antenna base bone from 0 to 17 units in the X direction.
 $controller 1 "Antenna Base" X 0 17
 //move the antenna base bone from 0 to -17 units in the Z direction.
 $controller 1 "Antenna Base" Z 0 -17
controller
$declareanimation

Forward declares an animation. This useful when you want to use an animation in a sequence, but the data for it won't be loaded until a later external .mdl file (see $includemodel). $declareanimation makes a empty animation entry so that the local sequence can reference something, and at run time these references are overwritten with the actual animation index.
== Syntax ==
 $declareanimation <name>
declareanimation__NOTOC__
$declaresequence

It forward declares a sequence.
This is useful when you want to add other sequences as layers that aren't locally declared, such as when they're actually part of an external .mdl file (see $includemodel). $declaresequence makes a empty sequence entry so that the local sequence pointers can get set, and at run time these references are overwritten with the actual sequence index.
In simple man's terms: $declaresequence can be used to tell the compiler that the declared sequences are to be taken from the $includemodel, but the ones not declared will be taken from the current compile. Useful to prevent sequence index mismatches if modding for multiplayer by changing the order of declared sequences.
Declared sequences will be compiled in the order the $declaresequence lines appear, not in the order of the original $includemodel file. If you do want to keep the sequence order of the $includemodel without making any changes, you do not need $declaresequence.
== Syntax ==
 $declaresequence (sequence name)
declaresequence
==Example==
If you want to replace one animation of a model while using all others from the $includemodel you will need to create a DeclareSequence.qci file listing all animations. Crowbar is capable of making one for you.
Then simply comment out your desired declare sequence and add a $sequence in its stead.
...
$declaresequence "melee_sweep_FirstAidKit"
$declaresequence "use_cola"
$declaresequence "melee_sweep_cola"
//$declaresequence "use_ammopack"
$sequence "use_ammopack" "anims/use_ammopack_NEW" fadein 0.2 fadeout 0.2 fps 30
$declaresequence "crouch_use_ammopack"
$declaresequence "melee_sweep_ammopack"
$declaresequence "Defibrillate_Incap_Standing"
...
Of course you will need to add the declaresequence.qci file and the $includemodel to your compiling QC file using the $includemodel and $include commands
//includemodel of the original anim_teenangst.mdl to take animations from
$includemodel "survivors/animaTeenAngst.mdl"
//declaresequence to copy all animations but replace one (or multiple)
$include "anim_teenangst_DeclareSequence.qci"
$defaultweightlist

It creates a weightlist that is automatically applied to any $sequence in the model that does not already have a weightlist.
Unlike $weightlist, it does not count towards the weightlist limit (128 by default). However, if more than one is specified, only the last one will be used.
== Syntax ==
Identical to $weightlist, but it does not accept a name:
$defaultweightlist {
	<bone> <weight>
	<bone> <weight>
	[...]
}
== See also ==
* $weightlist
* $sequence
defaultweightlist__NOTOC__
$definebone

It defines a bone outside of any .smd source. This is useful when building animation only mdl's that would otherwise optimize out all the bones since none of them are connected to any geometry or attachment points. You can get studiomdl to dump this out using the "-definebones" command line option.
The (fixup) fields specify how the IK solver has rotated any of the bones to match the single X axis as the long axis requirement for all bones in an IK chain. All the source animations are resolved to match this new orientation.
$definebone can also be used to change the bone order of a model (for example, bone merging purposes), by specifying it before any model references and changing around the $definebone list order.
This command is run before any $hierarchy commands.
== Syntax ==
 $definebone (name) (parent) (X) (Y) (Z) (xr) (yr) (zr) (fixup X) (fixup Y) (fixup Z) (fixup X Rotation) (fixup Y Rotation) (fixup Z Rotation)
== Generating definebone lines using Crowbar==
The Crowbar Decompiling tool has a user interface for studiomdl, which also contains an automated process for writing $definebone lines.
#Remove all existing $definebone lines. Alternatively; comment out all definebone lines by adding a /* before the first definebone line and a */ after the last, to comment out multiple lines.
#In the "Compile" tab of Crowbar, select the "definebones" checkbox. You can decide to write everything into a qci file by checking the "Create qci file" checkbox underneath
#Click "Compile". This will not compile the model itself, it will only generate definebone lines. If you did not decide to write a qci file, you must copy the lines from crowbars compile-log text box and paste it into your qc file.
definebone__NOTOC__
$detail

It specifies a texture which Source will use to add high-resolution detail to a material when it is viewed up close, by darkening or lightening the albedo appropriately, depending on the $detailblendmode. You can also use a full color (as opposed to grayscale) image and blend it using . It is very effective for increasing the apparent resolution of a texture, and was used extensively in , as well as for the white tile textures's bumps.
: 
: 
: 
: 
== Syntax ==
 $detail <texture>
You will probably want to use at least $detailscale (see below) as well.
== Parameters and Effects ==
=== WorldVertexTransition Parameters ===
=== SolidEnergy Parameters ===
== Valve's Detail Textures ==
Valve's stock detail textures (available in OB only) are best used with the following pre-configured values:
 $detail detail\noise_detail_01 // e.g. for brickwork, concrete...
 $detailscale 7.74
 $detailblendfactor 0.8
 $detailblendmode 0
 $detail detail\metal_detail_01
 $detailscale 4.283
 $detailblendfactor .65
 $detailblendmode 0
 $detail detail\rock_detail_01
 $detailscale 11
 $detailblendfactor 1
 $detailblendmode 0
 $detail detail\plaster_detail_01
 $detailscale 6.783
 $detailblendfactor .8
 $detailblendmode 0
The below parameters come from models\props_forest\LadderWood.vmt. It is the only Valve Stock texture VMT file to use this particular detail texture. Because the detail texture (detail\wood_detail_01) is a high resolution (1024×1024), the $detailscale is lower than the others, with the exception of rock_detail_01.
 $detail detail\wood_detail_01
 $detailscale 2.563
 $detailblendfactor .8
 $detailblendmode 0
Additionally, there are 2 other stock detail textures. and . These files were used in the "leaked" version of and in using the following parameters.
 in Episode One materials:
 $detail detail/detaildirt001a
 $detailscale 0.27
 in Episode One materials:
 $detail detail/detailash001a
 $detailscale 0.50
== See also ==
Hiding large-scale tiling with detail textures - How to make texture repeating less noticeable using $detail
d
$displacementmap

The $displacementmap command is an alternative to $bumpmap that uses a heightmap to give the illusion of depth. 
It's the most realistic of all the texture shadowing techniques, but consequently is also the most expensive.
It requires a model compiled with $subd. For best results use a relatively high tessellation level.
==Syntax==
 $displacementmap <texture>
 $displacementwrinkle <bool>
==External links==
*The shader parameter in use
d
$envmapmask

It defines a specular mask which affects how strongly each pixel of a material reflects light from the . The mask should be a grayscale image in which entirely reflective areas are white and entirely matte areas are black. For diffuse type specularity which does not rely on $envmap, see .
==VMT syntax example==
 $envmapmask <texture>
 VertexLitGeneric
 {
 	$envmap			env_cubemap
 	$envmapmask		"props/tvscreen_test"
 }
==Additional parameters==
====CS:GO WorldVertexTransition Parameters====
==Alternative methods==
Rather than creating a whole new texture for a specular mask, you can embed one into the alpha channel of the or . Model materials with must do this. Unfortunately, it won't reduce memory usage.
If you do use these commands, transformations and other such parameters applied to will also apply to the specular mask.
==Merging Specular Level into Normal Alpha in 3ds Max==
To merge a Specular Level map into the Normal Map alpha, you can create a Composite Map node with the normal map in Layer 1 and the specular map in Mask 1. Then right-click the composite map, click Render Map and save this new image to file (remembering to keep the Gamma at 1.0 and using 32 bits per pixel in the save options).
These steps are automated in the Alpha Spec tool in Wall Worm 2.72+.
==See also==
* $basetexture
* $envmap (environment map) 
* $phong (diffuse reflection)
* $selfillum 
e
Category:VMT Reflections
$fresnelrangestexture

$fresnelrangestexture is a 2d texture merged from several 1d textures to control the Fresnel term of blinn-phong specular and $rimlight.
* The V coordinate of the texture corresponds to $warpindex. If there is an alpha channel of $masks1, you can control $warpindex through alpha to select different Fresnel mappings.
* The U coordinate of the texture corresponds to the mapping relationship to the Fresnel value. The intensity of Fresnel corresponds to the coordinate value of U.
When $fresnelrangestexture exists, $phongfresnelranges is invalid
Fresnel will force the use of normalized VdotN as a constant sampling value to map fresnelrangestexture
$fresnelrangestexture consists of three channels of RGB:
# Channel R: No effect
# Channel G: After sampling, remap VdotN to obtain the final blinn-phong specular Fresnel mask
# Channel B: After sampling, multiply it with the RimMask (R channel) of $masks1 to obtain the Fresnel mask of AmbientReflection (rimlight related to the environment)
fresnelrangestexture
$halflambert gbuffer off

This game provides $halflambert effect separately for new lights. It is activated by default (only if is 3 and higher and if $phong is enabled), that's why there is this parameter that allows you to turn it off. This effect looks pretty nice for objects that don't cast any dynamic shadows, such as . However, this effect has a negative impact on objects and new lights with enabled shadows, also half lambert isn't physically accurate and is similar to how translucency works. The only good it really does is making up for bad ambient lighting. So this effect should be turned off. The parameter takes bool value (1 or 0).
== External links ==
Newlight Directionality Fix - workshop addon that disabled gbuffer's half lambert for all materials (if $phong is enabled) from the original game.