Source VMT Editor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
{{Note| Make sure that sv_lan is set to 1 in the console located in the lower-left corner (sv_lan 1) if your game is MP based.}}  
{{Note| Make sure that sv_lan is set to 1 in the console located in the lower-left corner (sv_lan 1) if your game is MP based.}}  
   
   
{{Warning|you need to use the command: "toolload vmt" in console for {{as}}[[Alien Swarm]] and {{csgo}}[[Counter-Strike: Global Offensive]] Beta to load ( Optional for {{l4d2}}[[Left 4 Dead 2]] )}}
{{Warning|{{csgo}}[[Counter-Strike: Global Offensive]] Beta is currently missing the required localization files and res files required for the UI}}


'''What is a Material?'''
'''What is a Material?'''
Line 19: Line 16:
A material (or [[VMT]]) is a script that defines how a texture (or [[VTF]]) will render as well as sound properties. Some materials may not even load textures for certain effects depending on the types of shaders used.  
A material (or [[VMT]]) is a script that defines how a texture (or [[VTF]]) will render as well as sound properties. Some materials may not even load textures for certain effects depending on the types of shaders used.  
{{Note|This tool will not edit textures, just only scripts see [[VTFEdit]] for editing textures}}
{{Note|This tool will not edit textures, just only scripts see [[VTFEdit]] for editing textures}}
== Currently Supported Games ==
{{as}}[[Alien Swarm]] ''Unstable''
{{csgo}}[[Counter-Strike: Global Offensive]] ''Missing required localization/res files ,Must use "toolload vmt" console command to launch''
{{dods}}[[Day of Defeat: Source]]
[[Dino D-Day]] ''Must use "toolload vmt" console command to to launch''
[[Garry's Mod]]
{{hl2}}[[Half-Life 2]]
{{hl2}}[[Half-Life 2: Episode 1]]
{{hl2}}[[Half-Life 2: Episode 2]]
{{l4d2}}[[Left 4 Dead 2]] ''Unstable''
[[Nuclear Dawn]]
{{portal}}[[Portal]]
{{tf2}}[[Team Fortress 2]]
{{source}}[[Source 2007]] Mods
{{source}}[[Source 2009]] Mods


== Interface ==
== Interface ==

Revision as of 23:59, 21 May 2012

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Vmt logo.jpg

Overview

The Material Editor is an engine tool available in SourceSource 2007 and later (unavalable in Left 4 DeadLeft 4 Dead). This tool allows you to edit VMT properties while in-game with via a simplified interface that is both user friendly and real time. This heavily simplifies the material editing process as well. Previously users would have to edit the VMT outside of the engine, then go back in-game and reload all materials, or the current vmt. To use it, run your game or mod with -tools -nop4 on the command line and select Material Editor from the Tools menu. This tool is used to edit the material properties with the added advantage of a preview.


Note.pngNote:This editor supports custom shaders, including ones from the Source Shader Editor!
Note.pngNote: Make sure that sv_lan is set to 1 in the console located in the lower-left corner (sv_lan 1) if your game is MP based.


What is a Material?

A material (or VMT) is a script that defines how a texture (or VTF) will render as well as sound properties. Some materials may not even load textures for certain effects depending on the types of shaders used.

Note.pngNote:This tool will not edit textures, just only scripts see VTFEdit for editing textures

Currently Supported Games

Alien SwarmAlien Swarm Unstable

Counter-Strike: Global OffensiveCounter-Strike: Global Offensive Missing required localization/res files ,Must use "toolload vmt" console command to launch

Day of Defeat: SourceDay of Defeat: Source

Dino D-Day Must use "toolload vmt" console command to to launch

Garry's Mod

Half-Life 2Half-Life 2

Half-Life 2Half-Life 2: Episode 1

Half-Life 2Half-Life 2: Episode 2

Left 4 Dead 2Left 4 Dead 2 Unstable

Nuclear Dawn

PortalPortal

Team Fortress 2Team Fortress 2

SourceSource 2007 Mods

SourceSource 2009 Mods



Interface

MaterialEditor.jpg

The top edge of the screen is the main menu. From here you can load and save VMT files, undo and redo actions, and configure your workspace.

  1. Properties is where the material properties are edited. Any user could set the properties to get the desired look or the material to be worked on.
    Tip.pngTip:You can use your scroll wheel to increase or decrease most values. There are three modifier keys to help with this:
    • For increments of 0.1, use Ctrl
    • For increments of 10, use Shift
    • To lock the value to 0-1, use Alt
  2. The engine viewport shows whatever the game is currently rendering. You can flip control to and from the game with F10, and maximise your view with F11.
  3. The preview window shows the current material as it may look like. You can manipulate your view by holding LMB to rotate, RMB to zoom, and MMB to move on the mouse.
    Note.pngNote:Some shaders may not show correctly, so their effect may not be entirely accurate.


Note.pngNote:The file menu is pretty self explanitory
File Edit Material View
MaterialEditor FileMenu.jpg MaterialEditor EditMenu.jpg MaterialEditor MaterialMenu.jpg MaterialEditor ViewMenu.jpg
  • Open...
  • Save
  • Save As...
  • Close
  • Recent
  • Clear Recent
  • Exit
  • Undo

Shortcut keys Ctrl + Z

  • Redo

Shortcut keys Shift + Ctrl + Z

  • Describe Undo History
Confirm:What does this do??
  • Clear Undo History
  • Keyboard

Shortcut keys Shift + Ctrl + Alt + E

See setting key bindings

  • Set Params To Default

Resets the material parameters

  • Properties

Shows the Properties Window If Checked

  • Preview

Shows the Preview Window If Checked

  • Show Flags

Shows the parameter flags If Checked

  • Show Tool Parameters

Shows the tool parameters on the properties window If Checked

  • Default Layout

Resets the layout to the defualt view

To Create a new material

click file -> new , then begin editing

see Material for editing information


Selecting Surface Properties

go to $surfaceprop from the properties list and click EditorDotDotDot.jpg

the Select Surface Property window will appear

Select Surface Property.jpg

select from the list or type in the name of the surface property in the filter box

see Material surface properties for more details

Todo: Explain the tool further

Selecting Shaders

go to "shader" from the properties list and click EditorDotDotDot.jpg

the Select Shader window will appear

MaterialEditor Shader Select.jpg

select from the list or type in the name of the shader in the filter box

see Shaders


Ideally, you should pick one of these three.


After your shader type is selected, the list of avalable parameters will update according to what the shader supports.

Selecting textures

go to one of the fallowing parameters and click EditorDotDotDot.jpg.

Note.pngNote:Not all parameters need to be set
  • $compress used on chairacter models to give wrinkle details for facial expressions (Overlaps the base texture)
Todo: Finish filling out the small descriptions

the select VTF window will appear

MaterialEditor selectvtf.jpg

select the desired texture to be used in the material

Type Indications

  • _normal = bumpmap
  • _ssbump = self shadowing bumpmap
  • _ao = ambient occlusion map

regular texture if none

Todo: Explain the tool further

Selecting Colors

go to one of the fallowing parameters and click EditorColor.jpg

Note.pngNote:Not all parameters need to be set
Todo: Finish filling out the small descriptions

the Select Color window will appear

MaterialEditor selectcolor.jpg

adjust the color swatch, or type in the values to get the desired color

the color box EditorColor.jpg will change to the selected color

Todo: Explain the tool further


Setting Key Bindings

to set key bindings click Edit -> Key Bindings

the Key Bindings Editor window will appear

KeyBindingsEditor.jpg

Todo: Explain the Key Bindings Editor

Shader Parameters

see List of Shader Parameters for more details

Data types

Todo: add more information, Explain Data types
  • bool "short for boolean" in which 0 = false and 1 = true
  • color <color255 + int> (ex. 97 11 255 255)
  • float "floating point" (ex. 5)
  • int "short for integer" (ex. 56)
  • matrix "written in binary" (ex. 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 )
  • string "file path" (ex. brick\brickfloor001a.vtf) "name" (ex. VertexLitGeneric)
  • vector2 "two configureable values" (ex. 23 45)
  • vector3 "three configureable values" (ex. 23 45 37)
  • vector4 "four configureable values" (ex. 23 45 37 89)


Loading a material

Note.pngNote:Complex material designs can and may crash the editor when loading
Warning.pngWarning:Do not load material vmts outside of the loaded mod or game directory, the associated vtf files may not load as a result

click file -> Open..., open the file located only in the mod or game directory currently running



Saving a material

Note.pngNote:Somtimes settings may not stick, this could be due to having invalid configurations
Warning.pngWarning:Do not save material vmts outside of the loaded mod or game directory, the material will not load as a result

click file -> save as..., give the material a name, and save only in the mod or game directory currently running


See Also