# \[UE 5.8\] Substrate Toon Profile Override in Material Instance fails to apply after restarting the Editor

**URL:** <https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine\
**Created:** [July 28, 2026, 4:40am UTC](https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757 "2026-07-28T04:40:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_cnw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dev\_cnw](https://forums.unrealengine.com/u/dev_cnw)\
**Post date:** [July 28, 2026, 4:40am UTC](https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757/1 "2026-07-28T04:40:14Z")

</div>

### Summary

When using the experimental Substrate Toon Shading feature in UE 5.8, assigning a Toon Profile via the Material Property Overrides in a Material Instance works correctly during the initial session. However, after restarting the Unreal Editor, the overridden Toon Profile fails to apply or render correctly.

The issue seems to be related to shader caching (DDC) or initialization, as the overridden profile is completely ignored upon startup. The rendering only returns to normal if the shader is manually recompiled (e.g., making a dummy change to the master material).

### What Type of Bug are you experiencing?

Editor

### Steps to Reproduce

Enable Substrate in the Project Settings.

Create a Base Material using the Substrate Toon Shading model.

Create a Material Instance (MI) from the Base Material.

Open the MI, go to ‘Material Property Overrides’, enable ‘Toon Profile’, and assign a Toon Profile Data Asset.

Apply the MI to a mesh and observe that it renders correctly in the viewport.

Save all assets and close the Unreal Editor.

Relaunch the Editor and open the project.

Observe the mesh with the MI applied.

### Expected Result

The overridden Toon Profile should load and render correctly immediately after opening the project, retaining the serialized override data.

### Observed Result

The Toon Profile override is not applied or rendered correctly upon project load. The rendering only returns to normal if the shader is manually recompiled (e.g., making a dummy change to the master material).

### Affects Versions

5.8

### Platform(s)

Windows

---

<div class="post-metadata">

**Author:** ![Fotsbeats](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fotsbeats](https://forums.unrealengine.com/u/Fotsbeats)\
**Post date:** [July 31, 2026, 1:15pm UTC](https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757/2 "2026-07-31T13:15:18Z")

</div>

Was able to remedy this for now with a temporary python script added to the projects init\_unreal.py. The MI overrides don’t work because the Toon Profile assigned to the Master Material is not being loaded at all on startup. The script essentially makes the dummy changes and then clears the dirty flags.

You need to enable Unreal’s Python Editor Script Plugin, Add your actual master material paths to the top and paste the script into your init\_unreal file (YourProject/Content/Python/init\_unreal.py) or create one there if you don’t have.

Script:

import unreal

TOON\_PROFILE\_REFRESH\_MATERIALS = (  
“/Game/Path/To/M\_YourMasterMaterial”,  
“/Game/Path/To/M\_AnotherMasterMaterial”,  
“/Game/Path/To/M\_AdditionalMasterMaterial”,  
)

TOON\_PROFILE\_REFRESH\_DELAY\_TICKS = 180  
\_toon\_profile\_refresh\_tick\_count = 0  
\_toon\_profile\_refresh\_tick\_handle = None

def \_refresh\_material\_toon\_profile(material\_path):  
material = unreal.load\_asset(material\_path)

```auto
if material is None:
    unreal.log_warning(
        "[ToonProfileRefresh] Material not found: {}".format(material_path)
    )
    return False

toon_nodes = [
    expression
    for expression in unreal.MaterialEditingLibrary.get_material_expressions(
        material
    )
    if isinstance(
        expression,
        unreal.MaterialExpressionSubstrateToonBSDF
    )
]

node_profiles = [
    (node, node.get_editor_property("toon_profile"))
    for node in toon_nodes
    if node.get_editor_property("toon_profile")
]

if not node_profiles:
    unreal.log_warning(
        "[ToonProfileRefresh] No assigned Toon Profile found in {}".format(
            material_path
        )
    )
    return False

# Clear the Toon Profiles and compile once.
try:
    for node, _profile in node_profiles:
        node.set_editor_property("toon_profile", None)

    unreal.MaterialEditingLibrary.recompile_material(material)

finally:
    # Always restore the original Toon Profiles.
    for node, profile in node_profiles:
        node.set_editor_property("toon_profile", profile)

# Compile again with the restored profiles.
unreal.MaterialEditingLibrary.recompile_material(material)

# The material finishes in its original state, so remove the artificial
# dirty flag without saving the asset.
editor_assets = unreal.get_editor_subsystem(
    unreal.EditorAssetSubsystem
)
editor_assets.set_dirty_flag(material, False)

unreal.log(
    "[ToonProfileRefresh] Refreshed {} Toon node(s) in {}".format(
        len(node_profiles),
        material_path
    )
)

return True

```

def \_run\_toon\_profile\_startup\_refresh():  
refreshed\_count = 0

```auto
for material_path in TOON_PROFILE_REFRESH_MATERIALS:
    try:
        refreshed_count += int(
            _refresh_material_toon_profile(material_path)
        )
    except Exception as error:
        unreal.log_error(
            "[ToonProfileRefresh] Failed for {}: {}".format(
                material_path,
                error
            )
        )

unreal.log(
    "[ToonProfileRefresh] Complete: {}/{} materials".format(
        refreshed_count,
        len(TOON_PROFILE_REFRESH_MATERIALS)
    )
)

```

def \_on\_toon\_profile\_startup\_tick(\_delta\_seconds):  
global \_toon\_profile\_refresh\_tick\_count  
global \_toon\_profile\_refresh\_tick\_handle

```auto
_toon_profile_refresh_tick_count += 1

if _toon_profile_refresh_tick_count < TOON_PROFILE_REFRESH_DELAY_TICKS:
    return

unreal.unregister_slate_post_tick_callback(
    _toon_profile_refresh_tick_handle
)
_toon_profile_refresh_tick_handle = None
_run_toon_profile_startup_refresh()

```

\_toon\_profile\_refresh\_tick\_handle = unreal.register\_slate\_post\_tick\_callback(  
\_on\_toon\_profile\_startup\_tick  
)  
unreal.log(“[ToonProfileRefresh] Scheduled startup refresh”)

---

<div class="post-metadata">

**Author:** ![Leonature](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/leonature/32/937878_2.png) [@Leonature](https://forums.unrealengine.com/u/Leonature)\
**Post date:** [August 27, 2026, 7:54pm UTC](https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757/3 "2026-08-27T19:54:58Z")

</div>

this is a super annoying issue and Fotsbeats’s solution is too complicated for a noob like me. From my testing the toon shader will work properly when packaged but when in editor it keeps resetting after every project restart.

---

<div class="post-metadata">

**Author:** ![IceBlokee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IceBlokee](https://forums.unrealengine.com/u/IceBlokee)\
**Post date:** [September 16, 2026, 2:41pm UTC](https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757/4 "2026-09-16T14:41:13Z")

</div>

Why is yours resetting, I am working with it at the mo, it seems to remember everything I set up?

---

<div class="post-metadata">

**Author:** ![thefelixone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thefelixone](https://forums.unrealengine.com/u/thefelixone)\
**Post date:** [October 21, 2026, 1:04pm UTC](https://forums.unrealengine.com/t/ue-5-8-substrate-toon-profile-override-in-material-instance-fails-to-apply-after-restarting-the-editor/2738757/5 "2026-10-21T13:04:36Z")

</div>

Yo!  
So the fix actually comes in the HLSLMaterialTranslator.cpp file. Inside EHLSLMaterialTranslatorResult FHLSLMaterialTranslator::Translate(bool bForceDisableDDCQuery), you can insert the following and it solves the issue (see my ++/–):

```cpp
	// If we've hit the cache, deserialize the buffer read from the DDC into mater	ial translation results.
	if (DDCQueryHit)
	{
		if (bVerbose)
		{
			UE_LOGF(LogMaterial, Display, "Material '%ls' translation results retrieved from DDC.", *Material->GetMaterialInterface()->GetFullName());
		}

		STAT(double SerializeTime = FPlatformTime::Seconds());

		// Serialize the environment defines from the buffer retrieved from the DDC.
		FMemoryReaderView EnvironmentDefinesBufferReader{ TArrayView<uint8>{ (uint8*)EnvironmentDefinesBuffer.GetData(), (int)EnvironmentDefinesBuffer.GetSize() } };
		FObjectAndNameAsStringProxyArchive EnvironmentDefinesBufferReaderProxy{ EnvironmentDefinesBufferReader, true };
		EnvironmentDefinesBufferReaderProxy.bResolveRedirectors = true;
		EnvironmentDefines->Serialize(EnvironmentDefinesBufferReaderProxy);

		// If a parameter collection failed to load, the DDC entry is invalid. Caller needs
		// to invoke translate again forcing DDC querying off in order to re-translate the
		// material from scratch. We can't do this ourselves because this class was designed
		// to be single-use. The caller needs to create a new instance and invoke Translate
		// again.
		if (EnvironmentDefines->ParameterCollections.Contains(nullptr))
		{
			TranslationResult = EHLSLMaterialTranslatorResult::RetryWithoutDDC;
		}
		else
		{
			MaterialCompilationOutput = DDCMaterialCompilationOutput;
			// ++ UE-388460: Restore Substrate BSDF features on a material translation DDC hit.
			// GetMaterialEnvironment() reads the flags from SubstrateTranslatorData,
			// which is otherwise only populated during a full translation.
			SubstrateTranslatorData.SubstrateMaterialBsdfFeatures =
				MaterialCompilationOutput.SubstrateMaterialCompilationOutput.SubstrateMaterialBsdfFeatures;
			// --
		
			STAT(DDCRequestSerializeTime += SerializeTime - FPlatformTime::Seconds());
			STAT(GShaderCompilerStats->IncrementMaterialCacheHit());
			TranslationResult = EHLSLMaterialTranslatorResult::Success;
		}
	}
	else if (TranslationResult == EHLSLMaterialTranslatorResult::Success)
	{

```

Hopefully it solves your problem, because it did solved mine. 🙂
