italink/unrealclientprotocol/unreal-material-editing
Claude Code and agent skill by italink/unrealclientprotocol
- community
Checking that the SKILL.md file is still in the repository.
Edit UE material node graphs and properties via text (ReadGraph/WriteGraph). Use when the user asks to add, remove, or rewire material expression nodes, or change material properties like ShadingModel or BlendMode.
Install
npx vskill@latest install italink/unrealclientprotocol/unreal-material-editingSKILL.md
Material Editing
Material editing covers both material properties (ShadingModel, BlendMode, etc.) via the [Properties] section, and node graph (expression nodes and connections) via the [Material] section. Both use the same unified API.
Prerequisite: UE editor running with UCP plugin enabled.
API
CDO: /Script/UnrealClientProtocolEditor.Default__NodeCodeEditingLibrary
| Function | Params | Description | |
|---|---|---|---|
Outline | AssetPath | Returns available sections (Properties, Material, Composite:Name) | |
ReadGraph | AssetPath, Section | Returns text. Empty Section = all. "Material" = main graph only. | |
WriteGraph | AssetPath, Section, GraphText | Overwrite section. Auto-recompiles, relayouts, refreshes editor. |
Material Properties
Use the [Properties] section to read/write material-level settings:
Common properties:
| Property | Example Values | |
|---|---|---|
ShadingModel | MSM_DefaultLit, MSM_Unlit, MSM_Subsurface, MSM_ClearCoat | |
BlendMode | BLEND_Opaque, BLEND_Masked, BLEND_Translucent, BLEND_Additive | |
MaterialDomain | MD_Surface, MD_DeferredDecal, MD_LightFunction, MD_PostProcess, MD_UI | |
TwoSided | true, false |
Read with ReadGraph(AssetPath, "Properties"), write with WriteGraph(AssetPath, "Properties", text).
Section Model
| Section | Description | |
|---|---|---|
[Properties] | Material-level properties (ShadingModel, BlendMode, etc.) | |
[Material] | Complete main graph — all non-composite nodes, read/write as one unit | |
[Composite:Name] | Composite subgraph (physically isolated) |
The [Material] section contains the entire main graph. Output pins are expressed as graph output connections: > RGB -> [BaseColor].
Text Format
Note how Time and WorldPosition — source-only nodes with no inputs — both have > -> lines. Without these lines they would be deleted as orphans.
Nodes
N_<id>: node reference ID. Two forms:- Existing nodes:
N_<base62>— a 22-character Base62-encoded GUID (e.g.N_4kVm2xRp8bNw3yLq9dJs). ReadGraph always outputs this form. Preserve these IDs when writing back — they are the node's stable identity. - New nodes:
N_new<int>— temporary ID for nodes you are creating (e.g.N_new0,N_new1). The system assigns a real GUID after WriteGraph. <ClassName>: UMaterialExpression class name (e.g.MaterialExpressionMultiply,MaterialExpressionConstant3Vector){...}: non-default properties, single line
Connections
Connections are declared on the source (output) node only. Each > line under a node declares where that node's output goes. There is no "reverse" declaration — if a node has no > lines, it has no outgoing connections.
CRITICAL — Orphan cleanup: After WriteGraph, any node not reachable from the material output pins is automatically deleted as an orphan. This means:
- Every node must be part of a connected chain that reaches a `[GraphOutput]`. If you create a node but forget to write its
> ->output connections, it will be silently deleted. - Source-only nodes (nodes with no inputs, only outputs — e.g.
Time,ScreenPosition,ViewSize,TexCoord,WorldPosition,CameraPositionWS,VertexColor, constants) are especially prone to this. They must have> ->lines connecting their output to downstream nodes.
Multi-Output Nodes
Some nodes have multiple named outputs. Use the output name before ->:
| Node | Outputs | |
|---|---|---|
MaterialExpressionScreenPosition | ViewportUV (float2, index 0), PixelPosition (float2, index 1) | |
MaterialExpressionTextureSample | RGB, R, G, B, A, RGBA | |
MaterialExpressionWorldPosition | (single output, omit name) | |
MaterialExpressionViewSize | (single output float2, omit name) |
Example — ScreenPosition with named output:
Common Input Pin Names
| Node Type | Input Pins | |
|---|---|---|
Single-input nodes (Sine, Cosine, Tangent, Abs, OneMinus, Frac, Floor, Ceil, Saturate, SquareRoot, Length, Normalize) | Input (can be omitted) | |
ComponentMask | Input (can be omitted) | |
Binary math (Multiply, Add, Subtract, Divide) | A, B | |
Power | Base, Exponent | |
DotProduct, CrossProduct, Distance | A, B | |
AppendVector | A, B | |
LinearInterpolate | A, B, Alpha | |
Clamp | Input, Min, Max | |
If | A, B, AGreaterThanB, AEqualsB, ALessThanB | |
Arctangent2Fast | Y, X |
Graph Outputs
Material output pins are expressed as [PinName]:
Common Expression Classes
Source-only nodes (no inputs — must always have > -> output lines or they will be deleted as orphans):
| ClassName | Output | Description | |
|---|---|---|---|
MaterialExpressionConstant | float1 | Float constant (property: R) | |
MaterialExpressionConstant2Vector | float2 | Vector2 constant | |
MaterialExpressionConstant3Vector | float3 | Vector3 constant (property: Constant:(R=,G=,B=,A=)) | |
MaterialExpressionConstant4Vector | float4 | Vector4 constant | |
MaterialExpressionScalarParameter | float1 | Float parameter | |
MaterialExpressionVectorParameter | float3 | Vector parameter | |
MaterialExpressionTexCoord | float2 | Texture coordinates | |
MaterialExpressionTime | float1 | Time value | |
MaterialExpressionScreenPosition | float2 × 2 | Outputs: ViewportUV, PixelPosition | |
MaterialExpressionViewSize | float2 | Viewport resolution in pixels | |
MaterialExpressionWorldPosition | float3 | World position | |
MaterialExpressionVertexColor | float4 | Vertex color (outputs: R, G, B, A, RGB) | |
MaterialExpressionCameraPositionWS | float3 | Camera position | |
MaterialExpressionTextureObject | Texture | Texture reference |
Texture sampling:
| ClassName | Description | |
|---|---|---|
MaterialExpressionTextureSample | Sample a texture (outputs: RGB, R, G, B, A, RGBA) | |
MaterialExpressionTextureSampleParameter2D | Texture parameter |
Math — binary:
| ClassName | Inputs | Unconnected-default properties | Description | |
|---|---|---|---|---|
MaterialExpressionMultiply | A, B | ConstA, ConstB (float) | A * B | |
MaterialExpressionAdd | A, B | ConstA, ConstB (float) | A + B | |
MaterialExpressionSubtract | A, B | ConstA, ConstB (float) | A - B | |
MaterialExpressionDivide | A, B | ConstA, ConstB (float) | A / B | |
MaterialExpressionPower | Base, Exponent | ConstExponent (float) | Base ^ Exponent | |
MaterialExpressionDotProduct | A, B | (none) | Dot(A, B) → float1 | |
MaterialExpressionCrossProduct | A, B | (none) | Cross(A, B) → float3 | |
MaterialExpressionDistance | A, B | (none) | Distance(A, B) → float1 | |
MaterialExpressionAppendVector | A, B | (none — both inputs required) | Append(A, B) — concatenates dimensions. Max output is float4. float1+float1→float2, float2+float2→float4. float3+float2 or larger FAILS. |
ConstA/ConstB are only available on the four basic arithmetic nodes (Multiply, Add, Subtract, Divide). They provide a scalar fallback when the corresponding input pin is unconnected. All other binary nodes require explicit input connections — use a MaterialExpressionConstant node to supply fixed values.
Math — unary (input: Input, can be omitted in connection):
| ClassName | Description | |
|---|---|---|
MaterialExpressionOneMinus | 1 - X | |
MaterialExpressionAbs | Absolute value | |
MaterialExpressionNormalize | Normalize → same dimension | |
MaterialExpressionLength | Length → float1 | |
MaterialExpressionSquareRoot | sqrt | |
MaterialExpressionFrac | Fractional part | |
MaterialExpressionFloor | Floor | |
MaterialExpressionCeil | Ceiling | |
MaterialExpressionSaturate | Clamp to 0-1 |
Trig (input: Input; Period property: default 1 maps input range [0,1] to one full cycle. WARNING: `Period:0` is BROKEN — it injects a float4 multiply that corrupts dimensions. For raw radians use Period:6.283185 (= 2π), which maps [0, 2π] to one full cycle):
| ClassName | Description | |
|---|---|---|
MaterialExpressionSine | sin | |
MaterialExpressionCosine | cos | |
MaterialExpressionTangent | tan | |
MaterialExpressionArctangent2Fast | atan2(Y, X) — inputs: Y, X |
Interpolation & logic:
| ClassName | Description | |
|---|---|---|
MaterialExpressionLinearInterpolate | Lerp(A, B, Alpha) | |
MaterialExpressionClamp | Clamp(Input, Min, Max) | |
MaterialExpressionIf | If(A, B, AGreaterThanB, AEqualsB, ALessThanB) | |
MaterialExpressionStaticSwitchParameter | Static bool parameter |
Channel operations:
| ClassName | Description | |
|---|---|---|
MaterialExpressionComponentMask | Mask channels (properties: R, G, B, A booleans) |
Other:
| ClassName | Description | |
|---|---|---|
MaterialExpressionPanner | UV panning | |
MaterialExpressionTransform | Transform vector between spaces | |
MaterialExpressionCustom | Custom HLSL code | |
MaterialExpressionMaterialFunctionCall | Call a material function | |
MaterialExpressionSetMaterialAttributes | Set material attributes |
Custom HLSL
For MaterialExpressionCustom, the Code property contains HLSL and InputNames defines custom inputs:
Defining Functions via Struct Wrapping
UE's Custom node does support function definitions — wrap them inside a struct. Direct top-level function definitions (float Foo(){...}) are rejected by the compiler, but struct member functions work:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkills/unreal-material-editing/SKILL.md
Popularity
- Repository stars
- 114
- Repository forks
- 14
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/italink/unrealclientprotocol/unreal-material-editing)