Particle system - creating a boat wake
by Todd Pickens · in Technical Issues · 08/03/2005 (10:51 am) · 0 replies
Any help on this would be deeply appreciated!
I am trying to produse a "boat wake" in the mod we are working on. I have already crated the necessary art for the "wake", but can not get the control out of the particle system that I need.
The core problem seems to two things, first, there is no means for telling the particle to come out of the back of the boat. "phiReferenceVel" is a value which equates to a degree of rotation per second around the Z. So a value of "0.0" makes it hold still, but does not allow you to orient it to the back of the boat. Further more, it keeps its "0.0" position in world space regardless of the direction the ship is moving in.
The second problem is that there is no means for orienting the "wake" particle to the surface of the water. "orientParticles", depending on a setting of true or false, either orients the particle to the camera, which I don't want, or to the emission direction, which I also don't want.
This is the section from player.cs script in the fx directory that I am working with. I currently only have this Emitter turned on in the base.cs script, see below.
datablock ParticleData(PlayerFoamParticle)
{
dragCoefficient = 2.0; // Drag of a particle, must be non-negative//
gravityCoefficient = 0.0; // Multiple affect's particle's acceleration //
inheritedVelFactor = 0.0; // Multiple applied to the velocity //
constantAcceleration = 1.0; // Particle's constant base acceleration //
lifetimeMS = 100; // life-time of each emitted particle in milsec //
lifetimeVarianceMS = 0; // Must not be greater than lifetimeMS //
useInvAlpha = true; // False = alpha channel in texture inverted //
spinRandomMin = 0.0; // Particle's Min spin speed -10,000 to 10,000 //
spinRandomMax = 0.0; // Particle's Max spin speed -10,000 to 10,000 //
textureName = "~/data/shapes/player/wake";
colors[0] = "1.0 1.0 1.0 0.8"; //Color used for the Particle each value//
colors[1] = "1.0 1.0 1.0 0.6"; //Color used for the Particle each value//
colors[2] = "1.0 1.0 1.0 0.4";//Color used for the Particle each value//
sizes[0] = 20.5; // Scale for each Particle at each time value//
sizes[1] = 15.0; // Scale for each Particle at each time value//
sizes[2] = 10.0; // Scale for each Particle at each time value//
times[0] = 1.0; // Must be given in ascending order //
times[1] = 2.0; // Must be given in ascending order //
times[2] = 2.5; // Must be given in ascending order //
};
datablock ParticleEmitterData(PlayerFoamEmitter)
{
ejectionPeriodMS = 100; // The frequency with which to emit particles //
periodVarianceMS = 0; // Must be less than ejectionPeriodMS //
ejectionVelocity = 0.0; // Initial velocity a particle is emitted 0-655 //
velocityVariance = 0.0; // Must not be neg. or > ejectionVelocity 0-163//
ejectionOffset = 15.0; // distance of offset from emitter 0-655 //
thetaMin = 90; // Ejection angle relative to the x-axis 0-180//
thetaMax = 90; // Ejection angle relative to the x-axis 0-180//
phiReferenceVel = 0; // Ejection angle about the z-axis over time 0-360 //
phiVariance = 0; // Ejection angle about the z-axis over time 0-360 //
overrideAdvance = false; // True = particle's time/advanc is init. deferred //
orientParticles = true; // True = oriented toward the emission direction //
particles = "PlayerFoamParticle";
};
Once again, Any help on this would be deeply appreciated!
-IronGimp
I am trying to produse a "boat wake" in the mod we are working on. I have already crated the necessary art for the "wake", but can not get the control out of the particle system that I need.
The core problem seems to two things, first, there is no means for telling the particle to come out of the back of the boat. "phiReferenceVel" is a value which equates to a degree of rotation per second around the Z. So a value of "0.0" makes it hold still, but does not allow you to orient it to the back of the boat. Further more, it keeps its "0.0" position in world space regardless of the direction the ship is moving in.
The second problem is that there is no means for orienting the "wake" particle to the surface of the water. "orientParticles", depending on a setting of true or false, either orients the particle to the camera, which I don't want, or to the emission direction, which I also don't want.
This is the section from player.cs script in the fx directory that I am working with. I currently only have this Emitter turned on in the base.cs script, see below.
datablock ParticleData(PlayerFoamParticle)
{
dragCoefficient = 2.0; // Drag of a particle, must be non-negative//
gravityCoefficient = 0.0; // Multiple affect's particle's acceleration //
inheritedVelFactor = 0.0; // Multiple applied to the velocity //
constantAcceleration = 1.0; // Particle's constant base acceleration //
lifetimeMS = 100; // life-time of each emitted particle in milsec //
lifetimeVarianceMS = 0; // Must not be greater than lifetimeMS //
useInvAlpha = true; // False = alpha channel in texture inverted //
spinRandomMin = 0.0; // Particle's Min spin speed -10,000 to 10,000 //
spinRandomMax = 0.0; // Particle's Max spin speed -10,000 to 10,000 //
textureName = "~/data/shapes/player/wake";
colors[0] = "1.0 1.0 1.0 0.8"; //Color used for the Particle each value//
colors[1] = "1.0 1.0 1.0 0.6"; //Color used for the Particle each value//
colors[2] = "1.0 1.0 1.0 0.4";//Color used for the Particle each value//
sizes[0] = 20.5; // Scale for each Particle at each time value//
sizes[1] = 15.0; // Scale for each Particle at each time value//
sizes[2] = 10.0; // Scale for each Particle at each time value//
times[0] = 1.0; // Must be given in ascending order //
times[1] = 2.0; // Must be given in ascending order //
times[2] = 2.5; // Must be given in ascending order //
};
datablock ParticleEmitterData(PlayerFoamEmitter)
{
ejectionPeriodMS = 100; // The frequency with which to emit particles //
periodVarianceMS = 0; // Must be less than ejectionPeriodMS //
ejectionVelocity = 0.0; // Initial velocity a particle is emitted 0-655 //
velocityVariance = 0.0; // Must not be neg. or > ejectionVelocity 0-163//
ejectionOffset = 15.0; // distance of offset from emitter 0-655 //
thetaMin = 90; // Ejection angle relative to the x-axis 0-180//
thetaMax = 90; // Ejection angle relative to the x-axis 0-180//
phiReferenceVel = 0; // Ejection angle about the z-axis over time 0-360 //
phiVariance = 0; // Ejection angle about the z-axis over time 0-360 //
overrideAdvance = false; // True = particle's time/advanc is init. deferred //
orientParticles = true; // True = oriented toward the emission direction //
particles = "PlayerFoamParticle";
};
Once again, Any help on this would be deeply appreciated!
-IronGimp