Material modify control: Difference between revisions
Jump to navigation
Jump to search
Note:For the linear interpolation to work correctly you need both MaterialModify and MaterialModifyAnimated proxies to be presented.
m (Add internal names of kvs) |
(clarifications) |
||
Line 19: | Line 19: | ||
{{IO|SetMaterialVarToCurrentTime|This sets the material variable to the current time on the server.}} | {{IO|SetMaterialVarToCurrentTime|This sets the material variable to the current time on the server.}} | ||
{{IO|StartAnimSequence|Force an animated material with the MaterialModifyAnimated proxy to play a set of animation frames. <br/> Format is: <code><Frame Start> <Frame End> <Frame Rate> <Loop></code> <br/> <code><Loop></code> should be 1 or 0. {{tip|Setting "Frame End" to -1 uses the last frame of the texture.}}|param=string}} | {{IO|StartAnimSequence|Force an animated material with the MaterialModifyAnimated proxy to play a set of animation frames. <br/> Format is: <code><Frame Start> <Frame End> <Frame Rate> <Loop></code> <br/> <code><Loop></code> should be 1 or 0. {{tip|Setting "Frame End" to -1 uses the last frame of the texture.}}|param=string}} | ||
{{IO|StartFloatLerp|Force a material with the MaterialModifyAnimated proxy to linearly interpolate a material var between two floating point values. <br/> Format is: <code><Start Value> <End Value> <Transition Time> <Loop></code> <br/> <code><Loop></code> should be 1 or 0.|param=string}} | {{IO|StartFloatLerp|Force a material with the MaterialModifyAnimated proxy to linearly interpolate a material var between two floating point values. <br/> Format is: <code><Start Value> <End Value> <Transition Time> <Loop></code> <br/> <code><Loop></code> should be 1 or 0. | ||
{{note|For the linear interpolation to work correctly you need both MaterialModify and MaterialModifyAnimated proxies to be presented.}}|param=string}} | |||
{{I Parentname}} | {{I Parentname}} | ||
{{I Targetname}} | {{I Targetname}} |
Revision as of 00:15, 13 May 2021
Template:Base point It is used to modify arbitrary material properties in response to I/O events.
For the entity to work, its target material must have the MaterialModify
or MaterialModifyAnimated
proxy installed, and must be applied to an entity.
Compare this with the env_texturetoggle entity that can control brushes or overlays by targetname.
Instances of the Material to Modify on world geometry are controlled by the lowest-ID (first created in Hammer) material_modify_control, in addition to instances of the material on the material_modify_control's parent.
Keyvalues
- Material to modify (materialName) <string>
- Path to the VMT file you want to modify, relative to
materials/
folder. Without.vmt
suffix.Bug:Does not work if the VMT is just in
materials/
. Should be in a subfolder, likematerials/effects/
for example. [todo tested in ?]
- Material variable to modify (materialVar) <string>
- Name of the shader parameter you want to modify. Include
$
symbol like how they are written in the VMT
Parentname:
- Parent (parentname) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
- SetMaterialVar <string >
- Sets the chosen material parameter to the specified value.
- SetMaterialVarToCurrentTime
- This sets the material variable to the current time on the server.
- StartAnimSequence <string >
- Force an animated material with the MaterialModifyAnimated proxy to play a set of animation frames.
Format is:<Frame Start> <Frame End> <Frame Rate> <Loop>
<Loop>
should be 1 or 0.Tip:Setting "Frame End" to -1 uses the last frame of the texture.
- StartFloatLerp <string >
- Force a material with the MaterialModifyAnimated proxy to linearly interpolate a material var between two floating point values.
Format is:<Start Value> <End Value> <Transition Time> <Loop>
<Loop>
should be 1 or 0.

Parentname:
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string >
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string >
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.