ReferenceScript nodesRendering
Set Material Value
Sets a Shader layer's own uniform, or a layer's material's own value, by name.
ƒSet Material ValueTarget is Layer
LayerLayer
Namespeed
Value1
OFShader uniform
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
in | what happens next | – | – |
Layerlayer | layer | – | – |
Namename | text | "speed" | – |
Valuevalue | any | 1 | – |
OFof | choice | Shader uniform | One of: Shader uniform, Material. |
Outputs
| Pin | Type |
|---|---|
then | what happens next |
The code it becomes
The graph below written as a script would write it.
// On Scene Start(function (l) { if (Math.round(0) === 1) l.material("speed", 1); else l.uniform("speed", 1); })(scene.layer(""));In a graph
◆On Scene Start
ƒSet Material ValueTarget is Layer
LayerLayer
Namespeed
Value1
OFShader uniform
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.