[Bug] [UE5.8.1] "DistanceToNearestSurface" Material Node doesn't work if a [Blueprint] with a [Scene capture component 2D] and a [TextureTarget] is present in the level.

Summary

[Bug] [UE5.8.1] => “DistanceToNearestSurface” Material Node doesn’t work if a [Blueprint] with a [Scene capture
component 2D] and a [TextureTarget] is present in the level.

What Type of Bug are you experiencing?

Level Design & Art Tools

Steps to Reproduce

There’s a video below explaining everything but you have the steps here too:

  1. Create a new project “Third Person” without variant and a new level with the template “Basic”
  2. Create a Material M_DistanceField with the following Setup
    A “DistanceToNearestSurface” node into a “Divide” by 100 into the “BaseColor” output of the material
  3. Add a cube, disable “Affect distance field” on it and Able “Affect distance field” on the terrain
    then Put the material on the cube. A gradient from the ground should appear on the cube
  4. Create a [Blueprint Actor Class] named “BP_Capture”, add a [SceneCaptureComponent2D]
  5. Create a [Render Target] Texture named “RT_Capture” and add it in the blueprint’s SceneCaptureComponent2D “Texture Target”
  6. After compiling, the cube has now turn black, but appeared normally when RightClicking ; Moving a viewport Window or in Unlit Mode
    but not BaseColor

Expected Result

“DistanceToNearestSurface” Material Node should work weather or not a [Blueprint] with a [Scene capture component 2D] and a [TextureTarget] is present in the level.

In this example shown in the video, the distancefield gradient should appear on the cube

Observed Result

“DistanceToNearestSurface” Material Node doesn’t work if a [Blueprint] with a [Scene capture
component 2D] and a [TextureTarget] is present in the level.
The cube with a distancefield gradient is black instead unless when I RightClick ; Move a windows of the engine or go in Unlit Mode

Affects Versions

5.8

Platform(s)

Windows

Upload an image

Video

The status of UE-392609 changed to ‘Needs Triage’. We are routing this to the appropriate team for investigation.