Game Development Community

Can't create dark-colored particles

by thud · in Torque Game Engine Advanced · 07/30/2007 (7:45 am) · 4 replies

Hey all, looking for some help with particle effects.

I'm trying to make some particles for a blunt object impact, e.g. blood spray/drops/mist. However, I can not seem to create particles that are dark in color, they always turn out bright in value, regardless of value setting.

For example, in trying to make a dark red, I'm using these values:

colors[0]     = "0.2 0.0 0.0 1.0";

which is about the same as RGB 51 0 0.

The problem is, even though that is a near black value for red, it is showing up in game as a color similar to
colors[0]     = "0.8 0.2 0.2 1.0"
which is ~ RGB 208 58 58, a big difference.

here is a cropped in-game shot of a particle that has a texture with 100% opacity and RGBI of 0.2 0.0 0.0 1.0
i184.photobucket.com/albums/x121/warbiscuit/darkRed.jpg
here is a cropped in-game shot of a particle that has a texture with 100% opacity and RGBI of 1.0 0.0 0.0 1.0
i184.photobucket.com/albums/x121/warbiscuit/lightRed.jpg
There doesn't seem to be any difference, aside from the fact that the R of 1.0 is darker than the R of 0.2. o.O

Am I doing something totally wrong, or is the particle system not setup to handle particles with dark values?

Any help is appreciated!

*thud*

#1
07/30/2007 (7:48 am)
I think the problem may be the particle integration with TGEA. I'm not sure how much has made it in. I know that the AFX team has been working hard at porting their pack to TGEA, but it is a long haul because of their heavy reliance on the particle system. Have you looked at the fps.starter that Alienforce ported? Look at the smoke emitters. I can't remember if they made it in or not since it has been a long while since I started it up, but that would be a good place to start.
#2
07/30/2007 (8:19 am)
I'll take a look at the fps.starter to see if there is anything of help in there. Thanks for the lead.
#3
07/30/2007 (12:39 pm)
I fixed this problem. It had to do with me not understanding how inverse alpha worked. I had:
useInvAlpha   = false;

but when i switched it to
useInvAlpha   = true;

I was able to get the dark red.

All the help documentation I could find used this description in some form:

useInvAlpha - Invert alpha components in texture(s)

To me, that means switch black:white thus transparent:opaque

Very confusing to me, but I'm glad it works now, though a beet sheepish that it was such a simple fix.

*thud*
#4
07/30/2007 (1:33 pm)
I have always found it odd that particle colours does not behave in the same way as other colours. Sky colours behave as you would expect, for example.

(0,0,0) should be black and (255, 255, 255) should be white, not some stupid gradient of either.