Author Topic: I am having problems with this cloud emitter  (Read 857 times)

I am beginning to wonder if the windCoefficient code is broken, because I can't get rid of this damned constant acceleration upwards when I try this emitter.

Code: [Select]
datablock ParticleData(ThickCloud1Particle)
{
dragCoefficient      = 0;
gravityCoefficient   = 0.0;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.0;
lifetimeMS           = 40000;
lifetimeVarianceMS   = 55;
textureName          = "base/data/particles/cloud";
spinSpeed = 0.0;
spinRandomMin = -10.0;
spinRandomMax = 10.0;
colors[0]     = "0.5 0.5 0.5 0.0";
colors[1]     = "0.5 0.5 0.5 0.7";
colors[2]     = "0.5 0.5 0.5 0.6";
colors[3]     = "0.5 0.5 0.5 0.0";
sizes[0]      = 10.15;
sizes[1]      = 10.10;
sizes[2]      = 10.15;
sizes[3]      = 10.10;
times[0]      = 0.1;
times[1]      = 0.2;
times[2]      = 0.9;
times[3]      = 1.0;
windCoefficient = 0.0;

useInvAlpha = false;
};
datablock ParticleEmitterData(ThickCould1Emitter)
{
   ejectionPeriodMS = 500;
   periodVarianceMS = 0;
   ejectionVelocity = 0.5;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 1;
   thetaMax         = 45;
   phiReferenceVel  = 0;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "ThickCloud1Particle";

    uiName = "ThickCloud1";
};

Pic.


I just don't know what's wrong.

I see it. You have your thetaMin at 1 and thetaMax at 45, but no rotation around the central axis. You need to change thetaMax to 2 and phiReferenceVel to 360.
« Last Edit: January 21, 2008, 05:12:42 PM by Ephialtes »

I'll try that, thanks Ephi.

Edit: No luck, it's still accelerating slowly upwards.

I set thetamax to 45 to get a type of cone shape effect.

Edit2: I'm trying something, I'm not sure if I can override this handicappedness by setting the gravity coefficient to an almost equal value. The values don't seem to stack though. Also bedroom wind value is 0 0 0, so I have no idea what's causing this. It does the exact same thing on other maps.

Edit3: No luck, at gravCoefficient = 0.0025; it successfully overrides whatever it is that's causing this, but in doing so it overtakes it completely and now I've got clouds drooping into the ground.
« Last Edit: January 21, 2008, 06:03:26 PM by Muffinmix »

Badspot

  • Administrator
You're creating particles with no gravity and no drag and the ejecting them at a velocity of 0.5 and at an angle between 1 and 45 degrees from vertical.  They are ejecting upwards with no force acting against them, thus they will continue to go upwards.  If you want them to eject in all directions, set thetaMin = 0 and thetaMax 180.  If you want them to go upwards a but then slow down, set a value for the dragCoefficient. 

What I need specifically is a perfect cone shape of cloud particles emitted in whichever direction specified with the brick, at a constant velocity. Problem is they keep rising up no matter what I try it seems, except when I set gravitycoefficient to something around 0.0025, but then the particles take a nosedive into the ground.

I set thetamin to 0 and thetamax to 1 to try and get a single straight line of particles emitted in the North direction (direction given by the brick emitter), script:

Code: [Select]
datablock ParticleData(Thickfog1Particle)
{
dragCoefficient      = 0.0;
gravityCoefficient   = 0.00;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.00;
lifetimeMS           = 40000;
lifetimeVarianceMS   = 55;
textureName          = "base/data/particles/cloud";
spinSpeed = 0.0;
spinRandomMin = -10.0;
spinRandomMax = 10.0;
colors[0]     = "0.5 0.5 0.5 0.0";
colors[1]     = "0.5 0.5 0.5 0.7";
colors[2]     = "0.5 0.5 0.5 0.6";
colors[3]     = "0.5 0.5 0.5 0.0";
sizes[0]      = 10.15;
sizes[1]      = 10.10;
sizes[2]      = 10.15;
sizes[3]      = 10.10;
times[0]      = 0.1;
times[1]      = 0.2;
times[2]      = 0.9;
times[3]      = 1.0;
windCoefficient = 0.0;

useInvAlpha = false;
};
datablock ParticleEmitterData(Thickfog1Emitter)
{
   ejectionPeriodMS = 500;
   periodVarianceMS = 0;
   ejectionVelocity = 0.5;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 1;
   phiReferenceVel  = 360;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "Thickfog1Particle";

    uiName = "Thickfog1";
};

Picture of the result



I then tried several gravitycoefficients from 0.0000 to 0.0030 and it seems that anything under 0.0025 will have no effect on the upwards acceleration of the particles.

Code: [Select]
datablock ParticleData(Thickfog1Particle)
{
dragCoefficient      = 0.0;
gravityCoefficient   = 0.002;
inheritedVelFactor   = 0.0;
constantAcceleration = 0.00;
lifetimeMS           = 40000;
lifetimeVarianceMS   = 55;
textureName          = "base/data/particles/cloud";
spinSpeed = 0.0;
spinRandomMin = -10.0;
spinRandomMax = 10.0;
colors[0]     = "0.5 0.5 0.5 0.0";
colors[1]     = "0.5 0.5 0.5 0.7";
colors[2]     = "0.5 0.5 0.5 0.6";
colors[3]     = "0.5 0.5 0.5 0.0";
sizes[0]      = 10.15;
sizes[1]      = 10.10;
sizes[2]      = 10.15;
sizes[3]      = 10.10;
times[0]      = 0.1;
times[1]      = 0.2;
times[2]      = 0.9;
times[3]      = 1.0;
windCoefficient = 0.0;

useInvAlpha = false;
};
datablock ParticleEmitterData(Thickfog1Emitter)
{
   ejectionPeriodMS = 500;
   periodVarianceMS = 0;
   ejectionVelocity = 0.5;
   velocityVariance = 0.0;
   ejectionOffset   = 0.0;
   thetaMin         = 0;
   thetaMax         = 1;
   phiReferenceVel  = 360;
   phiVariance      = 360;
   overrideAdvance = false;
   particles = "Thickfog1Particle";

    uiName = "Thickfog1";
};



At 0.0025 gravitycoefficient, we get this



As you can see, there's an unknown force causing the particles to slowly rise upwards. It can't be "nullified" by an equal opposite acceleration downwards (i.e., gravitycoefficient in this case). But, once the grav-coefficient value surpasses the upward acceleration, it completely overtakes it and becomes the only force acting on the particles. That means it's impossible to get these buggers to go in a straight line, they will always be arching either upwards or downwards. It's a dilemma.

Make the particles really small so its just a stream of dots and you'll be able to better see what they're doing.