Source VMT Editor: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 23: Line 23:




Select the type of shader to be used
 
== Selecting Shaders ==
 
go to "shader" from the properties list and click [[File:EditorDotDotDot.jpg]]
 
the Select Shader window will appear
 
[[File:MaterialEditor Shader Select.jpg]]
 
select from the list or type in the name of the shader in the filter box


see [[:Category:List of Shaders|List of Shaders]]
see [[:Category:List of Shaders|List of Shaders]]
Line 37: Line 46:




After your shader type is selected, your list of avalable parameters, for the selected shader, will update.
After your shader type is selected, the list of avalable parameters, for the selected shader, will update.
 
 
== Selecting textures ==
 
go to the $basetexture parameter and click [[File:EditorDotDotDot.jpg]].
 
the select VTF window will appear
 
[[File:MaterialEditor selectvtf.jpg]]
 
select the desired texture to be used in the material
 
 
== Selecting Colors ==
 
go to the $color parameter and click [[File:EditorColor.jpg]]
 
the Select Color window will appear
 
[[File:MaterialEditor selectcolor.jpg]]
 
adjust the settings  to get the desired color


the color box [[File:EditorColor.jpg]] will change to the selected color


Next fill in the data for for the nessesary parameters to achieve the desired result.


see [[:Category:List of Shader Parameters|List of Shader Parameters]] for more details
see [[:Category:List of Shader Parameters|List of Shader Parameters]] for more details
Line 56: Line 87:




{{todo|Finish Tutorial}}
{{todo|Finish Tutorial}}


== Loading a material ==
== Loading a material ==

Revision as of 19:47, 15 January 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.

Stub

This article or section is a stub. You can help by expanding it.

Overview

The Material Editor is an engine tool available in Source 2007 and later. 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.

Todo:  Find out if material editor supports custom shaders?
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.
Warning.pngWarning:you need to use the command: "toolload vmt" in console for Alien SwarmAlien Swarm to load

Interface

MaterialEditor.jpg

The first viewport on the left is the vmt properties that you could set. The lower right viewport is the vmt preview, and bove that is the engine viewport. When you are editing, the vmt properties viewport will identify all of the avalable parameters as well as what type of data that could be inputted.


To Create a new material

click file -> new , then begin editing

see Material for editing information


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 List of Shaders


Ideally, you should pick one of these three.


After your shader type is selected, the list of avalable parameters, for the selected shader, will update.


Selecting textures

go to the $basetexture parameter and click EditorDotDotDot.jpg.

the select VTF window will appear

MaterialEditor selectvtf.jpg

select the desired texture to be used in the material


Selecting Colors

go to the $color parameter and click EditorColor.jpg

the Select Color window will appear

MaterialEditor selectcolor.jpg

adjust the settings to get the desired color

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


see List of Shader Parameters for more details

Data types

Todo: add more information
  • bool "short for boolean" in which 0 = false and 1 = true
  • string "file path" (ex. brick\brickfloor001a.vtf) "name" (ex. VertexLitGeneric)
  • color <color255 + int> (ex. 97 11 255 255)
  • float "floating point" a decimal between 0 and 1 (ex. 0.75)
  • int "short for integer" (ex. 56)
  • matrix "written in binary" ( 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 )


Todo: Finish Tutorial

Loading a material

Icon-Bug.pngBug:Complex material designs can crash the editor when loading  [todo tested in ?]
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..., find the file located in the mod or game directory loaded



Saving a material

Icon-Bug.pngBug:Somtimes settings may not stick, keep a text editor open to copy your settings over  [todo tested in ?]
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 in the mod or game directory loaded


See Also