Draw Material To Render Target impossible to control alpha - always fully transparent

Hi,

I have a simple blueprint where I am trying to render some EXRs using Draw Material to Render Target and then saving them to disk. It works fine with JPGs as those don’t have an alpha channel, but it’s completely broken for any format that supports alpha as alpha is always 0 (fully transparent). I am already stuck for second day on this and still can’t find solutions. I have tried things like messing with the material which is being drawn to the render target, changing shading and blending modes, messing around with channels, etc… but just no matter what I do, the alpha for any alpha supported image formats is always 0, so the image always ends up blank unless I open it in an image editor and discard/change the alpha channel.

Annotation-20200118-102044.jpg

Is there any way to control/override the alpha channel so that I can actually use any other formats than JPG? :frowning:

Thanks in advance.

1 Like

So I am not sure about texture formats, but perhaps all you need to do is invert the alpha channel, which requires a OneMinus node from the texture alpha to your opacity material pin, as I outline here in some context on rendering the player to the UI https://www.youtube.com/watch?v=XvhtSwXp8D8

Did not work. I tried all those shenanigans, inverting it, all the different shading and blend modes with alpha being 1,0 or -1. Only thing that worked was additive mode, but that added the image contribution so each frame was subsequently brighter.

I got the same error. Whatever material I plug to the DrawMaterial node, this will result in a fully transparent result.

I finally managed to get rid of this transparency overriding behavior. What you need to do is check UsedWithEditorCompositing in the material you want to use for drawing into a Render target.

13 Likes

I have a Surface Masked material, as wolflow94 suggested enable used with editor Compositing, and on top of that I had to put the Opacity Mask Clip Value to 0

5 Likes

You are such a lifesaver :slight_smile: Had the same problem and after way to many tries i found your solution, and it worked.

Thank you so much! I’ve just spent 3 hours to get proper RT to texture exporting)))

This is the only solution that I found works to save a PNG. Having the brush material set to masked, enabling “Used with Edito Compositing” in the material options. The alpha clip value doesn’t have to be 0, if you need a circular brush and not a square one you can make the Alpha clip higher in order to have transparency.