Game Development Community

Black Particles?

by Kirby Webber · in Torque Game Engine · 01/05/2003 (7:20 pm) · 6 replies

I have been playing around with damage emitters, and I would like to define an emitter for black smoke.

From what I have gleaned, we have color[0]= r,g,b,transparency and color[1] = r.lifespan,g.lifespan,b.lifespan, and ??.

If I have this wrong, then please correct me, but what I really know is (are you gonna go my way... sorry. Couldn't help it! ;-) ) is it possible to define black? IF you drop all the rgb values to zero in color[0] you get nada. Theoretically it's there but you have told it not to render?!

I specifically remember being impressed by the grenade explosions in Tribes 2, however, they are using a few more channels on their particles than what we apparently have available.

Anyone know how to get black smoke?

#1
01/05/2003 (7:32 pm)
if you can get white try the variable useInverseAlpha = true; to make them black
#2
01/05/2003 (8:37 pm)
Nope. Didn't work, at least if I used it correctly anyway.

I simply applied the useInverseAlpha right after the texture definition... nada. Is that what you meant?
#3
01/05/2003 (8:52 pm)
You could download the spaceshock demo. I specifically remember that there were black particles defined in his script that worked in the engine.
#4
01/05/2003 (8:57 pm)
Cool, I'll do just that! Thanks.
#5
01/05/2003 (8:59 pm)
datablock ParticleData(HeavyDamageSmokeParticle)
{
   dragCoefficient      = 0.0;
   gravityCoefficient   = -0.01;
   inheritedVelFactor   = 0.5;
   constantAcceleration = 0.0;
   lifetimeMS           = 2000;
   lifetimeVarianceMS   = 200;
   useInvAlpha          = true;
   spinRandomMin        = -90.0;
   spinRandomMax        = 90.0;
   textureName          = "~/data/shapes/specialfx/smokeParticle";
   colors[0]     = "0.7 0.7 0.7 0.0";
   colors[1]     = "0.3 0.3 0.3 0.7";
   colors[2]     = "0.0 0.0 0.0 0.0";
   sizes[0]      = 1.2;
   sizes[1]      = 2.6;
   sizes[2]      = 4.0;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;
};

datablock ParticleEmitterData(HeavyDamageSmoke)
{
   ejectionPeriodMS = 20;
   periodVarianceMS = 6;
   ejectionVelocity = 4.0;
   velocityVariance = 0.5;
   ejectionOffset   = 1.5;
   thetaMin         = 0;
   thetaMax         = 35;
   overrideAdvances = false;
   particles = "HeavyDamageSmokeParticle";
};
#6
01/05/2003 (9:12 pm)
EXCELLENT! Thanks Anthony! That does the trick! :-)