Consolse commands for modellers

Trp. Jed
03-06-2007, 08:49 AM
Thought some of you might find these useful for testing models and checking performance issues with big textures, etc. Most of them require sv_cheats on to work.

The texture memory display might be good for comparing just how much memory those lovely 2048x2048 diffuse+bump+phong textures take up and the model stats overlay for checking how long your models take to draw, etc.

Shader Control
These control parts of the material shader system. Mostly they allow you to turn on/off different features in the engine.

mat_bumpmap 0/1 - Turns off/on bump mapping (normal maps).
mat_fastnobump 0/1 - Turns off/on bump mapping (normal maps) quickly without reloading materials.
mat_diffuse 0/1 - Turns off/on diffuse textures (kinda pointless to use!).
mat_drawwater 0/1 - Turns off/on water.
mat_fullbright 0/1 - Turns off/on fullbright lighting.
mat_hsv 0/1 - Turns off/on Huse, Saturation, Value colour space (in mose cases, makes B&W).
mat_specular 0/1 - Turns off/on specular mapping (reflective surfaces like glass).
mat_fastspecular 0/1 - Turns off/on specular mapping quickly but wont reload materials.
mat_mipmaptextures 0/1 - Turns off/on mip map textures.
r_phong 0/1 - Turns off/on phong lighting (doesn't work?).

These provide info about the graphics system and graphics hardware.

mat_configcurrent - Dumps the current graphics config to the console.
mat_info - Dumps the current spec, properties and support of the graphic hardware.

mat_fillrate 0/1 - Shows density of fillrate for pixels (of limited use, pretty cool though!)
mat_luxels 0/1 - Shows density lightmap grid
mat_showhistogram 0/1 - Show histogram of colour distribution in the frame.
mat_show_texture_memory_usage 0/1 - Show current memory useage in kilobytes for the current frame.

These related mostly to textures and materials. Useful if you edit a texture and need to reload it without re-starting the game.

mat_picmip 0...4 - Sets the quality of textures by using lower mipmap levels instead of the larger. Doesn't give much of a FPS increase but doesn't reduce texture memory useage.

mat_crosshair - Shows the name of the texture currently under the crosshair.
mat_show_ab_hdr 0/1 - Turns off/on splitscreen display of Non-HDR/HDR comparison.
mat_reloadallmaterials - Reloads all the materials. (VMT)
mat_reloadmaterial <mat> - Reload material(s) with <material> in its name. (VMT)
mat_reloadtextures - Reloads all textures. (VTF)

mat_texturelimit - Sets the limit in kilobytes the material system will use per frame. -1 = infinite.
+mat_texture_list - Toggle showing a list of all textures including name, type and memory size (bind to a key)
mat_wireframe 0/1 - Shows a wireframe overlay on map surfaces and shows models as wireframe only.

These are useful for debugging and testing model issues such as performance, types and collision hulls.

r_colorstaticprops 0/1 - Shows static prop models in different colours.
r_drawdetailprops 0/1 - Draw detail prop models.
r_drawothermodels 0/1/2 - Draw non static models. 0 off, 1 on, 2 wireframe.
r_drawmodelstatsoverlay 0/1/2 - Draws and info overlay non-static models you can see. 0 off, 1 on, 2 measured.
r_drawmodelstatsoverlay 0/1/2 - Show info overlay for non-static models you can see. 0 off, 1 on, 2 measured.
r_drawmodelstatsoverlaymin <x> - Minimum time in milliseconds a model needs to take to draw to be displayed when the stats overlay mode is "measured".
r_drawmodelstatsoverlaymax <x> - Maxumum number time in milliseconds a model can take to draw before it is displayed red in stats overlay mode is "measured"
vcollide_wireframe 0/1 - Draws the collision model wireframe for models. Static are blue, physics, red.
vcollide_wireframe_axis 0/1 - Draws the orientation and origin axis for collision models.

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.