Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How do I setup and use TextureRenderTarget to create HUD?

Hi all,

Recently I just started to work on UE4 and tried to figure out a simple way to rapid prototype HUD so that artists can easily drag and move UI items around, instead of setting values in blueprints. In Unity it is pretty easy to setup a camera far away from the whole scene and render both this camera and the main camera.

In UE4, I had learnt that I can use TextureRenderTarget, SceneCapture2D and DrawTexture in AHUD to draw the rendered texture on the screen. However, the main issue is that the render texture will always include the background color.

Is there anyway to make sure the alpha value of the background in this texture is always 0? Like that in Unity?

If the only solution is to modify engine source code, how can I achieve it? Should I investigate into CaptureComponent2D?

Thank you very much!

Product Version: Not Selected
more ▼

asked May 01 '14 at 02:32 AM in Rendering

avatar image

1 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You could try use material to remove backgroud color

more ▼

answered May 01 '14 at 03:34 AM

avatar image

36.6k 931 169 1111

avatar image hsawnk May 01 '14 at 05:15 AM

Thank you Shadowriver!

I think this could be a good temporary solution for my case if I set the background/sky color to pitch black.

Still, please share if anyone has a more flexible solution. For instance, is it possible to setup a SceneCapture2D that ignore skybox and always render background as black color?

avatar image OFEKA May 24 '14 at 08:49 PM

As far as i know, and the way i've been doing it, is exactly that way, you have to add your texture into a Material, remove the background using masked texture and finally rendering the part of the texture you want. If you are capturing a whole scene, its dificult to know or tell to the material witch part to clean. But if u are trying to render a specific Mesh, you can make a diferent room, completly closed, putting the camera and the mesh inside with some lights setup. make sure the background is fully black with a Material with unlit mode so the lights in the scene dont affect it. Doing that u can easily clean the background plugging it in the opacity mask then finally pluging the texture to the emmisive. That should work for you.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question