No dynamic shadow in Image widget obtained with a ScreenCaptureComponent2D?

Hey,

We have an Image widget bind to a material M_RenderTarget (shading model is set to ‘Unlit’ and Usage is set to ‘Used with UI’. I have created a texture T_RenderTarget and this texture is associated to a Screen Capture Component 2D with the capture source set to ‘Scene color’ (we have the same issue with ‘Final color’). All this setup is to create a picture-in-picture in the corner of our screen where we can see through the ‘camera’ placed on a moving actor.

In our scene, we have Cascaded Shadow maps enabled for the first 200 meters and Ray traced distance field shadows beyond that and up to 1km. My light source is a directrional light, stationnary, and I’m using a Sky light (just in case that matters).

The problem he have is that on the image captured and displayed as picture-in-picture, we don’t have any dynamic shadow. The only type of shadow I see is very crude one, pitch black with very harsh contours. I also noticed that we don’t see material the same way. We set up a material blending steel and rust, it works great through the eyes of our character, but it looks like a simple grey through the picture-in-picture.

Did I miss a setting somewhere? Or is it the intented way of working? I’m using 4.7.5.

Any help would be greatly appreciated.

1 Like

In fact, i just tested something and the shadows are already not there in the texture. I basically created a new render target texture and set it as output to my Scene Capture Component 2D.

This is the image I see in my editor:

And a screenshot of the render target texture (I double clicked on the texture in the content browser):

It’s not exactly the same angle as I tried to reproduce the same angle in the editor, but you can see there’s not dynamic shadow and the shadow of the trees are very harsh.

Ok, I found the cause. By default, when one adds a scene capture component 2D, it has a scale of 100x100x100. I had reduced that to 1x1x1, which has the effect of removing dynamic shadow apparently. Not sure why… But if anyone has the same issue, it might work checking your scale parameter.

GREAT! That saved my day! :slight_smile: Thank you so much for sharing! I could have searched for the reason of that problem for years!

My parent camera component was scaled to 0.01x0.01x0.01, so I set the scale of scene capturer to 100x100x100 and suddenly it worked! It has to be exactly 1x1x1. Maybe this is worth a bug report.