Render Target turns to black! bug??

Hi Guys,

We are trying to make a 3d UI in our game for the inventory. We used an actor that spawns in when the inventory is opened that contains a scene root component and under that the SceneCaptureComponent2D and inventory mesh with a point light to see it. Somewhere in the process of being rendered to the main camera, the resulting image on our CanvasRenderTarget turns everything that the SceneCaptureComponent2D sees with infinite depth as black and everything else as alpha. It’s an L shaped menu and you can see the L shape in the alpha on the CanvasRenderTarget both in game and in the Render target’s editor window. Interestingly, the thumbnail for the CanvasRenderTarget looks correct. Anybody got an idea why this is happening?

Hmm,…it looks like nobody knows…so it must be a bug!

I think, its flipping the mask! and shader mask doesnt affect it. So, the render target camera needs to flip the mask somehow.

Widget is probably broken!

Why are you inverting the alpha in your material?

Anyway, you can try changing the mode for the capture in the scenecapture2d component, there are a few different ones.

OK, so I think I might know what’s happening. In that last screenshot (the one where you mention that the widget might be broken), you can see that the widget’s Image brush is using the RenderTarget texture. Doing something similar on my end results in the same thing you’re seeing.
However, if I point the brush to the material instead of the texture-it works! It looks like yours is called “3dMenu_MAT”. Why using the texture there results in the behavior that it does, I have no idea, but using the material instead got the desired behavior for me.

It seems like you’re very close; just change the brush image in the widget to use the “3dMenu_MAT” instead of “3dMenuRendTarget2D” and see if that works.

I tried many different variations…

I don’t really understand what you’re trying to do. To me it looks like you’re asking why the alpha part of your image is black and the opaque part is alpha when you’re turning the alpha parts opaque (black) and the opaque parts to alpha in your material.

Wes, this is perfect and works BEST! Wes did the job!