How to alpha out a color on an image
by mike jones · in Torque Game Builder · 06/13/2009 (7:39 am) · 2 replies
I'm new to this torque script but I use to mess around with directx and I had a wrapper for it that had a function that would load the image you wanted and the remaining parameters were rgb values. Whatever the color was it would alpha that out for the image. I currently have a guy walking around but with a green background behind him. I've looked around and all I can find are blending options. Is there a function that you call that can alpha out the green or did I miss a step when creating the image and animations. Thanks
#2
06/13/2009 (1:38 pm)
@Mike: If you're using Photoshop, there is a plugin called SuperPNG. I use Paint Shop Pro myself, so it exports okay from that (the ancient version 7).
Torque Owner Isaac Barbosa
IQ Games
I think that´s not possible. Maybe I´m wrong, but I think you should export your images using the transparency alpha channel prior to use inside TGB. There is a setBlendALpha() method but changes the alpha for the whole image.
Cheers
Isaac