Talk:Source VMT Editor

From Valve Developer Community
Jump to: navigation, search

In the works of writing up information for the Material Editor--Kwp17pitts 23:41, 1 January 2012 (PST) If anyone has more information or a tutorial regarding this please add

I'll be adding info when I can. Through use of the editor I've noticed that you can actually do things you can't manually editing vmt's, such as defining a 2nd bumpmap scale. I am not sure why manually editing vmts and editing them via the Editor saves the process differently, or rather the actual vmt.--MrFourVideoCards 02:32, 3 January 2012 (PST)


Material Editor Issues in Alien Swarm

Currently the material editor for Alien Swarm is largely bugged and crash prone. Trying to figure out if there is a possible solution to correct this problem.--Kwp17pitts 21:02, 17 January 2012 (PST)


Old Info

Note.pngNote:This information temporarly placed here until the rest of the appropriate pages are made, if you know more about this tool and want to help out let me know--Kwp17pitts 19:09, 27 June 2012 (PDT)


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


Interface

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


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