How to get rid of red engine messages?

I am using a single Planar Reflection for gameplay purposes which means I can’t scrap it. It works without having Global Clip Plane enabled in the project settings, but I get this message in both the editor and compiled product:

298941-message.png

How do I get rid of it? I don’t want to enable Global Clip Plane as it would increase rendering costs by roughly 15% (according to the editor) and it doesn’t change anything, visually or gameplay-wise. I’ve tried DisableAllScreenMessages but that seems to only work for print functions which I would specifically ask the engine to make.

Hello Mihhhhhhhh,

This message appears because for the planar reflection to work properly you need all shaders to have the necessary permutations. Here’s Unreal’s article on this feature: Planar Reflections | Unreal Engine Documentation .
If you really need that feature, you’ll have to work with it’s limitations, most noticeably the performance impact on rendering the scene more than once, meaning you might have to optimize the scene quite a bit to make it work at an acceptable level.
Because you don’t have the necessary features active you might introduce artifacts and or errors into your product. Unless you want to mess with the source code, I’d advise activating the ‘support global clip plane’ feature.

Hope that helps. Just let me know if you have any questions.

Regards,

Vecherka.

Thank you, I am aware of Planar Reflections’ limitations and performance impact. Those are not an issue to me as everything is working perfectly (no artifacts or errors), and the performance difference is below 2ms (I am using the Planar Reflection for gameplay reasons and it only renders a small handful of Actors (instead of being used for environment / scene reflections)). Like stated in the OP, the problem I have is the unneccessary red text in-game.

Dear Mihhhhhhhh,

If you want to erase the Error Message without enabling “Global Clip Plane”, then you can modify the engine source. However, the message is shown only in non-shipping builds, so in theory if modifying the engine is not an option, the message will not be visible in shipped versions of your game/application.

To Modify the Engine:

If you go to the file SceneRenderer.cpp, you will find that the following lines (from 2763 to 2767 in UE4.24.3) outputs the message (only in non-shipping builds).

if (bShowGlobalClipPlaneWarning)
{
	static const FText Message = NSLOCTEXT("Renderer", "NoGlobalClipPlane", "PLANAR REFLECTION REQUIRES GLOBAL CLIP PLANE PROJECT SETTING ENABLED TO WORK PROPERLY");
	Canvas.DrawShadowedText(10, Y, Message, GetStatsFont(), FLinearColor(1.0, 0.05, 0.05, 1.0));
	Y += 14;
}

To remove it, change these lines (from 2668 in UE4.24.3) from

if (Scene->PlanarReflections.Num() > 0)
{
	static const auto* CVarClipPlane = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.AllowGlobalClipPlane"));
	if (CVarClipPlane && CVarClipPlane->GetValueOnRenderThread() == 0)
	{
		bShowGlobalClipPlaneWarning = true;
	}
}

To these ones:

if (Scene->PlanarReflections.Num() > 0)
{
	static const auto* CVarClipPlane = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.AllowGlobalClipPlane"));
	if (CVarClipPlane && CVarClipPlane->GetValueOnRenderThread() == 0)
	{
		bShowGlobalClipPlaneWarning = false;
	}
}

You are basically disabling the message.

Alternative without modifying the engine (if you really have to):

As you can see from the code, the message is an FText, which means that it is localized. As a result, you can create another localization for the engine which is the same as the English one, but you change that string into an empty one.

Thank you! Not only is this exactly what I was looking for but also a great resource to learn.