ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
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',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-materials-rendering -a windsurf -y
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"
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.
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).
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
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.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…