Skip to content
AI & Agents
Skill

/ue-materials-rendering

Use when writing C++ for materials or rendering — dynamic material instances, material parameter collections, render targets, scene capture, post process, decals, Nanite, Lumen, MegaLights, Substrate. Also use when the user mentions 'MID', 'CreateDynamicMaterialInstance',

From plugin
unreal-engine-skills
46831 skills

Claude Code

$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering --agent claude-code

SKILL.md

ue-materials-rendering.SKILL.md
name: ue-materials-rendering
description: "Use when writing C++ for materials or rendering — dynamic material instances, material parameter collections, render targets, scene capture, post process, decals, Nanite, Lumen, MegaLights, Substrate. Also use when the user mentions 'MID', 'CreateDynamicMaterialInstance', 'SetScalarParameterValue', 'UMaterialInstanceDynamic', 'material parameter collection', 'UTextureRenderTarget2D', 'DrawMaterialToRenderTarget', 'scene capture', 'post process volume', 'FPostProcessSettings', 'bOverride_', 'blendable', 'decal', 'custom depth stencil', 'Nanite', 'Lumen' or 'global shader'. For Niagara materials, see ue-niagara-effects; for UMG materials, see ue-ui-umg-slate."
metadata:
  version: "2.0.0"
  engine: "5.8"

UE Materials and Rendering

Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

Runtime material and rendering C++: `UMaterialInstanceDynamic`, `UMaterialParameterCollection`, `UTextureRenderTarget2D`, `USceneCaptureComponent2D`, `FPostProcessSettings`, `UDecalComponent`, plus the 5.8 renderer features (Nanite, Lumen, MegaLights, Substrate, Virtual Shadow Maps, TSR). Material headers live in `Runtime/Engine/Public/Materials`; render targets, scene, post-process volumes in `Runtime/Engine/Classes/Engine`; Blueprint libraries in `Runtime/Engine/Classes/Kismet`. Build.cs: `"Engine"` covers everything above; add `"RenderCore"` and `"RHI"` only for `EShaderPlatform`, RDG and global shaders.

Context

Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, renderer settings). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

| Request is about… | Go to | |---|---| | Changing material parameters at runtime on a mesh | [Dynamic Material Instances](#dynamic-material-instances) | | One value driving many materials (weather, time of day) | [Material Parameter Collections](#material-parameter-collections) | | Minimap, mirror, security camera, runtime texture painting | [Render Targets](#render-targets) / [Scene Capture](#scene-capture) | | Bloom, exposure, DOF, color grading, Lumen quality knobs | [Post Process](#post-process) | | Full-screen effect authored as a material | [Post-Process Materials](#post-process-materials) | | Bullet holes, blood, projected textures | [Decals](#decals) | | Nanite mesh/material compatibility, WPO, Nanite override material | [Nanite](#nanite) | | GI, reflections, many shadowed lights | [Lumen and MegaLights](#lumen-and-megalights) | | Layered/multi-BSDF material system | [Substrate](#substrate) | | Outlines, X-ray, stencil masks, shadow/AA settings | [Shadows, Anti-Aliasing and Custom Depth](#shadows-anti-aliasing-and-custom-depth) | | An API wants `EShaderPlatform` but you have a feature level | [Feature Level and Shader Platform](#feature-level-and-shader-platform) | | Writing an actual HLSL shader pass from C++ | [Global Shaders and Render Graph](#global-shaders-and-render-graph) |

Full signature tables live in [material-parameter-reference.md](references/material-parameter-reference.md); the `FPostProcessSettings` field tables live in [post-process-settings.md](references/post-process-settings.md); global shader and RDG code lives in [global-shaders-rdg.md](references/global-shaders-rdg.md).

Dynamic Material Instances

A MID is a per-instance parameter override on top of a parent material. Three ways to make one:

| Need | Call | |---|---| | Standalone MID not bound to a slot | `UMaterialInstanceDynamic::Create(Parent, Outer, Name)` | | MID assigned to a component's material slot | `UPrimitiveComponent::CreateDynamicMaterialInstance(ElementIndex, SourceMaterial, OptionalName)` | | MID from Blueprint-facing library code | `UKismetMaterialLibrary::CreateDynamicMaterialInstance(WorldContextObject, Parent, OptionalName, CreationFlags)` |

Verbatim signatures:

// Materials/MaterialInstanceDynamic.h
static UMaterialInstanceDynamic* Create(class UMaterialInterface* ParentMaterial, class UObject* InOuter, FName Name = NAME_None);

// Components/PrimitiveComponent.h
virtual class UMaterialInstanceDynamic* CreateDynamicMaterialInstance(int32 ElementIndex, class UMaterialInterface* SourceMaterial = NULL, FName OptionalName = NAME_None);

// Kismet/KismetMaterialLibrary.h
static class UMaterialInstanceDynamic* CreateDynamicMaterialInstance(UObject* WorldContextObject, class UMaterialInterface* Parent, FName OptionalName = NAME_None, EMIDCreationFlags CreationFlags = EMIDCreationFlags::None);

Create once, cache in a `UPROPERTY`, update in `Tick` or on an event:

// MyGlowActor.h
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyGlowActor.generated.h"

class UMaterialInstanceDynamic;
class UStaticMeshComponent;

UCLASS()
class MYGAME_API AMyGlowActor : public AActor
{
    GENERATED_BODY()

public:
    AMyGlowActor();
    virtual void BeginPlay() override;

protected:
    UPROPERTY(VisibleAnywhere, Category = "Rendering")
    TObjectPtr<UStaticMeshComponent> Mesh;

    UPROPERTY(Transient)
    TObjectPtr<UMaterialInstanceDynamic> GlowMID;
};
// MyGlowActor.cpp
#include "MyGlowActor.h"

#include "Components/StaticMeshComponent.h"
#include "Materials/MaterialInstanceDynamic.h"

AMyGlowActor::AMyGlowActor()
{
    Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
    SetRootComponent(Mesh);
}

void AMyGlowActor::BeginPlay()
{
    Super::BeginPlay();

    GlowMID = Mesh->CreateDynamicMaterialInstance(0);
    if (GlowMID)
    {
        GlowMID->SetVectorParameterValue(TEXT("GlowColor"), FLinearColor(1.f, 0.4f, 0.1f, 1.f));
        GlowMID->SetScalarParameterValue(TEXT("GlowStrength"), 1.f);
    }
}

When dozens of parameters change per frame, swap the name lookup for the index API — `InitializeScalarParameterAndGetIndex` o

Read more
@quodsoler
Ships withunreal-engine-skills

A collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.

Stars on GitHub

Momentum

stars in total
468
Star history of quodsoler/unreal-engine-skills on GitHub, a chart by star-history.com

Other skills on unreal-engine-skills.

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3w393k
@openclaw@openclawInstall Skill

Questions about ue-materials-rendering.

Which coding agents can use ue-materials-rendering?
ue-materials-rendering installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.