Render image of character equipped weapon for inventory screen

I am currently setting up my inventory and would like to have a render of the characters weapon to display.

Usually I would just create an image in photo shop to do this. In my game the weapon will have a random skin applied to it on pickup so I would like to render the image with the skin as it is.

I have somewhat achieved this by using a camera and a SceneCaptureComponent2D. The only issue with this is that I want to have a transparent background in the rendered texture.

Does anyone know of a way I can achieve this?

Create a green screen with a plain mesh and an unlit green material, place it behind the gun before you render to texture, then chroma key it out in the texture

Perfect thanks for that.

Would you create a separate blueprint for this or add it in to the existing weapon blueprint and just hide the green screen in game?

last time I did it I put it in the weapon BP and then just hid it after capture