Problems with emitter and particles for vehicle jets.
by Bill Vee · in Torque Game Engine Advanced · 01/16/2008 (8:06 pm) · 5 replies
I have had this problem for a while and just overlooked it until now.
What I have is a nice particle effect that starts as a white particle and tapers to a point and ends up blue.
Think jet afterburner exhaust and you get the picture.
The problem is while the vehicle is stationary it looks 100% fine but as it moves the emitter seems to run ahead of or fall behind the node where it is attached. The jets looks fine , just in the wrong place.
I have read everything I can on particles and attaching them to nodes and yet I can't seem to fix it.
The thing I can't wrap my head around is the contrail emitters don't have this problem.
I can assign the emitter to the contrail and it appears fine. No out running or lagging behind the node.
But when assigned it to the forwardJetEmitter they either lag behind or completely outrun the vehicle.
I have tried a number of things to fix it and I must be overlooking something simple.
I have tried orienting the nodes before exporting. No change.
I tried adjusting inheritedVelFactor and the only change is anything over 0.50 and the outrunning becomes lagging and vice-versa. I even tried a value of 0.5000001. But any value over .50 and it flips the effect.
I have used "stock" dts objects that appear to be correctly setup. No change.
I looked at the source code for the emitters and other than a small difference ,
for the contrail , which if I follow the code correctly is just a difference in the length of time for the particle.
This is an example of the datablocks I used.
I would really like an education on this.
What I have is a nice particle effect that starts as a white particle and tapers to a point and ends up blue.
Think jet afterburner exhaust and you get the picture.
The problem is while the vehicle is stationary it looks 100% fine but as it moves the emitter seems to run ahead of or fall behind the node where it is attached. The jets looks fine , just in the wrong place.
I have read everything I can on particles and attaching them to nodes and yet I can't seem to fix it.
The thing I can't wrap my head around is the contrail emitters don't have this problem.
I can assign the emitter to the contrail and it appears fine. No out running or lagging behind the node.
But when assigned it to the forwardJetEmitter they either lag behind or completely outrun the vehicle.
I have tried a number of things to fix it and I must be overlooking something simple.
I have tried orienting the nodes before exporting. No change.
I tried adjusting inheritedVelFactor and the only change is anything over 0.50 and the outrunning becomes lagging and vice-versa. I even tried a value of 0.5000001. But any value over .50 and it flips the effect.
I have used "stock" dts objects that appear to be correctly setup. No change.
I looked at the source code for the emitters and other than a small difference ,
updateEmitter(mJetting && j == mThrustDirection,dt,mDataBlock->jetEmitter[jet.emitter],
jet.node,FlyingVehicleData::MaxDirectionJets);for the jets andupdateEmitter(trail,trail,mDataBlock->jetEmitter[FlyingVehicleData::TrailEmitter],
FlyingVehicleData::TrailNode,FlyingVehicleData::MaxTrails); for the contrail , which if I follow the code correctly is just a difference in the length of time for the particle.
This is an example of the datablocks I used.
datablock ParticleData(DropShip1JetParticle)
{
dragCoefficient = 1.5;
gravityCoefficient = 0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 300;//530
lifetimeVarianceMS = 0;
textureName = "~/data/shapes/dropship1/jetParticle";
colors[0] = "0.9 0.7 0.3 0.6";
colors[1] = "0.3 0.3 0.9 0.7";
sizes[0] = 1.0;
sizes[1] = 0.85;
};
datablock ParticleEmitterData(DropShip1JetEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 1;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 10;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "DropShip1JetParticle";
};I would really like an education on this.
#2
I decided on a different method for jet exhaust.
Particles are good for trails but for jets something is just wrong.
It may be that using Particles for jets is not what they are intended for.
I don't see any pure Particle examples of jets anywhere on the site.
01/31/2008 (8:04 am)
That is strange.I decided on a different method for jet exhaust.
Particles are good for trails but for jets something is just wrong.
It may be that using Particles for jets is not what they are intended for.
I don't see any pure Particle examples of jets anywhere on the site.
#3
I rather agree, I'm not real happy with my jetpack trails, and I've tweaked them endlessly.
01/31/2008 (1:21 pm)
@Bill: What did you end up using?I rather agree, I'm not real happy with my jetpack trails, and I've tweaked them endlessly.
#4
The shader is like a heat haze effect.
01/31/2008 (7:52 pm)
I use a custom shader on an animated DTS shape.The shader is like a heat haze effect.
#5
01/31/2008 (7:55 pm)
Oooooooooo cool. Sounds neat! Thanks.
Torque Owner Lee Latham
Default Studio Name
It makes no sense to be because I don't know how the trigger is tied to the particle emitter, but I guess the states listed in the db are tied to it, somehow.