how to make weapon trail effect
by gdyxml2000 · in Torque 3D Beginner · 06/29/2014 (2:48 am) · 5 replies
how to make weapon trail effect like this:
click
this is my cs code :
datablock ParticleData(doomSwordEff1_p)
{
textureName = "art/particles/fireball.png";
lifetimeMS = "300";
lifetimeVarianceMS = "299";
spinSpeed = "1";
spinRandomMin = "-400";
spinRandomMax = "0";
animTexName = "art/particles/fireball.png";
colors[0] = "1 0.897638 0.795276 0.2";
colors[1] = "1 0.496063 0 0.6";
colors[2] = "0.0944882 0.0944882 0.0944882 0";
sizes[0] = "0.997986";
sizes[1] = "1.99902";
sizes[2] = "2.99701";
times[1] = "0.498039";
times[2] = "1";
times[3] = "1";
gravityCoefficient = "-1";
};
datablock ParticleEmitterData(doomSwordEff1_e)
{
particles = "doomSwordEff1_p";
blendStyle = "ADDITIVE";
ejectionPeriodMS = "10";
periodVarianceMS = "5";
ejectionVelocity = "4";
velocityVariance = "2";
ejectionOffset = "0";
thetaMax = "0";
phiVariance = "0";
};
datablock ParticleEmitterNodeData(doomSwordEff1_b){
timeMultiple = 0.1;
};
//add Effect to Obj
function addEffectToObj(%obj,%mountIndex){
%eff1 = new ParticleEmitterNode() {
dataBlock = doomSwordEff1_b;
emitter = doomSwordEff1_e;
velocity = 1;
};
%obj.mountObject(%eff1 ,%mountIndex);
}
but the effect is not continuous. how to fix
click
this is my cs code :
datablock ParticleData(doomSwordEff1_p)
{
textureName = "art/particles/fireball.png";
lifetimeMS = "300";
lifetimeVarianceMS = "299";
spinSpeed = "1";
spinRandomMin = "-400";
spinRandomMax = "0";
animTexName = "art/particles/fireball.png";
colors[0] = "1 0.897638 0.795276 0.2";
colors[1] = "1 0.496063 0 0.6";
colors[2] = "0.0944882 0.0944882 0.0944882 0";
sizes[0] = "0.997986";
sizes[1] = "1.99902";
sizes[2] = "2.99701";
times[1] = "0.498039";
times[2] = "1";
times[3] = "1";
gravityCoefficient = "-1";
};
datablock ParticleEmitterData(doomSwordEff1_e)
{
particles = "doomSwordEff1_p";
blendStyle = "ADDITIVE";
ejectionPeriodMS = "10";
periodVarianceMS = "5";
ejectionVelocity = "4";
velocityVariance = "2";
ejectionOffset = "0";
thetaMax = "0";
phiVariance = "0";
};
datablock ParticleEmitterNodeData(doomSwordEff1_b){
timeMultiple = 0.1;
};
//add Effect to Obj
function addEffectToObj(%obj,%mountIndex){
%eff1 = new ParticleEmitterNode() {
dataBlock = doomSwordEff1_b;
emitter = doomSwordEff1_e;
velocity = 1;
};
%obj.mountObject(%eff1 ,%mountIndex);
}
but the effect is not continuous. how to fix
About the author
#2
06/29/2014 (10:30 am)
If an axe wielding a circle With the 2 seconds ,Particle effects like a circle .but, if wielding a circle With the 0.4 seconds, The particle is not connected into line, but a few sparse point
#3
06/30/2014 (12:03 am)
Uhhhh... I think you need ribbon particles, someone wrote a resource for that.
#4
Here: the blog
The one by Adam Armstrong uses billboards, the one by Tim uses shaders.
06/30/2014 (6:06 am)
Ahh yeah, I forgot to pull request that for him, there are two versions of ribbon particles on the website. The one by Adam Armstrong, and the one by Tim Newell (which isn't publicly available, I promised him to port it to the latest version of T3D, but haven't managed to port and PR it yet).Here: the blog
The one by Adam Armstrong uses billboards, the one by Tim uses shaders.
#5
06/30/2014 (7:44 am)
thank you very much !
Chris DeBoy