Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

particle chain...

Stellar Cosmo
Registered User
Join date: 11 Feb 2005
Posts: 5
10-23-2005 13:31
Trying to do a particle chain.. I can get the texture to go from point to point.. but on using the PSYS_PART_TARGET_LINEAR_MASK. for a straight line.. if i take that out and use a just PSYS_SRC_PATTERN_DROP the stream goes point to point but in and upward arc. and we all know chains doind do that..

Help Please!
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-23-2005 14:53
Apply a downward acceleration on the particles, with PSYS_SRC_ACCEL, <0,0,-0.981>
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Stellar Cosmo
Registered User
Join date: 11 Feb 2005
Posts: 5
10-23-2005 15:38
ok, thanks. still needs tweeks but now i know where i messed up...
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-24-2005 02:07
Further advice:
1) The particles will move from one point to the other in exactly their lifetime. If you set a max age of 1 second, they'll go from here to there in one second. This means that, ideally, you should update their lifetime after the distance between the two points...

2) The particles can't be easily made to overlap each other perfectly :/ you have to divide the distance between the two points by the length of a particle, then adapt the burst rate and the speed of each particle everytime the distance changes :( The exact calculation is:

burst_rate * particle_length = distance * lifetime

So depending on the apparent speed you want on the particles (you probably want it to be slow, but not too slow so that the effect starts quick enough) and the distance between start and end, you'll have to make the prim summon particles slower or faster.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Stellar Cosmo
Registered User
Join date: 11 Feb 2005
Posts: 5
10-24-2005 16:51
thanks.. still needs tweeks.. i'm getting gaps between the particles. problems is it for a moving object so the legnth will change constantly..

A few pirtcle go across then a pause then it goes again..
the distance varies between about 020m to .6 apx mostly towards the low end though

integer flags = PSYS_PART_TARGET_POS_MASK;
// flags = flags | PSYS_PART_EMISSIVE_MASK;
flags = flags | PSYS_PART_INTERP_COLOR_MASK;
flags = flags | PSYS_PART_INTERP_SCALE_MASK;
flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
//flags = flags | PSYS_PART_BOUNCE_MASK;


llParticleSystem ([ PSYS_PART_FLAGS,flags,
PSYS_SRC_PATTERN,PSYS_SRC_PATTERN_DROP,
PSYS_PART_START_COLOR,<1,1,1>,
PSYS_PART_END_COLOR,<1,1,1>,
PSYS_PART_START_SCALE,<0.0315,0.05,0.4>,
PSYS_PART_END_SCALE,<0.0315,0.05,0.04>,
PSYS_PART_MAX_AGE,1.1,
PSYS_SRC_ACCEL,<0.01,0.01,-0.8>,
PSYS_SRC_BURST_SPEED_MIN,0.04,
PSYS_SRC_BURST_SPEED_MIN,0.04,
PSYS_SRC_BURST_RATE,0.01,
PSYS_SRC_BURST_PART_COUNT,1,
PSYS_SRC_TARGET_KEY,id,
PSYS_SRC_TEXTURE,"link"
]);
}
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-25-2005 03:56
0.6 to 20 m ? Owww, this requires a lot of updates... The best way to make it look consistent is to get the distance often (llSensorRepeat on the specific key ?) and divide it by a constant "speed" for the particles (= burst_rate * particle_length), and use that as the particles' max age. Tweak it a bit to accomodate for the additional length caused by "curving" of the chain.

The faster / more often the distance changes, the more often you need to update the particle parameters (put a check to only update the particles if the distance changed since last time).

Also, poor rendering performance can "hide" particles. Since these are entirely client-side, you can control in your SL Preferences (Adv. Graphics) how many particles to render at most. You might want to bump that up a bit.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Stellar Cosmo
Registered User
Join date: 11 Feb 2005
Posts: 5
10-26-2005 01:01
Woops my bad.. not sure how i typed 20m.. sound have beeb .20m duh