SFM/Materials override: Difference between revisions
(Created page with "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...") |
No edit summary |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{update}} | |||
{{stub}} | |||
{{LanguageBar|SFM|Materials override}} | |||
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. | 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: | |||
{{todo|year=2023|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: | |||
{{def|code=1|[[$basetexture|$basetexture]]|type=[[String|String]]}} VTF path for texture replacement | |||
{{def|code=1|[[$phong|$phong]]|type=[[Float|Float]]}} brightness of phong effect | |||
{{def|code=1|[[$color|$color]]|type=[[RGB|RGB]] [[Material_vector|Material Vector]]}} changes color of the material. | |||
{{def|code=1|[[$detail#Parameters_and_Effects|$detailblendfactor]]|type=[[Normal|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. | |||
{{todo|year=2023|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.}} | |||
{{todo|year=2023|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: | List of attributes that cannot be overridden (or added) in SFM: | ||
{{todo|year=2023|Add a list of attributes that can't be overridden, added or changed by a material override in the Element Viewer.}} | |||
{{todo|year=2023|Maybe add a section here about how to add material overrides using a .json script, or link here to the relevant page?}} |
Latest revision as of 10:00, 24 August 2024

Remember to check for any notes left by the tagger at this article's talk page.
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:
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.
List of attributes that cannot be overridden (or added) in SFM: