Difference between revisions of "Help:Model Viewer"

From Team Fortress Wiki
Jump to: navigation, search
m (Program limitations: Morose.)
m (Tools: Correct name)
 
(41 intermediate revisions by 12 users not shown)
Line 56: Line 56:
 
# Open up {{code|dxsupport.cfg}} in a text editor of your choice.  If you do not have this file, create it with the content from [[Dxsupport.cfg.txt|here]].
 
# Open up {{code|dxsupport.cfg}} in a text editor of your choice.  If you do not have this file, create it with the content from [[Dxsupport.cfg.txt|here]].
 
# Find your graphics card within that file.
 
# Find your graphics card within that file.
# Add or modify the following lines in {{code|dxsupport.cfg}} within the section for your graphics card and save it, the Viewer should now be using high settings.<br />{{code|"setting.dxlevel" "99"<br />"ConVar.mat_antialias" "8"<br />"ConVar.mat_forceaniso" "8"<br />"ConVar.mat_picmip" "-10"}}
+
# Add or modify the following lines in {{code|dxsupport.cfg}} within the section for your graphics card and save it, the Viewer should now be using high settings.
 +
<pre>
 +
"setting.dxlevel" "99"
 +
"ConVar.mat_antialias" "8"
 +
"ConVar.mat_forceaniso" "8"
 +
"ConVar.mat_picmip" "-10"
 +
</pre>
 
# If your card isn't listed, go to Control Panel, open Device Manager, find your graphics card under Display adapters section, open Details tab of its Properties and select Hardware Ids. The IDs are 4-character hexadecimal numbers. The Vendor ID is located after VEN_, and the Device ID is located after DEV_.
 
# If your card isn't listed, go to Control Panel, open Device Manager, find your graphics card under Display adapters section, open Details tab of its Properties and select Hardware Ids. The IDs are 4-character hexadecimal numbers. The Vendor ID is located after VEN_, and the Device ID is located after DEV_.
# Navigate to the bottom of the file, and find the {{code|Unknown}} sections. Choose the one that refers to your graphics card, which will be{{code|ATI Unknown}} if you're using an ATI/AMD graphics card, {{code|NVidia Unknown}} if using an Nvidia graphics card, or {{code|Intel Unknown}} if using an Intel graphics card.
+
# Navigate to the bottom of the file, and find the <code>Unknown</code> sections. Choose the one that refers to your graphics card, which will be <code>ATI Unknown</code> if you're using an ATI/AMD graphics card, <code>NVidia Unknown</code> if using an Nvidia graphics card, or <code>Intel Unknown</code> if using an Intel graphics card.
# Once you have located this, change the lines of the one that match, so that looks like the following:{{code|"name" "'''Any name you want here'''"<br />"VendorID" "0x['''Insert Vendor ID from step 5 here''']"<br />"MinDeviceID" "0x['''Insert Device ID from step 5 here''']"<br />"MaxDeviceID" "0x['''Insert Device ID from step 5 here''']"<br />"setting.dxlevel" "99"<br />"ConVar.mat_antialias" "8"<br />"ConVar.mat_forceaniso" "8"<br />"ConVar.mat_picmip" "-10"<br />"ConVar.mat_motion_blur_enabled" "1"}}
+
# Once you have located this, change the lines of the one that match, so that looks like the following:
 +
<pre>
 +
"VendorID" "0x[Vendor ID from step 5]"
 +
"MinDeviceID" "0x[Device ID from step 5]"
 +
"MaxDeviceID" "0x[Device ID from step 5]"
 +
"setting.dxlevel" "99"
 +
"ConVar.mat_antialias" "8"
 +
"ConVar.mat_forceaniso" "8"
 +
"ConVar.mat_picmip" "-10"
 +
"ConVar.mat_motion_blur_enabled" "1"
 +
</pre>
 
# Only if your card is an AMD Radeon HD5000 series or above, you may enable "Super-Sample AA" under "3D" in the drop down menu in Catalyst Control Center to further increase image quality when used with the above settings. It is advised to revert "Super-Sample AA" back to "Multi-Sample AA" when you are done using the Viewer, as performance in games will be reduced significantly.
 
# Only if your card is an AMD Radeon HD5000 series or above, you may enable "Super-Sample AA" under "3D" in the drop down menu in Catalyst Control Center to further increase image quality when used with the above settings. It is advised to revert "Super-Sample AA" back to "Multi-Sample AA" when you are done using the Viewer, as performance in games will be reduced significantly.
 +
