Game Development Community

UseInvAlpha - what does it do?

by Amr Bekhit · in Torque Game Engine · 01/24/2007 (9:44 am) · 5 replies

Hello all,

I recently had a bit of trouble with particles because all my particles were being displayed translucent, even though the image files didn't have any. It turns out that if I set useInvAlpha to true, they all display perfectly.

This is not what I understood useInvAlpha to do. According to GPGT and TDN, useInvAlpha can be used to swap the alpha channel of the image, so anything transparent is opaque and vice versa. It doesn't seem to do that with me, so what does it do?

--Amr

#1
01/31/2007 (9:34 am)
Bump*
#2
01/31/2007 (10:22 am)
UseInvAlpha = negative image alpha, like modulation of color.

You could be having translucent particles because of this :
colors = "RED-GREEN-BLUE-ALPHA";
so colors = "1 1 1 1"; is full solid white.
If it were colors = "0 0 1 0.5"; this would be translucent full blue.
So if you need solid appearing particles use a 1 for the alpha.
#3
02/01/2007 (11:37 am)
Thanks for your reply. Unfortunately, I didn't understand your description. Could you expand please? Thanks
#4
02/01/2007 (12:11 pm)
Do you know what modulation of color is? If not, do you have PhotoShop? If so, some place in Photoshop's layer tools is a Modulation option, this will show you what im talking about.
BUT in short UseInvAlpha will make the particle appearer darker, and sorta 'wet' when rendered. Do you know what WET is in the graphics/photography-development world? WET is when you narrow the color temperatures to a smaller spectrum, and increase the contrast.

Other then that i dont know how to expand any clearer. Perhaps i should type this is some other language? What language do you need? Yes- im trying to be sarcastically humorous now.....
#5
02/01/2007 (12:16 pm)
Oh and speaking on the conversation of particles, i just finished a neat bit of code you may wish to try it out.