SFM/Materials override

From Valve Developer Community
< SFM
Jump to: navigation, search
Icon-broom.png
This article or section needs to be updated to include current information regarding the subject.
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 adding to it.

English (en)中文 (zh)
... Icon-Important.png

To add materials override you need to right click on animation set and select "Add override materials". This will allow you to see "materials" folder if you open this model in Element Viewer. There you will be able to open any material and add some custom attributes that will override corresponding parameter in this model VMT file.

Once your animation set has override materials enabled, you can right-click on any material in the Element Viewer under "gameModel > materials", highlighted in green, and choose "Add Attribute", then select the type of custom attribute you wish to add. A small window will show up, allowing you to define the name of the attribute, which must be the name of a material command (as you would see in a VMT material file). Then click "OK" to create the custom attribute. You can now set whatever value or string you want for the attribute, depending on the type of attribute you have chosen.

Types of attributes that can be overridden (or added) in SFM:

Blank image.pngTodo: Detail the types of attributes you can add in the Element Viewer, so that readers can understand what each type of attribute does.

List of attributes that can be overridden (or added) in SFM:

$basetexture<String>
VTF path for texture replacement
$phong<Float>
brightness of phong effect
$color<RGB Material Vector>
changes color of the material.
$detailblendfactor<Normal>
Controls the amount that the detail texture affects the base texture. A value of 0 usually makes the detail texture have no effect, whilst a value of 1 applies the full effect.
Blank image.pngTodo: Add more attributes to this list, there are a whole lot more than just four possible attributes that can be added via the Element Viewer.
Blank image.pngTodo: For each attribute listed here, add the type(s) of attribute that the user needs to (and can) define first.

List of attributes that cannot be overridden (or added) in SFM:

Blank image.pngTodo: Add a list of attributes that can't be overridden, added or changed by a material override in the Element Viewer.
Blank image.pngTodo: Maybe add a section here about how to add material overrides using a .json script, or link here to the relevant page?