If none of the methods above works, you may try [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Pre-Configured%20dxsupport.cfg.zip downloading a pre-configured dxsupport.cfg]. Make a backup of your current <code>dxsupport.cfg</code> somewhere, and drop the new one on the same directory as your old one was located.
  
 
== Models ==
 
== Models ==
 
{{c|note}}: Directly viewing some models will ignore the {{code|$colortint_base}} attribute (which provides the texture's normal color tint to the model), forcing the model to appear grey or washed out. This can be worked around by extracting the model's VMT and adding a new attribute {{code|$color2}} with the same value as {{code|$colortint_base}}.
 
{{c|note}}: Directly viewing some models will ignore the {{code|$colortint_base}} attribute (which provides the texture's normal color tint to the model), forcing the model to appear grey or washed out. This can be worked around by extracting the model's VMT and adding a new attribute {{code|$color2}} with the same value as {{code|$colortint_base}}.
 +
 
{{c|note}}: To load models, use the {{code|(Steam) Load Model...}} option. This allows HLMV to access the game's VPK files. Using the other {{code|Load Model...}} option allows you to load models that are located outside of the game's directory, however.
 
{{c|note}}: To load models, use the {{code|(Steam) Load Model...}} option. This allows HLMV to access the game's VPK files. Using the other {{code|Load Model...}} option allows you to load models that are located outside of the game's directory, however.
  
 
=== Model locations ===
 
=== Model locations ===
Most models have standard names but others have vague or confusing names. All model file paths can be found by searching "{{code|items_game.txt}}" ({{code|\Steam\steamapps\common\Team Fortress 2\tf\scripts\items\items_game.txt}}) for the item's entry and checking the value of "{{code|model_player}}".
+
Most models have standard names but others have vague or confusing names. All item model file paths can be found by searching "{{code|items_game.txt}}" ({{code|\Steam\steamapps\common\Team Fortress 2\tf\scripts\items\items_game.txt}}) for the item's entry and checking the value of "{{code|model_player}}".
  
{{c|note}}: You may get issues with HLMV saying it can't find a directory. To fix this, navigate to {{code|\Steam\steamapps\common\Team Fortress 2\tf\}} and create the folders that are needed to get to the model you are attempting to get to. Alternatively, you can [http://www.mediafire.com/download/mh2bqvbdc67hm46/Steam_Load_model.zip download and extract this pack], and copy the contents to {{code|\Steam\steamapps\common\Team Fortress 2\tf\}}. This will add all the folders to load weapons, cosmetic items and player models correctly, without having any errors.
+
{{c|note}}: You may get issues with HLMV saying it can't find a directory. To fix this, navigate to {{code|\Steam\steamapps\common\Team Fortress 2\tf\}} and create the folders that are needed to get to the model you are attempting to get to. Alternatively, you can [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Missing%20Folders%20Fix.zip download and extract this pack], and copy the contents to {{code|\Steam\steamapps\common\Team Fortress 2\tf\custom\}}. This will add all the folders to load weapons, cosmetic items and player models correctly, without having any errors.
  
 
; Weapons
 
; Weapons
Line 77: Line 95:
 
* {{code|c_models}} &ndash; holds models for most newer weapons.
 
* {{code|c_models}} &ndash; holds models for most newer weapons.
  
{{c|note}}: There are some discrepancies regarding c_, v_ and w_ models. Previously, all weapons had a world model and a view model that were kept separately. Most newer unlockable weapons, and a number of stock weapons use a single model file (c_model), which is used for both the player's viewpoint and for what other players see you holding. Any weapons that have switched over to the c_model format have mostly had their w_models and v_models versions removed.<br>
+
{{c|note}}: There are some discrepancies regarding c_, v_ and w_ models. Previously, all weapons had a world model and a view model that were kept separately. Most newer unlockable weapons, and a number of stock weapons use a single model file (c_model), which is used for both the player's viewpoint and for what other players see you holding. The [[Kukri]] and [[Flame Thrower]] had their view model and world model files removed when the change to c_models occurred.<br>
 
{{c|note}}: Some weapons, such as the 2011 [[Festive weapons]] and the [[Botkiller weapons]] have parts of the models located in inconsistent places. For example, the older Festive weapons have the attached lights in {{code|\models\player\items}}, and the Botkiller weapons have the attached heads in the {{code|\models\player\items\mvm_loot}}.
 
{{c|note}}: Some weapons, such as the 2011 [[Festive weapons]] and the [[Botkiller weapons]] have parts of the models located in inconsistent places. For example, the older Festive weapons have the attached lights in {{code|\models\player\items}}, and the Botkiller weapons have the attached heads in the {{code|\models\player\items\mvm_loot}}.
  
; [[Hats]] and [[Miscellaneous items]]
+
; [[Cosmetic items]]
: Most of models of any Hats and Miscellaneous items that were added before the [[Robotic Boogaloo]] update are located in {{code|\models\player\items}}. Any Hats and Miscellaneous items that were added in or after that update are located in {{code|\models\workshop\player\items}}.
+
: Most of models of any cosmetic items that were added before the [[Robotic Boogaloo]] update are located in {{code|\models\player\items}}. Any cosmetic items that were added in or after that update are located in {{code|\models\workshop\player\items}}.
  
 
; Tools
 
; Tools
Line 87: Line 105:
  
 
; Player models
 
; Player models
: Player models are stored in the directory of {{code|\models\player}}. There are HWM models (or '''''h'''ard'''w'''are '''m'''orphs'') stored in {{code|\models\player\hwm}}. These models are higher-poly versions of the standard models and were used in the creation of the ''[[Meet the Team]]'' series. For more information about them, see [http://forums.steampowered.com/forums/showpost.php?p=8227518 this thread] on the [[Steam Users' Forums]].
+
: Player models are stored in the directory of {{code|\models\player}}. There are HWM models (or '''''h'''ard'''w'''are '''m'''orphs'') stored in {{code|\models\player\hwm}}. These models are higher-poly versions of the standard models and were used in the creation of the ''[[Meet the Team]]'' series. For more information about them, see the [[Steam Users' Forums]].
 +
 
 +
== Model + Lighting Controls ==
 +
Holding the following keys and moving the mouse will allow you to move the model or lighting in the screen.
 +
 
 +
{| class="wikitable grid" style="text-align: left"
 +
! class="header" | Action
 +
! class="header" | Key/Button
 +
! class="header" | More Information
 +
|-
 +
| Rotate model
 +
| {{Key|LMB}} in centre of the screen.
 +
| Rotate the current model in all directions.
 +
|-
 +
| Turn Model
 +
| {{Key|LMB}} at edges of the screen.
 +
| Turns the current model around from the viewing angle.
 +
|-
 +
| Pan Model
 +
| {{Key|Left Shift}}+{{Key|LMB}} anywhere.
 +
| Pans the model around the screen.
 +
|-
 +
| Zoom Model
 +
| {{Key|RMB}}
 +
| Zooms the current model in and out.
 +
|-
 +
| Rotate Lighting
 +
| {{Key|Left Ctrl}}+{{Key|LMB}} anywhere.
 +
| Rotates the light source around the model.
 +
|}
 +
 
 +
The rotate lighting control should be used with caution. It's okay to slightly adjust the lighting to add more "depth" to an image, but do not rotate it too drastically or the image will look way too dark in comparison to other images uploaded to the Wiki. It's also recommended to use it to adjust Pyro's lenses, as it tends to appear completely white in certain angles.
  
 
== Registry ==
 
== Registry ==
HLMV stores model positionings and settings inside the {{w|Windows Registry|registry}} in separate keys. You can open the registry editor by going to Start > Run and typing in "{{code|regedit.exe}}". HLMV's directory is "{{code|HKEY_CURRENT_USER\Software\Valve\hlmv}}".
+
HLMV stores model positionings and settings inside the [[w:Windows Registry|registry]] in separate keys. You can open the registry editor by going to Start > Run and typing in "{{code|regedit.exe}}". HLMV's directory is "{{code|HKEY_CURRENT_USER\Software\Valve\hlmv}}".
  
 
:{{c|note}}: Changes made to values in the registry editor will be overwritten if the model is open while the changes are made. You will need to either close HLMV or load a different model while editing values. The values can also be updated while viewing by refreshing the registry editor ('View' > 'Refresh' or 'F5').
 
:{{c|note}}: Changes made to values in the registry editor will be overwritten if the model is open while the changes are made. You will need to either close HLMV or load a different model while editing values. The values can also be updated while viewing by refreshing the registry editor ('View' > 'Refresh' or 'F5').
Line 162: Line 211:
 
| Model's rotation in the world view
 
| Model's rotation in the world view
 
| (X Y Z)
 
| (X Y Z)
| Model dependant
+
| Model dependent
 
|-
 
|-
 
| sequence
 
| sequence
 
| Animation sequence
 
| Animation sequence
 
|  
 
|  
| Model dependant (most commonly {{code|idle}} or {{code|ref}})
+
| Model dependent (most commonly {{code|idle}} or {{code|ref}})
 
|-
 
|-
 
| showbackground
 
| showbackground
Line 210: Line 259:
 
|-
 
|-
 
| Trans
 
| Trans
| {{w|Translation (geometry)|Translation}} of the model
+
| [[w:Translation (geometry)|Translation]] of the model
 
| (X Y Z)
 
| (X Y Z)
| Model dependant
+
| Model dependent
 
|-
 
|-
 
| viewermode
 
| viewermode
Line 222: Line 271:
  
 
== Program limitations ==
 
== Program limitations ==
 +
[[Image:HLMV_ProgramLimitations_FireTexture.png|thumb|150px|right|A preview of the fire textures being shown (top), and no fire textures when using the texture replacement (bottom).]]
 +
[[Image:HLMV_ProgramLimitations_CubeMaps.png|thumb|150px|right|The default HLMV cubemaps (left), and the modified and much more cleaner cubemaps (right).]]
 +
[[Image:HLMV_ProgramLimitations_hlp_forearm.png|thumb|150px|right|A screenshot with an affected model by the issue (left), a screenshot with the {{code|hlp_forearm}} fix applied (right).]]
 +
[[Image:HLMV_ProgramLimitations_GrayCornea.png|thumb|150px|right|Screenshots taken on HLMV while using an ATI Graphics Card (top), a NVIDIA Graphics Card (middle), and with the gray cornea texture fix applied while on a NVIDIA Graphics Card (bottom).]]
  
 
; Fire texture
 
; Fire texture
 
: HLMV applies a fire overlay material to most models. Although not noticeable under most circumstances, it can become particularly apparent when working with models that have dark or black textures.  
 
: HLMV applies a fire overlay material to most models. Although not noticeable under most circumstances, it can become particularly apparent when working with models that have dark or black textures.  
 
: There are two methods to remove this effect:
 
: There are two methods to remove this effect:
:# The more preferred option is to [http://www.mediafire.com/download/2i3das2jx2v5fd6/BlackFirePlusBlackBackground.zip download and extract this texture replacement], and copy the contents to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>. This will replace the default file texture with a 512x512 black material, effectively nullifying the effect for all models.
+
:# The more preferred option is to [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Fire%20Overlay%20Fix.vpk download this texture replacement], and copy the contents to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>. This will replace the default file texture with a 512x512 black material, effectively nullifying the effect for all models.
:# Alternatively, setting {{code|$detailblendfactor}} to {{code|.00}} in the VMT file(s) for the model will achieve to the same end; however, this setting must be enabled manually per model.
+
:# Alternatively, setting {{code|$detailblendfactor}} to {{code|.00}} in the VMT file(s) for the model will achieve to the same end; however, this setting must be enabled manually per model.
 +
 
 +
; Skybox texture
 +
: HLMV's default skybox texture looks nice, however, replacing this texture to black texture will make creating images much easier by using the Ctrl+B hotkey.
 +
: To rectify this, [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Skybox%20Background%20-%20Black.vpk download this texture replacement], and copy the contents to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>. This will replace the skybox texture with a black color.
 +
: Alternatively, if you prefer to replace the skybox texture with a white background instead, [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Skybox%20Background%20-%20White.vpk download this texture replacement].
  
 
; [[vdc:Cubemaps|Cubemaps]]
 
; [[vdc:Cubemaps|Cubemaps]]
 
: HLMV handles reflective surfaces by using a texture to fake reflections. The default texture is that of a sunrise -- nice, but not quite clean enough for good, readable photos.
 
: HLMV handles reflective surfaces by using a texture to fake reflections. The default texture is that of a sunrise -- nice, but not quite clean enough for good, readable photos.
: To rectify this, [nope.html download and extract this texture replacement], and copy the contents to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>. This will replace the reflection with a morose grey, making for more readable photos.
+
: To rectify this, [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Cubemap%20Fix.vpk download this texture replacement], and copy the contents to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>. This will replace the reflection with a morose grey, making for more readable photos.
 +
 
 +
; {{code|hlp_forearm_L}} and {{code|hlp_forearm_R}}
 +
: Some cosmetic items contains bones that attaches to non-functional bones in HLMV, cosmetics that contains the bones {{code|hlp_forearm_L}} and {{code|hlp_forearm_R}} often causes problems in rendering when attaching to a class model, usually causing the cosmetic to pass through the class, or stretching on the ground.
 +
: To fix that, a simple modification was made on the models for Scout, Demoman and Heavy, to remove these problematic bones. These were fixed for both normal and {{code|hwm}} models. The fix can be [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Dummied%20Out%20hlp_bones.vpk downloaded here]. To install it, simply copy the {{code|.vpk}} to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>.
 +
 
 +
; Gray cornea (issue with NVIDIA graphics cards mostly)
 +
: For some users, mostly those with NVIDIA graphics cards, HLMV may have problems rendering the texture for the cornea of each of the classes eyes, causing it to appear with a gray tone instead. Currently it's unknown what causes this issue, but it's possible to fix it by downloading a modification for the {{code|eye_lightwarp}} texture.
 +
: To fix that, [https://github.com/gabrielwoj/hlmv-resources/raw/main/VPKs%20-%20ZIPs%20-Releases/HLMV%20-%20Gray%20Cornea%20Texture%20Fix.vpk download this texture replacement], and copy the contents to <code>\Steam\steamapps\common\Team Fortress 2\tf\custom\</code>. This will make the <code>lightwrap</code> texture brighter, fixing the issue with the gray cornea for those using a NVIDIA graphics card.<br>
 +
: '''Note:''' This will not fix issues with other items with the same issue, such as the [[Lord Cockswain's Novelty Mutton Chops and Pipe]] appearing completely black, and the [[Quick-Fix]] missing its transparent visor. The fix only applies to the classes' gray cornea issue.
 +
 
 +
; Blurriness
 +
: For users with two or more monitors, it's advised to have the higher resolution monitor as the primary one. Due to an issue with HLMV, if the lower resolution monitor is set as the primary one, and if the user works on HLMV on the secondary monitor (that has the higher resolution), HLMV will have problems rendering the model, causing blurriness. The blurriness might be worse depending how low the resolution is set to the main display compared to the higher resolution set as the secondary display.
 +
: To change which monitor is the primary one, go to your Desktop, and right-click on your wallpaper, and click "Display settings". From there, click on the monitor that has the bigger rectangle (higher resolution), and check "Make this my main display".
 +
{|style="margin: left;"
 +
| [[File:HLMV ProgramLimitations Blurriness.gif|thumb|500px|An example showing the difference between a [https://wiki.teamfortress.com/w/images/archive/8/84/20220101220204%21Taunt_Shooter%27s_Stakeout.png blurry image] and a [https://wiki.teamfortress.com/w/images/8/84/Taunt_Shooter%27s_Stakeout.png properly looking image] by using the highest resolution monitor as the main one. The animation has been zoomed in for clarity.]]
 +
|}
  
 
== See also ==
 
== See also ==
Line 240: Line 314:
  
 
=== Tools ===
 
=== Tools ===
* [http://nemesis.thewavelength.net/index.php?p=26 GCFScape] &ndash; tool to extract files out of the game's VPK files
+
* [https://valvedev.info/tools/gcfscape/ GCFScape] &ndash; a tool to extract files out of the game's .VPK files.
* [http://cl.ly/301E1Y1J1y3h030H3r3p HLMV Positioner 1.2] by [[User:Netshroud|Netshroud]] (needs steamuser to be set in Presets.ini)
+
* [https://valvedev.info/tools/vtfedit/ VTFEdit] &ndash; a tool to edit .VTF and .VMT files.
 
* {{vdc|Category:Third Party Tools}}
 
* {{vdc|Category:Third Party Tools}}
  
 
=== Resources ===
 
=== Resources ===
 
* [[User:Mr._Magoolachub/HLMV_Stuff|Mr. Magoolachub's HLMV stuff]]
 
* [[User:Mr._Magoolachub/HLMV_Stuff|Mr. Magoolachub's HLMV stuff]]
* [[User:Gabrielwoj/HLMVFolders|HLMV Folder Fix changelog]]
 
 
* {{vdc|SDK Installation}}
 
* {{vdc|SDK Installation}}

Latest revision as of 13:39, 3 February 2023

The Half-Life Model Viewer (HLMV) is a program used to view and manipulate Source engine models.

Setup

As of the update integrating SteamPipe into Team Fortress 2, HLMV is included with the TF2 installation. However, the VPROJECT environment variable must be set to Steam\steamapps\common\Team Fortress 2\tf in order for HLMV to function properly for TF2. There are three ways to do this, only one of which is necessary:

  • Set the "VPROJECT" environment variable using your operating system's standard procedures
  • Replace Steam\steamapps\common\Team Fortress 2\bin\check_sdk_env.bat with the following (this option will set VPROJECT properly for all of the other TF2 SDK tools, e.g. FacePoser, as well):
@echo off
PUSHD .
CD "%~d0%~p0..\tf"
SET TEMPPROJ=%CD%
POPD
if "%VPROJECT%" NEQ "%TEMPPROJ%" (
	if exist "%~d0%~p0set_sdk_env.bat" (
		call "%~d0%~p0set_sdk_env.bat"
	) else (
		echo WARNING: VPROJECT not set, and set_sdk_env.bat file not present.
		pause
	)
) else (
	echo VPROJECT="%VPROJECT%"
)
  • Replace Steam\steamapps\common\Team Fortress 2\bin\HLMV.bat with the following:
@echo off
:: Batch file to launch Half-Life model viewer with proper environment

:: Launch HLMV
echo Starting HLMV...
echo Executing "%~d0%~p0hlmv.exe" %*
start "" "%~d0%~p0hlmv.exe" -vproject ../tf %*

After performing one of these three options, navigate to Steam\steamapps\common\Team Fortress 2\bin, and run HLMV.bat. This should automatically open hlmv.exe.

A number of options and settings need to be tweaked in order to achieve best performance from the Model Viewer. The program has no GUI-based video settings like the game, so several other steps need to be taken.

Graphics card settings

For ATi/AMD cards, under '3D' in Catalyst Control Center's drop down menu, uncheck "Use Application Settings" in the "AA" section and move the slider to 8x.

For NVIDIA cards, open the "NVIDIA Control Panel" and navigate to "Manage 3D settings" or similar. Add a program-specific setting for hlmv.exe. The location of this file is: Steam\steamapps\common\Team Fortress 2\bin\hlmv.exe

Ensure that the following settings are enabled:

  • Anti-aliasing set to "override" and on highest setting possible
  • Texture filtering quality on highest setting possible

dxsupport.cfg

The Model Viewer also pulls settings from the config file 'dxsupport.cfg'. If the graphics card settings above do not work, then this method should still force the Viewer to output with high settings.

  1. Navigate to this directory: \Steam\steamapps\common\Team Fortress 2\bin\
  2. Open up dxsupport.cfg in a text editor of your choice. If you do not have this file, create it with the content from here.
  3. Find your graphics card within that file.
  4. Add or modify the following lines in dxsupport.cfg within the section for your graphics card and save it, the Viewer should now be using high settings.
"setting.dxlevel" "99"
"ConVar.mat_antialias" "8"
"ConVar.mat_forceaniso" "8"
"ConVar.mat_picmip" "-10"
  1. If your card isn't listed, go to Control Panel, open Device Manager, find your graphics card under Display adapters section, open Details tab of its Properties and select Hardware Ids. The IDs are 4-character hexadecimal numbers. The Vendor ID is located after VEN_, and the Device ID is located after DEV_.
  2. Navigate to the bottom of the file, and find the Unknown sections. Choose the one that refers to your graphics card, which will be ATI Unknown if you're using an ATI/AMD graphics card, NVidia Unknown if using an Nvidia graphics card, or Intel Unknown if using an Intel graphics card.
  3. Once you have located this, change the lines of the one that match, so that looks like the following:
"VendorID" "0x[Vendor ID from step 5]"
"MinDeviceID" "0x[Device ID from step 5]"
"MaxDeviceID" "0x[Device ID from step 5]"
"setting.dxlevel" "99"
"ConVar.mat_antialias" "8"
"ConVar.mat_forceaniso" "8"
"ConVar.mat_picmip" "-10"
"ConVar.mat_motion_blur_enabled" "1"
  1. Only if your card is an AMD Radeon HD5000 series or above, you may enable "Super-Sample AA" under "3D" in the drop down menu in Catalyst Control Center to further increase image quality when used with the above settings. It is advised to revert "Super-Sample AA" back to "Multi-Sample AA" when you are done using the Viewer, as performance in games will be reduced significantly.

If none of the methods above works, you may try downloading a pre-configured dxsupport.cfg. Make a backup of your current dxsupport.cfg somewhere, and drop the new one on the same directory as your old one was located.

Models

Pictogram comment.png Note: Directly viewing some models will ignore the $colortint_base attribute (which provides the texture's normal color tint to the model), forcing the model to appear grey or washed out. This can be worked around by extracting the model's VMT and adding a new attribute $color2 with the same value as $colortint_base.

Pictogram comment.png Note: To load models, use the (Steam) Load Model... option. This allows HLMV to access the game's VPK files. Using the other Load Model... option allows you to load models that are located outside of the game's directory, however.

Model locations

Most models have standard names but others have vague or confusing names. All item model file paths can be found by searching "items_game.txt" (\Steam\steamapps\common\Team Fortress 2\tf\scripts\items\items_game.txt) for the item's entry and checking the value of "model_player".

Pictogram comment.png Note: You may get issues with HLMV saying it can't find a directory. To fix this, navigate to \Steam\steamapps\common\Team Fortress 2\tf\ and create the folders that are needed to get to the model you are attempting to get to. Alternatively, you can download and extract this pack, and copy the contents to \Steam\steamapps\common\Team Fortress 2\tf\custom\. This will add all the folders to load weapons, cosmetic items and player models correctly, without having any errors.

Weapons
The locations for weapon models are as follows:
  • w_models – holds world models for some of the Stock weapons.
  • v_models – holds view models for some of the Stock weapons.
  • c_models – holds models for most newer weapons.

Pictogram comment.png Note: There are some discrepancies regarding c_, v_ and w_ models. Previously, all weapons had a world model and a view model that were kept separately. Most newer unlockable weapons, and a number of stock weapons use a single model file (c_model), which is used for both the player's viewpoint and for what other players see you holding. The Kukri and Flame Thrower had their view model and world model files removed when the change to c_models occurred.
Pictogram comment.png Note: Some weapons, such as the 2011 Festive weapons and the Botkiller weapons have parts of the models located in inconsistent places. For example, the older Festive weapons have the attached lights in \models\player\items, and the Botkiller weapons have the attached heads in the \models\player\items\mvm_loot.

Cosmetic items
Most of models of any cosmetic items that were added before the Robotic Boogaloo update are located in \models\player\items. Any cosmetic items that were added in or after that update are located in \models\workshop\player\items.
Tools
The Crate, Paint Can, and Name Tag models are not present in the game files. Efforts to reproduce them in a model form are ongoing.
Player models
Player models are stored in the directory of \models\player. There are HWM models (or hardware morphs) stored in \models\player\hwm. These models are higher-poly versions of the standard models and were used in the creation of the Meet the Team series. For more information about them, see the Steam Users' Forums.

Model + Lighting Controls

Holding the following keys and moving the mouse will allow you to move the model or lighting in the screen.

Action Key/Button More Information
Rotate model LMB in centre of the screen. Rotate the current model in all directions.
Turn Model LMB at edges of the screen. Turns the current model around from the viewing angle.
Pan Model Left Shift+LMB anywhere. Pans the model around the screen.
Zoom Model RMB Zooms the current model in and out.
Rotate Lighting Left Ctrl+LMB anywhere. Rotates the light source around the model.

The rotate lighting control should be used with caution. It's okay to slightly adjust the lighting to add more "depth" to an image, but do not rotate it too drastically or the image will look way too dark in comparison to other images uploaded to the Wiki. It's also recommended to use it to adjust Pyro's lenses, as it tends to appear completely white in certain angles.

Registry

HLMV stores model positionings and settings inside the registry in separate keys. You can open the registry editor by going to Start > Run and typing in "regedit.exe". HLMV's directory is "HKEY_CURRENT_USER\Software\Valve\hlmv".

Pictogram comment.png Note: Changes made to values in the registry editor will be overwritten if the model is open while the changes are made. You will need to either close HLMV or load a different model while editing values. The values can also be updated while viewing by refreshing the registry editor ('View' > 'Refresh' or 'F5').

Key values

Inside each key are several values, and their uses are listed below:

Value Description Type Default
aColor Ambient color (0.3 0.3 0.3 0) #4C4C4C
bgColor Background color (0.25 0.25 0.25 0) #3F3F3F
cclanguageid Integer 0
enablenormalmapping Normal map Integer 0
gColor Ground color (0.85 0.85 0.69 0) #D8D8AF
lColor Light color (1 1 1 0) (white)
lightrot Positioning of the light source (X Y Z) (0 180 0)
merge0 – merge3 Attached models ("weapons" in HLMV)
overlaySequence0 – overlaySequence3 ?
overlayWeight0 – overlayWeight3 ?
playsounds Toggle sounds being played Integer 1
Rot Model's rotation in the world view (X Y Z) Model dependent
sequence Animation sequence Model dependent (most commonly idle or ref)
showbackground Integer 1
showground Integer 1
showillumpos Integer 1
showshadow Integer 1
speechapiindex Integer 1
speedscale 1
thumbnailsize Integer 128
thumbnailsizeanim Integer 128
Trans Translation of the model (X Y Z) Model dependent
viewermode Integer 0

Program limitations

A preview of the fire textures being shown (top), and no fire textures when using the texture replacement (bottom).
The default HLMV cubemaps (left), and the modified and much more cleaner cubemaps (right).
A screenshot with an affected model by the issue (left), a screenshot with the hlp_forearm fix applied (right).
Screenshots taken on HLMV while using an ATI Graphics Card (top), a NVIDIA Graphics Card (middle), and with the gray cornea texture fix applied while on a NVIDIA Graphics Card (bottom).
Fire texture
HLMV applies a fire overlay material to most models. Although not noticeable under most circumstances, it can become particularly apparent when working with models that have dark or black textures.
There are two methods to remove this effect:
  1. The more preferred option is to download this texture replacement, and copy the contents to \Steam\steamapps\common\Team Fortress 2\tf\custom\. This will replace the default file texture with a 512x512 black material, effectively nullifying the effect for all models.
  2. Alternatively, setting $detailblendfactor to .00 in the VMT file(s) for the model will achieve to the same end; however, this setting must be enabled manually per model.
Skybox texture
HLMV's default skybox texture looks nice, however, replacing this texture to black texture will make creating images much easier by using the Ctrl+B hotkey.
To rectify this, download this texture replacement, and copy the contents to \Steam\steamapps\common\Team Fortress 2\tf\custom\. This will replace the skybox texture with a black color.
Alternatively, if you prefer to replace the skybox texture with a white background instead, download this texture replacement.
Cubemaps
HLMV handles reflective surfaces by using a texture to fake reflections. The default texture is that of a sunrise -- nice, but not quite clean enough for good, readable photos.
To rectify this, download this texture replacement, and copy the contents to \Steam\steamapps\common\Team Fortress 2\tf\custom\. This will replace the reflection with a morose grey, making for more readable photos.
hlp_forearm_L and hlp_forearm_R
Some cosmetic items contains bones that attaches to non-functional bones in HLMV, cosmetics that contains the bones hlp_forearm_L and hlp_forearm_R often causes problems in rendering when attaching to a class model, usually causing the cosmetic to pass through the class, or stretching on the ground.
To fix that, a simple modification was made on the models for Scout, Demoman and Heavy, to remove these problematic bones. These were fixed for both normal and hwm models. The fix can be downloaded here. To install it, simply copy the .vpk to \Steam\steamapps\common\Team Fortress 2\tf\custom\.
Gray cornea (issue with NVIDIA graphics cards mostly)
For some users, mostly those with NVIDIA graphics cards, HLMV may have problems rendering the texture for the cornea of each of the classes eyes, causing it to appear with a gray tone instead. Currently it's unknown what causes this issue, but it's possible to fix it by downloading a modification for the eye_lightwarp texture.
To fix that, download this texture replacement, and copy the contents to \Steam\steamapps\common\Team Fortress 2\tf\custom\. This will make the lightwrap texture brighter, fixing the issue with the gray cornea for those using a NVIDIA graphics card.
Note: This will not fix issues with other items with the same issue, such as the Lord Cockswain's Novelty Mutton Chops and Pipe appearing completely black, and the Quick-Fix missing its transparent visor. The fix only applies to the classes' gray cornea issue.
Blurriness
For users with two or more monitors, it's advised to have the higher resolution monitor as the primary one. Due to an issue with HLMV, if the lower resolution monitor is set as the primary one, and if the user works on HLMV on the secondary monitor (that has the higher resolution), HLMV will have problems rendering the model, causing blurriness. The blurriness might be worse depending how low the resolution is set to the main display compared to the higher resolution set as the secondary display.
To change which monitor is the primary one, go to your Desktop, and right-click on your wallpaper, and click "Display settings". From there, click on the monitor that has the bigger rectangle (higher resolution), and check "Make this my main display".
An example showing the difference between a blurry image and a properly looking image by using the highest resolution monitor as the main one. The animation has been zoomed in for clarity.

See also

External links

Tools

Resources