Blackmesa viewmodel: Difference between revisions
Jump to navigation
Jump to search
Tip:You can use SetBodyGroup input to change arms in your singleplayer map. Just add logic_auto that will fire this input via OnLoadGame and OnMapSpawn outputs.
Bug:The blood/slime splatter overlay is unfinished/broken in current versions of the game. The issues is:
Bug:Using different body groups for arms can cause issue when viewmodel picks random body group for arms.
Important:Used 2 individual entities. The first appears with player and used for satchel radio. The second appears only if a weapon is picked up by player and used for all the available weapons. The first entity's index value is always smaller than the second one's.
No edit summary |
MyGamepedia (talk | contribs) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{CDA|CBlackMesaViewModel|CBaseViewModel|CBaseAnimating|CBaseEntity|}} | |||
{{ent not in fgd|codeonly=1}} | {{ent not in fgd|codeonly=1}} | ||
{{this is a|model entity|name=blackmesa_viewmodel|game=Black Mesa}} This game uses its own [[classname]] for [[viewmodel]] entity (the mod version still uses the original classname). Unique from other games in the ability to apply blood/slime to the models and bobbing customization via | {{this is a|model entity|name=blackmesa_viewmodel|game=Black Mesa}} This game uses its own [[classname]] for [[viewmodel]] entity (the mod version still uses the original classname). Unique from other games in the ability to apply blood/slime to the models and bobbing customization via console variables. | ||
{{tip|You can use {{code|SetBodyGroup}} input to change arms in your singleplayer map. Just add {{ent|logic_auto}} that will fire this input via {{code|OnLoadGame}} and {{code|OnMapSpawn}} outputs. | {{tip|You can use {{code|SetBodyGroup}} input to change arms in your singleplayer map. Just add {{ent|logic_auto}} that will fire this input via {{code|OnLoadGame}} and {{code|OnMapSpawn}} outputs. | ||
{{note|Don't use this tip if your are using [[weapon_crossbow|crossbow]], [[weapon_rpg|RPG]], [[weapon_frag|frag]], [[weapon_satchel|satchel]], [[weapon_tripmine|tripmine]] and/or [[weapon_snark|snark]] in your map. This trick will disable some parts of the models for these weapons after save reload.}} | {{note|Don't use this tip if your are using [[weapon_crossbow (Black Mesa)|crossbow]], [[weapon_rpg (Black Mesa)|RPG]], [[weapon_frag (Black Mesa)|frag]], [[weapon_satchel (Black Mesa)|satchel]], [[weapon_tripmine (Black Mesa)|tripmine]] and/or [[weapon_snark (Black Mesa)|snark]] in your map. This trick will disable some parts of the models for these weapons after save reload.}} | ||
}} | }} | ||
{{ | {{bug|hidetested=1|The blood/slime splatter overlay is unfinished/broken in current versions of the game. The issues is: | ||
* Heavy short freeze in the game when applied for the first time {{not|{{bms12|}}}}. | * Heavy short freeze in the game when applied for the first time {{not|{{bms12|}}}}. | ||
* Frags, satchels, tripmines and snarks doesn't save blood overlay when used (new one in hand saves it) {{not|{{bms12}} with exception of snarks}}. | * Frags, satchels, tripmines and snarks doesn't save blood overlay when used (new one in hand saves it) {{not|{{bms12}} with exception of snarks}}. | ||
Line 14: | Line 13: | ||
* Blood/slime saves in multiplayer after death. | * Blood/slime saves in multiplayer after death. | ||
* | * | ||
|hidetested=1}} | }} | ||
{{bug|hidetested=1|Using different body groups for arms can cause issue when viewmodel picks random body group for arms.}} | |||
{{important|Used 2 individual entities. The first appears with {{ent|player}} and used for satchel radio. The second appears only if a weapon is picked up by player and used for all the available weapons. The first entity's index value is always smaller than the second one's.}} | |||
==Dedicated Console Variables== | ==Dedicated Console Variables== | ||
{{varcom|start}} | {{varcom|start}} | ||
{{varcom|cl_bobcycle|0.01|[[Float]] | {{varcom|cl_bobcycle|0.01|[[Float]]|Speed of viewmodel bobbing.}} | ||
{{varcom|cl_bobup|1| | {{varcom|cl_bobup|1|Float|Scale of forward/backward bobbing for viewmodel.}} | ||
{{varcom|cl_bobside|1| | {{varcom|cl_bobside|1|Float|Scale of left/right bobbing for viewmodel.}} | ||
{{varcom|cl_viewmodel_lag|3| | {{varcom|cl_viewmodel_lag|3|Float|Scale of the lag when you move player's camera. Minimum value is 0, maximum value is 50.}} | ||
{{varcom|cl_csm_cascade_viewmodel_ignore|0|[[Bool]] | {{varcom|cl_csm_cascade_viewmodel_ignore|0|[[Bool]]|Enable/disable self-shadowing of viewmodel from [[CSM]]. {{bug|hidetested=1|[[CSM]] shadows don't apply properly if this is enabled.}}}} | ||
{{varcom|cl_csm_viewmodel_shadows|1| | {{varcom|cl_csm_viewmodel_shadows|1|Bool|Enable/disable [[CSM]] on viewmodel.}} | ||
{{varcom|cl_csm_viewmodel_max_shadow_dist|21| | {{varcom|cl_csm_viewmodel_max_shadow_dist|21|Float|The max distance at which [[CSM]] will be displayed on viewmodel. {{note|Recommended value is 37 and not default 21.}}}} | ||
{{varcom|cl_csm_viewmodel_farz|30| | {{varcom|cl_csm_viewmodel_farz|30|Float|The max '''allowed''' distance at which [[CSM]] will be displayed on viewmodel. {{note|Recommended value is 37 and not default 30.}}}} | ||
{{varcom|cl_csm_viewmodel_max_visible_dist|100| | {{varcom|cl_csm_viewmodel_max_visible_dist|100|Float|It doesn't affect anything.}} | ||
{{varcom|cl_csm_viewmodel_slopescaledepthbias|1.5| | {{varcom|cl_csm_viewmodel_slopescaledepthbias|1.5|Float|[[CSM]] slope scale depth bias on viewmodel.}} | ||
{{varcom|cl_csm_viewmodel_depthbias|0.00005| | {{varcom|cl_csm_viewmodel_depthbias|0.00005|Float|[[CSM]] depth bias on viewmodel.}} | ||
{{varcom|vr_viewmodel_translate_with_head|0| | {{varcom|vr_viewmodel_translate_with_head|0|Float|[[Source SDK]] leftover.}} | ||
{{varcom|vr_viewmodel_offset_forward|-8| | {{varcom|vr_viewmodel_offset_forward|-8|Float|[[Source SDK]] leftover.}} | ||
{{varcom|vr_viewmodel_offset_forward_large|-15| | {{varcom|vr_viewmodel_offset_forward_large|-15|Float|[[Source SDK]] leftover.}} | ||
{{varcom|r_drawviewmodel|1| | {{varcom|r_drawviewmodel|1|Bool|Enable/disable viewmodel draw.}} | ||
{{varcom|viewmodelfx| |[[Integer]] | {{varcom|viewmodelfx| |[[Integer]]|This is a debug command that was created to test the blood/slime on viewmodel. 0 - red blood, 1 - green blood, 2 - slime, 3 - no blood/slime.}} | ||
{{varcom|cl_mdldetailfx_enable|1| | {{varcom|cl_mdldetailfx_enable|1|Bool|Enable/disable blood/slime on viewmodel generally.}} | ||
{{varcom|cl_mdldetailfx_universal_hands|1| | {{varcom|cl_mdldetailfx_universal_hands|1|Bool|Enable/disable blood/slime for right hand ([[weapon_satchel|satchel]] only).}} | ||
{{varcom|cl_mdldetailfx_enable_hands|1| | {{varcom|cl_mdldetailfx_enable_hands|1|Bool|Enable/disable blood/slime on hands (''arms'' bodygroup).}} | ||
{{varcom|cl_mdldetailfx_blood_time|60| | {{varcom|cl_mdldetailfx_blood_time|60|Float|Amount of time before blood (red and green) on viewmodel will disappear.}} | ||
{{varcom|cl_mdldetailfx_slime_time|10| | {{varcom|cl_mdldetailfx_slime_time|10|Float|Amount of time before slime on viewmodel will disappear.}} | ||
{{varcom|viewmodel_fov_override|-1|Float|Overrides the field-of-view for all viewmodels. -1 means do not override. | |||
{{important|This console variable is hidden with [[Console_command_flags|"development only" flag]]. Can't be changed without using server plugins. | |||
{{workaround|You can change weapon's field-of-view in the ''dmx'' file. | |||
}} | |||
}} | |||
}} | |||
{{varcom|end}} | {{varcom|end}} |
Latest revision as of 05:56, 13 August 2025
![]() |
---|
CBlackMesaViewModel |

blackmesa_viewmodel
is a model entity available in Black Mesa. This game uses its own classname for viewmodel entity (the mod version still uses the original classname). Unique from other games in the ability to apply blood/slime to the models and bobbing customization via console variables.


- Heavy short freeze in the game when applied for the first time (not in
).
- Frags, satchels, tripmines and snarks doesn't save blood overlay when used (new one in hand saves it) (not in
with exception of snarks).
- Slime doesn't applies for hands of each weapon model.
- Slime doesn't applies to the hands if the weapon model was already covered in blood.
- Blood/slime saves in multiplayer after death.


Dedicated Console Variables
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
cl_bobcycle | 0.01 | Float | Speed of viewmodel bobbing. |
cl_bobup | 1 | Float | Scale of forward/backward bobbing for viewmodel. |
cl_bobside | 1 | Float | Scale of left/right bobbing for viewmodel. |
cl_viewmodel_lag | 3 | Float | Scale of the lag when you move player's camera. Minimum value is 0, maximum value is 50. |
cl_csm_cascade_viewmodel_ignore | 0 | Bool | Enable/disable self-shadowing of viewmodel from CSM. ![]() |
cl_csm_viewmodel_shadows | 1 | Bool | Enable/disable CSM on viewmodel. |
cl_csm_viewmodel_max_shadow_dist | 21 | Float | The max distance at which CSM will be displayed on viewmodel. ![]() |
cl_csm_viewmodel_farz | 30 | Float | The max allowed distance at which CSM will be displayed on viewmodel. ![]() |
cl_csm_viewmodel_max_visible_dist | 100 | Float | It doesn't affect anything. |
cl_csm_viewmodel_slopescaledepthbias | 1.5 | Float | CSM slope scale depth bias on viewmodel. |
cl_csm_viewmodel_depthbias | 0.00005 | Float | CSM depth bias on viewmodel. |
vr_viewmodel_translate_with_head | 0 | Float | Source SDK leftover. |
vr_viewmodel_offset_forward | -8 | Float | Source SDK leftover. |
vr_viewmodel_offset_forward_large | -15 | Float | Source SDK leftover. |
r_drawviewmodel | 1 | Bool | Enable/disable viewmodel draw. |
viewmodelfx | Integer | This is a debug command that was created to test the blood/slime on viewmodel. 0 - red blood, 1 - green blood, 2 - slime, 3 - no blood/slime. | |
cl_mdldetailfx_enable | 1 | Bool | Enable/disable blood/slime on viewmodel generally. |
cl_mdldetailfx_universal_hands | 1 | Bool | Enable/disable blood/slime for right hand (satchel only). |
cl_mdldetailfx_enable_hands | 1 | Bool | Enable/disable blood/slime on hands (arms bodygroup). |
cl_mdldetailfx_blood_time | 60 | Float | Amount of time before blood (red and green) on viewmodel will disappear. |
cl_mdldetailfx_slime_time | 10 | Float | Amount of time before slime on viewmodel will disappear. |
viewmodel_fov_override | -1 | Float | Overrides the field-of-view for all viewmodels. -1 means do not override.
![]() ![]() |