Crosshair Draw Texture - White instead of Transparent
Here is the very simple crosshair I created in illustrator/photoshop:
I exported it as TGA (which I've read is the best format?) and imported it into UE4. Here is the imported texture:
Here is my HUD blueprint that draws the crosshair:
Here is a screenshot of the game in play. Notice that the transparent pixels are white :s
I have tried playing around with the Blend Mode of the Draw Texture Node. When selecting "Modulate" I am able to make the white pixels transparent but the whole crosshair disappears when I look at anything dark.
I need 100% opacity on the green pixels and (obviously) 0% opacity on the transparent pixels. Why isn't UE4 handling the transparent pixels properly?
Thank you very much in advance!
asked May 22 '15 at 11:42 PM in Blueprint Scripting
I feel like it took unnecessarily long to figure out how to do this. I am going to answer my own question in hopes that it will help someone else later. This may not be the best solution but it works perfectly for me. I just used "Draw Texture Simple" node instead and it can take a png file no problem.
If you want to use the Draw Texture node instead of the "simple" version, you will need to deal with Alphas to create transparency.
Hope this saves someone time in the future!
answered May 23 '15 at 04:46 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here